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

Boris Feld boris.feld at octobus.net
Thu Sep 27 13:08:44 EDT 2018


# HG changeset patch
# User Boris Feld <boris.feld at 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

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)


More information about the Mercurial-devel mailing list