remove a branch from a repo

William Dode wilk-ml at flibuste.net
Wed Sep 27 20:34:51 BST 2006


On 27-09-2006, John Arbash Meinel wrote:
> This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
> --------------enig7F27334B551E96232035C4FD
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: quoted-printable
>
> Matthieu Moy wrote:
>> William Dode <wilk-ml at flibuste.net> writes:
>>=20
>>> Is there a way to remove a branch and all his history from a=20
>>> repository ?
>>> Of course if i rm -r the branch, the history stay in repo/.bzr
>>=20
>> 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.
>>=20
>> 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.
>>=20
>
> 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?

Thank you but it's not actualy important for me, i just pointed this 
because when we read the tutorials about repository it really miss 
something, specialy whith example of branch to correct one bug. The 
shared repository are specialy interesting for big tree, so people will 
think about this.

Maybe for now it'll be enough to just add somes comments on the 
tutorials to say that 1/ it will be a garbage collection one time, and 
2/ even for big tree an unused branch doesn't use a lot of place in the 
repository.

-- 
William Dodé - http://flibuste.net





More information about the bazaar mailing list