Rev 3300: some small cleanups. in http://bzr.arbash-meinel.com/branches/bzr/1.4-dev/get_rev_id
John Arbash Meinel
john at arbash-meinel.com
Thu Mar 20 17:30:40 GMT 2008
At http://bzr.arbash-meinel.com/branches/bzr/1.4-dev/get_rev_id
------------------------------------------------------------
revno: 3300
revision-id: john at arbash-meinel.com-20080320172810-qqk69q0vc3lmop02
parent: john at arbash-meinel.com-20080320171926-0eyc8dohs0on591o
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: get_rev_id
timestamp: Thu 2008-03-20 12:28:10 -0500
message:
some small cleanups.
modified:
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
-------------- next part --------------
=== modified file 'bzrlib/branch.py'
--- a/bzrlib/branch.py 2008-03-20 17:19:26 +0000
+++ b/bzrlib/branch.py 2008-03-20 17:28:10 +0000
@@ -1809,8 +1809,8 @@
class BzrBranch6(BzrBranch5):
- def __init__(self, *ignored, **ignored_too):
- super(BzrBranch6, self).__init__(*ignored, **ignored_too)
+ def __init__(self, *args, **kwargs):
+ super(BzrBranch6, self).__init__(*args, **kwargs)
self._last_revision_info_cache = None
self._partial_revision_history_cache = None
@@ -2014,10 +2014,8 @@
distance = last_revno - revno
if self._partial_revision_history_cache:
- try:
+ if len(self._partial_revision_history_cache) > distance:
return self._partial_revision_history_cache[distance]
- except IndexError:
- pass
distance -= len(self._partial_revision_history_cache) - 1
revision_id = self._partial_revision_history_cache[-1]
else:
@@ -2026,6 +2024,8 @@
history_iter = self.repository.iter_reverse_revision_history(
revision_id)
+ # iter_reverse_revision_history returns the revision_id we passed in as
+ # the first node, so skip past it.
history_iter.next()
for i in xrange(distance):
try:
More information about the bazaar-commits
mailing list