Patchwork [12,of,13] cleanupnodes: pass multiple predecessors to `createmarkers` directly

login
register
mail settings
Submitter Boris Feld
Date Sept. 27, 2018, 5:08 p.m.
Message ID <bd762ec24f1858bc577b.1538068124@localhost.localdomain>
Download mbox | patch
Permalink /patch/35150/
State Accepted
Headers show

Comments

Boris Feld - Sept. 27, 2018, 5:08 p.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1538042792 -7200
#      Thu Sep 27 12:06:32 2018 +0200
# Node ID bd762ec24f1858bc577b05de0388688a7756f6ba
# Parent  84585c803b4156717b397e3753fc59e9dc3785d8
# EXP-Topic trackfold
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r bd762ec24f18
cleanupnodes: pass multiple predecessors to `createmarkers` directly

Patch

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -982,9 +982,8 @@  def cleanupnodes(repo, replacements, ope
             sortfunc = lambda ns: torev(ns[0][0])
             rels = []
             for ns, s in sorted(replacements.items(), key=sortfunc):
-                for n in ns:
-                    rel = (unfi[n], tuple(unfi[m] for m in s))
-                    rels.append(rel)
+                rel = (tuple(unfi[n] for n in ns), tuple(unfi[m] for m in s))
+                rels.append(rel)
             if rels:
                 obsolete.createmarkers(repo, rels, operation=operation,
                                        metadata=metadata)