Need a way to remove unreferenced data from a repository

Bug #54870 reported by Martin Pool
This bug affects 3 people
Affects Status Importance Assigned to Milestone

Bug Description

Repositories can accumulate data which is no longer referenced by any branch. This can happen because of uncommit, pull --overwrite, push --overwrite, or removing branch directories. The data is semantically meaningless and can't normally be seen.

In some respects this is useful as it makes these operations less destructive and they can be undone. (At the moment the user must find and re-branch the revision manually, but it could be made more automatic.)

However, the data uses space, and people might want to remove it. mpe says:

"""I think in the medium term there must be a way to clean out unused (unreferenced?) revisions in a shared repo. Simply in terms of space you need to be able to do it, otherwise over time your repo will fill up with lots of junk. And there might be people who have a legal requirement that all code from branch x is physically removed."""

One approach is a command to copy a repository, including branches within it, and only including revision data referenced by those branches. Another approach would be to "vacuum" or "garbage-collect" the repository in-place.

This is only safely possible if all in-use revisions are referenced by branches which can be located at the time of copying - ie if they're physically inside the repository directory.

Tags: gc
Martin Pool (mbp)
Changed in bzr:
importance: Untriaged → Low
status: Unconfirmed → Confirmed
Revision history for this message
David Allouche (ddaa) wrote :

The Launchpad mirroring service should also reflect data removal done in the source branch. Filed bug 58650 about this.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

related to bug 43753

Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: added: gc
removed: check-for-breezy
Changed in brz:
importance: Undecided → Low
status: New → Triaged
importance: Low → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.