PING [MERGE] Root entry has a revision id

Aaron Bentley at
Mon Aug 14 18:41:37 BST 2006

Hash: SHA1

John Arbash Meinel wrote:
> Aaron Bentley wrote:

> I suppose you mean that while Inventory can have a root of None, Trees
> may not be able to?

Right.  root=None is a temporary state, and by the time you put it in a
tree, root must not be None.  We can add some asserts, if you like.

> I don't really know what is best here. But since classes shouldn't
> inherit from NewCommitBuilder, it should be private. I also don't want
> to see another 'BzrNewError' situation where 'New' is permanently
> encoded into the API for compatibility. 'new' is rarely a good word to
> have in apis. :)

Right.  NewCommitBuilder isn't meant to be derived from, and in 0.11, it
will go away and we'll switch CommitBuilder.record_root_entry to True then.

So you're absolutely right, it should be a private symbol.

> Well, my point was that you should have a new class, which inherits from
> CommitBuilder, and implements the correct API. As is, CommitBuilder
> implements the correct API, so depending on what children override, they
> may or may not get the right API (just their foo.supports_root_... will
> not be set to True).

I don't really follow.  If the derived class supports recording the root
entry, they should set record_root_entry to True.  Otherwise, they can
do nothing, and it will be False.  As long as record_root_entry matches
what they've implemented, the API will be right.

> I'm not super concerned about plain CommitBuilder implementing the right
> api. But to truly do api compatibility, CommitBuilder shouldn't change.

Bazaar's API isn't frozen.  AIUI, it is okay for CommitBuilder's API to
change, if there's a suitable deprecation period for the old API.

Now if you're saying we should introduce a new public symbol for this
new API, well, I'd hate to do it just for this one thing, especially
since the old API is deprecated.  In four years' time, we'd have
NewCommitNewBuilderNew05 :-).

Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird -


More information about the bazaar mailing list