diff contrib/perf.py @ 43526:e258ad110488

revlog: no longer return the nodemap after parsing Now that both pure and cext version have a `nodemap` attribute, we do not need to return the `nodemap` object after parsing. This work is part of a refactoring to unify the revlog index and the nodemap. This unification prepare the use of a persistent nodemap. Differential Revision: https://phab.mercurial-scm.org/D7314
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 06 Nov 2019 14:13:19 +0100
parents 9f70512ae2cf
children 43424f03d9a4
line wrap: on
line diff
--- a/contrib/perf.py	Wed Nov 06 14:13:19 2019 +0100
+++ b/contrib/perf.py	Wed Nov 06 14:13:19 2019 +0100
@@ -2592,7 +2592,7 @@
                 index[rev]
 
     def resolvenode(node):
-        nodemap = revlogio.parseindex(data, inline)[1]
+        nodemap = getattr(revlogio.parseindex(data, inline)[0], 'nodemap', None)
         # This only works for the C code.
         if nodemap is None:
             return
@@ -2603,7 +2603,7 @@
             pass
 
     def resolvenodes(nodes, count=1):
-        nodemap = revlogio.parseindex(data, inline)[1]
+        nodemap = getattr(revlogio.parseindex(data, inline)[0], 'nodemap', None)
         if nodemap is None:
             return