[PATCH] maximum revision number allowable too low
Goffredo Baroncelli
kreijack at alice.it
Tue Aug 23 22:45:07 BST 2005
Hi all,
the latest revision number is not allowable in the function
'bzrlib/log.py:show_log( )'; the patch below fixes the problem.
without the patch:
ghigo at therra:~/bazar/bzr.dev$ python ./bzr --version
bzr (bazaar-ng) 0.0.7pre
(bzr checkout, revision 1092 {mbp at sourcefrog.net-20050822175211-90caf03af7d0cf07})
[...]
ghigo at therra:~/bazar/bzr.dev$ python ./bzr revno
1092
ghigo at therra:~/bazar/bzr.dev$ python ./bzr log -r1092
bzr: error: invalid revision number: 1092
at /home/ghigo/bazar/2/bzr.dev/bzrlib/log.py:166 in show_log()
see ~/.bzr.log for debug information
with the patch:
ghigo at therra:~/bazar/bzr-correct-rev-max$ ./bzr revno
1092
ghigo at therra:~/bazar/bzr-correct-rev-max$ ./bzr log -r1092
------------------------------------------------------------
revno: 1092
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Mon 2005-08-22 14:52:11 -0300
message:
- fix bug where bzr upgrade aborts when trying to fix trees that mention revisions
which are not locally present
ghigo at therra:~/bazar/bzr-correct-rev-max$ ./bzr diff
*** modified file 'bzrlib/log.py'
--- bzrlib/log.py
+++ bzrlib/log.py
@@ -162,12 +162,12 @@
if start_revision is None:
start_revision = 1
- elif start_revision < 1 or start_revision >= len(which_revs):
+ elif start_revision < 1 or start_revision > len(which_revs):
raise InvalidRevisionNumber(start_revision)
if end_revision is None:
end_revision = len(which_revs)
- elif end_revision < 1 or end_revision >= len(which_revs):
+ elif end_revision < 1 or end_revision > len(which_revs):
raise InvalidRevisionNumber(end_revision)
# list indexes are 0-based; revisions are 1-based
--
gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) <kreijack AT inwind.it>
Key fingerprint = CE3C 7E01 6782 30A3 5B87 87C0 BB86 505C 6B2A CFF9
More information about the bazaar
mailing list