Change the file-id of the root
Tom Widmer
tom.widmer at googlemail.com
Fri Sep 11 13:10:19 BST 2009
James Westby wrote:
> Hi,
>
> rich-root by default has exposed an existing bug in bzr-builddeb.
>
> We want to create two trees that share no revision history, but which
> share the same root id, as we expect to merge them later.
>
> We get this for free with non-rich-root obviously, but with rich-root
> it is harder to do as a random id is assigned when the tree is
> created.
>
> My question is, what is the best way to achieve this? There doesn't
> seem to be an interface to change the id of the root, so I am guessing
> the best way is to somehow initialise the tree from the other. Is there
> a way to do a "branch" operation that uses the file-id for the root,
> but leaves the new branch with an empty history?
You can create a dummy root commit to branch from. e.g.
bzr init --2a foo
cd foo
bzr commit --unchanged -m "Root commit for shared history"
bzr branch . ../bar
echo foo > foo.txt
bzr add
bzr commit -m "Added foo.txt"
cd ../bar
echo bar > bar.txt
bzr add
bzr commit -m "Added bar.txt"
bzr merge
I don't know how this can be achieved after the event.
Tom
More information about the bazaar
mailing list