removing directories from repository

John Arbash Meinel john at
Wed Dec 17 15:00:40 GMT 2008

Hash: SHA1

roehnsch at wrote:
> I think revisions are atomic in a sense that you can't remove an element
> of a change set/revision and leave the rest of the set as is. E.g.
> revision 10 changes foo and bar, it will always stay that way.
> So maybe you should remove the respective revision itself.
> Maybe it works this way (but backup your repository beforehand):
> - make a branch of your main branch
> - use 'bzr uncommit -r 15' on your main branch to uncommit all revisions
> back to rev. 15, or whichever revision came before the one with the big
> file
> - use 'bzr merge -r 17..-1 BRANCH' on your main branch to take over all
> revisions after the big file. BRANCH is the previously branched branch.
> Greetings
> Alexander

That will work, though you will lose the individual commit messages for
17 onward.

If you really need this, then you can use the "bzr-rebase" plugin, to
"replay" the revisions 17 onward. At least I think:

bzr branch existing cleaned-up -r 15
cd cleaned-up
bzr replay -r 17..-1 ../existing

Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla -


More information about the bazaar mailing list