D6565: drawdag: don't crash when writing copy info to changesets
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Fri Jun 21 17:01:51 UTC 2019
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
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.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D6565
AFFECTED FILES
tests/drawdag.py
CHANGE DETAILS
diff --git a/tests/drawdag.py b/tests/drawdag.py
--- a/tests/drawdag.py
+++ b/tests/drawdag.py
@@ -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())
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list