[Bug] bzr diff -r 4.. == bzr diff -r 4..0
Aaron Bentley
aaron.bentley at utoronto.ca
Thu Dec 1 22:11:56 GMT 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Michael Ellerman wrote:
> When I specify -r 4.. revision2 isn't None, it's RevisionSpec(None).
>
> What's the right way to test for this? It wasn't immediately obvious in the
> RevisionSpec API how to check for it.
It would apear the RevisionSpec is parsing incorrectly, if
RevisionSpec(None) means "the empty tree/null revision". I think
revision handling would get much simpler if we moved all our code to use
RevisionSpec(revision.NULL_REVISION) for that, instead.
But in the meantime, I think the fix is:
=== modified file 'bzrlib/option.py'
- --- bzrlib/option.py
+++ bzrlib/option.py
@@ -83,12 +83,12 @@
if rev:
revs.append(RevisionSpec(int(rev)))
else:
- - revs.append(RevisionSpec(None))
+ revs.append(None)
else:
next_prefix = None
for x in revstr.split('..'):
if not x:
- - revs.append(RevisionSpec(None))
+ revs.append(None)
elif x[-1] == ':':
# looks like a namespace:.. has happened
next_prefix = x + '..'
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDj3Us0F+nu1YWqI0RAvPAAJsGbQ9U13SVJ6C4jPmPYJLR5atTzgCfQEd1
4OlYPQs8W8GKayD5rOtcdYc=
=s8K7
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list