obslog: pass directly unfiltered_repo
authorBoris Feld <boris.feld@octobus.net>
Mon, 19 Jun 2017 15:56:28 +0200
changeset 2635 9ab35c37b85a
parent 2634 36743bbdae7f
child 2636 a788967aa800
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.
hgext3rd/evolve/obshistory.py
--- 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)