Patchwork D1774: repoview: 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-x6l2sanwr6lsgy7uygus-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/26458/
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.

REVISION SUMMARY
  We want to remove __getitem__ support from index entries. Port
  a usage in repoview.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/repoview.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/repoview.py b/mercurial/repoview.py
--- a/mercurial/repoview.py
+++ b/mercurial/repoview.py
@@ -205,7 +205,7 @@ 
         # bypass call to changelog.method
         unfiindex = unfichangelog.index
         unfilen = len(unfiindex) - 1
-        unfinode = unfiindex[unfilen - 1][7]
+        unfinode = unfiindex[unfilen - 1].node
 
         revs = filterrevs(unfi, self.filtername)
         cl = self._clcache