Patchwork D8149: drawdag: abide by new createmarkers() API

login
register
mail settings
Submitter phabricator
Date Feb. 25, 2020, 8:53 p.m.
Message ID <differential-rev-PHID-DREV-ooverz3t52ycpkp6gmak-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/45317/
State Superseded
Headers show

Comments

phabricator - Feb. 25, 2020, 8:53 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  The `obsolete.createmarkers()` API was changed in 6335c0de80fa <https://phab.mercurial-scm.org/rHG6335c0de80faf4b4c951e3eafa7157c5a9625aa0>
  (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.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D8149

AFFECTED FILES
  tests/drawdag.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/drawdag.py b/tests/drawdag.py
--- a/tests/drawdag.py
+++ b/tests/drawdag.py
@@ -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)