Patchwork D1776: bundlerepo: use named attributes on revlog index entries

login
register
mail settings
Submitter phabricator
Date Dec. 27, 2017, 12:36 a.m.
Message ID <differential-rev-PHID-DREV-az4dcvo3fqzc7da676i4-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/26462/
State New
Headers show

Comments

phabricator - Dec. 27, 2017, 12:36 a.m.
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




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

Patch

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)