[MERGE] [Bug #133751] Fix traceback thrown by ``bzr log -r 0``

Aaron Bentley aaron.bentley at utoronto.ca
Mon Nov 12 23:53:26 GMT 2007


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

Kent Gibson wrote:
> 
> 
> Aaron Bentley wrote:
>> Aaron Bentley has voted reject. Status is now: Vetoed Comment: I
>> think if the user requests revision 0, we should politely tell them
>> that it doesn't exist.  None means "no value specified", not
>> "unreasonable value specified", and NULL_REVISION shouldn't have
>> the same behavior.  "bzr log -r0" is not the same thing as "bzr
>> log"
> 
> Hmmm, ok.  That wasn't how I read John's comments in the bug.

John says two things:
- - old versions treated -r 0..10 as r ..10
- - But this meant that old version were buggy-- they treated "log -r 0"
as "log".

Me now:
It's weird to treat -r 0..10 as -r 1..10.  Relatively harmless, but
probably leads people into bad habits or confusion.

> So the real problem is that -r 0 is being mapped to into the
> NULL_REVISION?

No, revision 0 should always be mapped to the null revision.

The real problem is that the user asked for the log of revision 0, and
revision 0 doesn't have a log.

> Oh, and that show_log should handle NULL_REVISION as it presently
> handles None (which should no longer be passed??).

No, the handling of NULL_REVISION should not be the same as None.

None = I have not selected a revision
NULL_REVISION = I have selected the revision from which all other
revisions descend.

None should definitely be passed if the user specifies "log", "log -r
..x" or  "log -rx..".

NULL_REVISION should be selected if the user specifies "log -r 0", "log
- -r 0..x" or "log -r x..0".  And that should cause an error like "Null
revision has no log entry".

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHOOd20F+nu1YWqI0RAsElAJ9G6kfQjsuRiMBmUrCPVB1cHmg1oACbB/f4
jnb4gOy+BnMSI8PhFBxZt2k=
=Ip8s
-----END PGP SIGNATURE-----



More information about the bazaar mailing list