D1776: bundlerepo: use named attributes on revlog index entries

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Wed Dec 27 00:36:27 UTC 2017


indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1776

AFFECTED FILES
  mercurial/bundlerepo.py

CHANGE DETAILS

diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py
--- a/mercurial/bundlerepo.py
+++ b/mercurial/bundlerepo.py
@@ -99,7 +99,7 @@
         """return or calculate a delta between two revisions"""
         if rev1 > self.repotiprev and rev2 > self.repotiprev:
             # hot path for bundle
-            revb = self.index[rev2][3]
+            revb = self.index[rev2].baserev
             if revb == rev1:
                 return self._chunk(rev2)
         elif rev1 <= self.repotiprev and rev2 <= self.repotiprev:
@@ -131,7 +131,7 @@
                 rawtext = self._cache[2]
                 break
             chain.append(iterrev)
-            iterrev = self.index[iterrev][3]
+            iterrev = self.index[iterrev].baserev
         if rawtext is None:
             rawtext = self.baserevision(iterrev)
 



To: indygreg, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list