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
--- 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())