drawdag: abide by new createmarkers() API
authorMartin von Zweigbergk <martinvonz@google.com>
Tue, 25 Feb 2020 12:41:35 -0800
changeset 44380 dda2341d6664
parent 44379 ca82929e433d
child 44381 454bc51f114c
drawdag: abide by new createmarkers() API The `obsolete.createmarkers()` API was changed in 6335c0de80fa (obsolete: allow multiple predecessors in createmarkers, 2018-09-22) to prefer its precursors input to be a tuple instead of a single precursor. Let's fix `drawdag.py` to comply. Differential Revision: https://phab.mercurial-scm.org/D8149
tests/drawdag.py
--- a/tests/drawdag.py	Mon Feb 24 14:52:46 2020 -0500
+++ b/tests/drawdag.py	Tue Feb 25 12:41:35 2020 -0800
@@ -438,13 +438,13 @@
             if cmd in (b'replace', b'rebase', b'amend'):
                 nodes = [getctx(m) for m in arg.split(b'->')]
                 for i in range(len(nodes) - 1):
-                    rels.append((nodes[i], (nodes[i + 1],)))
+                    rels.append(((nodes[i],), (nodes[i + 1],)))
             elif cmd in (b'split',):
                 pre, succs = arg.split(b'->')
                 succs = succs.split(b',')
-                rels.append((getctx(pre), (getctx(s) for s in succs)))
+                rels.append(((getctx(pre),), (getctx(s) for s in succs)))
             elif cmd in (b'prune',):
                 for n in arg.split(b','):
-                    rels.append((getctx(n), ()))
+                    rels.append(((getctx(n),), ()))
             if rels:
                 obsolete.createmarkers(repo, rels, date=(0, 0), operation=cmd)