Add `requested` and `referencing` fields to recovery bundle
This should be reviewed commit by commit.
Experiments have shown that it would be beneficial to add two fields to the recovery bundle manifests:
-
requested
: list the origin URLs or SWHIDs which are at the root of the removal. Basically what is given toswh alter remove
. -
referencing
: list of SWHIDs referenced by objects in the bundle that have not been removed from the archive.
The latter helps us figure out the order in which recovery bundles should be recovered or deleted (e.g. after expiration). For example, picture the following scenario with repositories A and B which is a fork of A:
- Remove project A. Common objects with B will not be removed.
- Remove project B. All objects have been removed.
- Restore bundle of project A. Oops, we now have objects referencing objects not in the archive, as they are only in the recovery bundle for B.
We now display warning and require confirmation before the bundle for A is restored.
After these changes, the manifest is at version 3.
Edited by Jérémy Bobbio (Lunar)