hgext3rd/evolve/__init__.py
changeset 2349 521a18a10a06
parent 2342 e28026b4d3c1
child 2350 ea816b5c1cf6
--- a/hgext3rd/evolve/__init__.py	Thu May 11 17:00:55 2017 +0200
+++ b/hgext3rd/evolve/__init__.py	Fri May 12 11:39:41 2017 +0200
@@ -3288,14 +3288,19 @@
 
         markerfm = fm.nested("debugobshistory.markers")
         for successor in sorted(succs):
-            _debugobshistorydisplaymarker(ui, markerfm, repo, successor)
+            _debugobshistorydisplaymarker(markerfm, repo, successor)
         markerfm.end()
 
         precs = precursors.get(ctxnode, ())
         nodes.extend(precursor[0] for precursor in sorted(precs))
 
 def _debugobshistorydisplaynode(ui, fm, repo, node):
-    ctx = repo.unfiltered()[node]
+    if node in repo.unfiltered():
+        _debugobshistorydisplayctx(fm, repo.unfiltered()[node])
+    else:
+        _debugobshistorydisplaymissingctx(fm, node)
+
+def _debugobshistorydisplayctx(fm, ctx):
     shortdescription = ctx.description().splitlines()[0]
 
     fm.startitem()
@@ -3311,7 +3316,14 @@
              label="evolve.short_description")
     fm.plain('\n')
 
-def _debugobshistorydisplaymarker(ui, fm, repo, marker):
+def _debugobshistorydisplaymissingctx(fm, nodewithoutctx):
+    hexnode = node.short(nodewithoutctx)
+    fm.startitem()
+    fm.write('debugobshistory.node', '%s', hexnode,
+             label="evolve.short_node evolve.missing_change_ctx")
+    fm.plain('\n')
+
+def _debugobshistorydisplaymarker(fm, repo, marker):
     succnodes = marker[1]
     date = marker[4]
     metadata = dict(marker[3])