rfc: 'bzr compare' command

Martin Pool mbp at sourcefrog.net
Mon Jul 25 23:37:26 BST 2005


On Mon, 2005-07-25 at 17:08 -0500, John A Meinel wrote:

> Isn't this basically what I wrote as "bzr missing"? I realize you didn't
> prefer the name.

Yes, it is; I'll pull that code into a builtin.

I'm not totally satisfied with "compare" as a name either.

> And we should be specific about what:
> 
> bzr compare
> bzr compare BRANCH1
> bzr compare B1 B2
> 
> do.
> 
> I personally think "bzr compare" should compare the current working tree
> with 'x-pull'.
> "bzr compare B1" should compare the current tree with the branch
> specified, and
> bzr compare B1 B2 uses B1 instead of the local branch. So:
> 
> bzr compare . B2
> is the same as
> bzr compare B2

I agree.

> I guess my "bzr missing" only said what was missing in this that was
> present in other, and your "bzr compare" is trying to do both ways at once.
> My only concern is that it be obvious which one is presented when.
> (Probably just in order is okay.)

Right, one could get the same results by running missing twice.  I'm not
sure if it's better to show both in the same output, with some kind of
headers to separate them, or just have the person run the commands
twice.

> Also, will you compare their complete revision ancestry, or just
> revision-history?
> If I merge your branch, you need to look at the ancestry. But ancestry
> might be missing (as is the case of the current bzr mainline tree).
> 
> I guess I would suggest a hybrid. Only 'revision-history' can be
> missing, but it is present if it exists in the ancestry. Otherwise you
> can't use simple revision numbers to reference the logs.

Right.  So we pass though A's revision history and see if it has been
merged anywhere into B, and then vice versa.

-- 
Martin






More information about the bazaar mailing list