Patchwork D1777: upgrade: 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-rhgyfn7abq3xz3d72t7o-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/26463/
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/D1777

AFFECTED FILES
  mercurial/upgrade.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/upgrade.py b/mercurial/upgrade.py
--- a/mercurial/upgrade.py
+++ b/mercurial/upgrade.py
@@ -465,8 +465,8 @@ 
         idx = rl.index
         for rev in rl:
             e = idx[rev]
-            datasize += e[1]
-            rawsize += e[2]
+            datasize += e.chunklength
+            rawsize += e.rawlength
 
         srcsize += datasize
         srcrawsize += rawsize
@@ -552,7 +552,7 @@ 
         datasize = 0
         idx = newrl.index
         for rev in newrl:
-            datasize += idx[rev][1]
+            datasize += idx[rev].chunklength
 
         dstsize += datasize