Sanitizing a branch

Jelmer Vernooij jelmer at samba.org
Tue Mar 17 10:13:01 GMT 2009


Alexander Belchenko wrote:
> Erik de Castro Lopo пишет:
>> Hi all,
>>
>> I have a problem that is related to this one:
>>
>>    https://lists.ubuntu.com/archives/bazaar/2009q1/054149.html
>>
>> I have a project that was imported into Bzr from GNU Arch many years
>> ago and has history dating back to early 2004. During the time I've
>> hacked on this I have added all sorts of cruft including tests files
>> scraps of documentation etc.
>>
>> I'd now like to make a public branch of this repo with the public
>> branch having none of the cruft but keeping the cruft in my private 
>> branch and still have the ability to merge between the
>> two relatively painlessly.
>>
>> Is this possible? Any clues on how to do it?
> You can try to do it manually with rebase, but it seems you have very 
> big history,
> so I suspect it'll be very long and boring process.
The rebase command really isn't intended for this sort of thing. The 
rebase plugin contains some infrastructure that may be useful when 
implementing commands for branch manipulation, but those commands don't 
exist yet in bzr-rebase. To avoid this confusion, the bzr-rebase plugin 
should probably be renamed to "bzr-rewrite" as soon as other commands 
(such as Ali's filter-branch command) are added.

rebase will also change the revision ids of the revisions it rewrites, 
so it would break merges into Eriks original branch.

Cheers,

Jelmer




More information about the bazaar mailing list