Implement `swh alter remove --dry-run`
This migrates most of the removal code from snippets to swh.alter
. We still need to migrate the actual deletion code.
These changes add the following command:
$ swh alter remove --dry-run https://example.com/swh/graph2
Removing the following origins:
- swh:1:ori:8f50d3f60eae370ddbf85c86219c55108a350165
We would remove 11 objects:
- swh:1:ori:8f50d3f60eae370ddbf85c86219c55108a350165
- swh:1:snp:0000000000000000000000000000000000000022
- swh:1:rel:0000000000000000000000000000000000000021
- swh:1:rev:0000000000000000000000000000000000000018
- swh:1:rev:0000000000000000000000000000000000000013
- swh:1:dir:0000000000000000000000000000000000000017
- swh:1:dir:0000000000000000000000000000000000000012
- swh:1:dir:0000000000000000000000000000000000000016
- swh:1:cnt:0000000000000000000000000000000000000014
- swh:1:cnt:0000000000000000000000000000000000000011
- swh:1:cnt:0000000000000000000000000000000000000015
The flags --output-inventory-subgraph
, --output-removable-subgraph
,
and --output-pruned-removable-subgraph
can be used to produce various
Graphviz .dot
source files, that can produce a visual representation
with the dot
command.
The next step after this is to create records of the soon-to-be-removed objects so we can rollbacks in case of errors or race conditions.
Close #1 (closed)
Edited by Jérémy Bobbio (Lunar)