Comment 5 for bug 373539

Revision history for this message
John A Meinel (jameinel) wrote :

Just mentioning that since we have 'clean-tree', 'clean-repository' or 'clean-repo' would seem to be an appropriate name.

I think other systems also tend to have something like 'garbage-collect' ('gc'). Which unreferenced data in 'obsolete_packs' and 'upload' would fit.

Also, last I checked deleting an upload file will appropriately kill the running process when it tries to install the file. It *might* first create unreferenced indexes in the 'indices' directory, so we probably also want to prune unreferenced items from there. You also can have .pack files in packs/ which are unreachable (because they are not listed in pack-names). This is usually pretty rare, but it would also be something along the same lines for what to collect.

We could alternatively introduce a garbage-collect command, that would start at just doing this, and then grow the functionality to remove revisions/inventories/texts that are not referenced. (Note that those sorts of things start to become dangerous in the presence of things like stacked-branches, where we can no longer tell what revisions are *actually* referenced.)