drawdag: don't crash when writing copy info to changesets
authorMartin von Zweigbergk <martinvonz@google.com>
Fri, 21 Jun 2019 09:33:57 -0700
changeset 42513 15f04d652b62
parent 42512 84aff7e20c55
child 42514 e7c55e24d6bf
drawdag: don't crash when writing copy info to changesets When writing copies to the changeset, localrepo.commitctx() will call ctx.p1copies() and ctx.p2copies(). These crashed on simplecommitctx because they ended up trying to access the manifest. drawdag doesn't support copies at all, so we can simply override the methods to return empty dicts. Differential Revision: https://phab.mercurial-scm.org/D6565
tests/drawdag.py
--- a/tests/drawdag.py	Fri Jun 21 23:35:04 2019 -0700
+++ b/tests/drawdag.py	Fri Jun 21 09:33:57 2019 -0700
@@ -300,6 +300,12 @@
     def commit(self):
         return self._repo.commitctx(self)
 
+    def p1copies(self):
+        return {}
+
+    def p2copies(self):
+        return {}
+
 def _walkgraph(edges):
     """yield node, parents in topologically order"""
     visible = set(edges.keys())