Purging parts of a branch's history?

Staffan Gimåker staffan at gimaker.se
Tue Aug 12 16:47:00 BST 2008


On Tuesday 12 August 2008 16:53:53 John Arbash Meinel wrote:
> Staffan Gimåker wrote:
[snip]
> > $ bzr init new_branch
> > $ cd new_branch
> > $ bzr diff -r0..100 ../old_branch | bzr patch
> > $ bzr add; bzr ci -m "Initial import."
> > (new_branch is now identical to old_branch at rev. 100)
> > $ cd ../old_branch/
> > $ bzr rebase -r101.. --onto=1 ../new_branch
> >
> > Obviously, I'm not groking it since I get a bunch of conflicts at once:
[snip]
> The problem is the plain "bzr add" which is creating new file-ids for
> each entry, rather than re-using the ones from your source branch.
>
> Instead, you should be able to do:
>
> bzr add --file-ids-from ../old_branch
>
> Which I think will solve the issue.

Thanks. That worked, almost. With a slight change it (sort of) worked:

$ bzr branch -r100 old_branch old_branch_r100
$ cd new_branch/
$ (diff and patch as above)
$ bzr add --file-ids-from ../old_branch_r100

But I'm still getting conflicts after the first ~100 revisions have been 
replayed, which seems a bit odd?

-- 
Staffan Gimåker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080812/382680aa/attachment.pgp 


More information about the bazaar mailing list