[MERGE] Implementation and tests for -r revno:N:path

John Arbash Meinel john at arbash-meinel.com
Tue Jul 18 22:55:39 BST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Aaron Bentley wrote:
> John Arbash Meinel wrote:
>>> Aaron Bentley wrote:
>>>>> I'd consider this a regression.
> 
>>> Agreed.
> 
> What should we do about it?  Add a failing test and then revert the
> regression?
> 
> Aaron

I'm guessing we should update the blackbox test for diff, and make sure
that it fails for the right reason. (run_bzr_error).

Then we just need to fix whatever is the correct fix. I think with his
changes, you are able to do:

cd /
bzr diff -r revno:10:/home/path/branch1..revno:12:/home/path/branch2

So *just* running in an empty directory and not supplying a branch isn't
a bug anymore.

In general I think we need some updates to 'cmd_diff', since it doesn't
support everything we want. And I just haven't taken the time to clean
it all up.

It is a little bit messy, because if -r is supplied, it *might* contain
a branch to connect to, or the branches might be supplied on the command
line, or we might have supplied files, etc, etc.

I think the next real fix needs to do a more major overhaul, rather than
an incremental fix. And make sure we check things in the correct order.

The problem is something like:

bzr diff -r revno:10:branchA..revno:12:branchB branchC branchD

is obviously a little convoluted, but

bzr diff -r 10..12 branchC branchD

is reasonable, because you want to compare revno 10 in C with revno 12 in D.

It seems we need a way to check not only if -r is supplied (and how many
args), but also if they imply a branch, rather than just a revision in a
branch that is determined in some other way.

There are also other problems with the 'revno:' parser. It silently
suppresses the error if you typed 'bzr -r revno:a' and uses None.
Similarly if you do 'bzr -r revno:a:branch' it will select the revision
in branch associated with None.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEvVjaJdeBCYSNAAMRAqZsAKC3VEAsEBL2Ky30Fc/hHE1FSRNEhACbBMPd
au1VFd4ZWbjLFn6USgVVLlc=
=kNdB
-----END PGP SIGNATURE-----




More information about the bazaar mailing list