remove a branch from a repo

John Arbash Meinel john at arbash-meinel.com
Wed Sep 27 20:02:08 BST 2006


Matthieu Moy wrote:
> William Dode <wilk-ml at flibuste.net> writes:
> 
>> Is there a way to remove a branch and all his history from a 
>> repository ?
>> Of course if i rm -r the branch, the history stay in repo/.bzr
> 
> Indeed, bzr would need some kind of "garbage collection" to deal with
> this situation, that is, find all revisions not pointed to by anyone
> in the repository, and delete them permanently. The same problem
> occurs if you "uncommit" a revision, or if you "bzr merge; bzr revert"
> for example.
> 
> This garbage collection is not implemented in bzr AFAIK, but a
> workaround is to create a new, fresh repository, and branch all the
> branches except the one you don't want. A small shell script with
> "find .bzr/" & co can help. I think there's a "push-repo" plugin
> somewhere also.
> 

We've talked about garbage collection a lot. And it is pretty easy to
implement. The biggest issue is that destroying history is not something
to do lightly. So it gets low priority from us, because it isn't
something that you want to mess up, and isn't super critical for proper
functioning.

I have what needs to be done mapped out in my head, and if someone is
interested in implementing it, I can go over it with them. I could write
up a spec one day, just hasn't been worth the time yet.

So William, how important is this for you?

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060927/3cdb3c1e/attachment.pgp 


More information about the bazaar mailing list