changeset 2635:9ab35c37b85a

obslog: pass directly unfiltered_repo _debugobshistorydisplaynode used to create two times an unfiltered repo, makes _debugobshistoryrevs create only one unfiltered repo and pass it directly.
author Boris Feld <boris.feld@octobus.net>
date Mon, 19 Jun 2017 15:56:28 +0200
parents 36743bbdae7f
children a788967aa800
files hgext3rd/evolve/obshistory.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/obshistory.py	Mon Jun 19 15:54:55 2017 +0200
+++ b/hgext3rd/evolve/obshistory.py	Mon Jun 19 15:56:28 2017 +0200
@@ -286,6 +286,7 @@
     precursors = repo.obsstore.precursors
     successors = repo.obsstore.successors
     nodec = repo.changelog.node
+    unfi = repo.unfiltered()
     nodes = [nodec(r) for r in revs]
 
     seen = set(nodes)
@@ -293,7 +294,7 @@
     while nodes:
         ctxnode = nodes.pop()
 
-        _debugobshistorydisplaynode(fm, repo, ctxnode)
+        _debugobshistorydisplaynode(fm, unfi, ctxnode)
 
         succs = successors.get(ctxnode, ())
 
@@ -310,8 +311,8 @@
                 nodes.append(p[0])
 
 def _debugobshistorydisplaynode(fm, repo, node):
-    if node in repo.unfiltered():
-        _debugobshistorydisplayctx(fm, repo.unfiltered()[node])
+    if node in repo:
+        _debugobshistorydisplayctx(fm, repo[node])
     else:
         _debugobshistorydisplaymissingctx(fm, node)