freeing up storage space that was accidentally hogged by a file in repo
Talden
talden at gmail.com
Wed Mar 11 21:14:54 GMT 2009
On Wed, Mar 11, 2009 at 5:46 AM, Rahul Nabar <rpnabar at gmail.com> wrote:
> One of my automated scripts accidentally added a somewhat larger and
> also quick changing file to the repo. Is there a way to permanently
> remove it from the archive to free up all its storage? "bzr remove"
> won't really affect the historical storage it has occupied, right?
>
> This time it is not so critical because I detected it fairly quickly
> and the file was not that large. BUt I am just wondering what happens
> if I accidentally end up adding say a 100 GB swap file to my repos. Is
> the act irreversible or is there a way out?
>
> A related question: Can I perform forensics to know how much storage
> (at least approximately) this file is occupying under the bazaar repo?
> This can't be solely a function of file size since it ought to also
> depend upon the frequency and magnitude of changes integrated over its
> lifetime?
This same question is a common one in Subversion and probably others.
The issues are much the same.
To remove the file from history means changing revisions which changes
revision identity which breaks the relationship to other branches
(assuming they have related and affected ancestry).
However, like you, many users are willing to accept such compromises
to resolve significant performance/space or security issues with
committed content.
I don't know if a solution exists (I'd certainly like to know as well)
but the solution will be something akin to a rebase replaying over the
ancestry of a repository while applying a filter and then updating the
branch (or branches) to refer to what will now be a new revision.
Please post to the list if you find a good solution as I will need
this as well when my workplace eventually migrates from Subversion.
--
Talden
More information about the bazaar
mailing list