Change the file-id of the root

Aaron Bentley aaron at
Fri Sep 11 14:27:02 BST 2009

Hash: SHA1

James Westby wrote:

> 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.

That seems unusual.  Wouldn't you want to make one a subtree of the
other?  You really want to merge them so that their root directories are
a combination of the contents of both trees?

> 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

The interface is WorkingTree.set_root_id.

> 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?

An empty branch doesn't have a root, so it doesn't have a root id.  But
you can set the root ID of the WorkingTree associated with a branch.

Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla -


More information about the bazaar mailing list