mercurial/scmutil.py
changeset 39890 1c3f1491965f
parent 39836 f1d6021453c2
child 39891 b99903534e06
--- a/mercurial/scmutil.py	Thu Sep 20 17:47:05 2018 +0200
+++ b/mercurial/scmutil.py	Thu Sep 27 13:54:37 2018 -0700
@@ -968,9 +968,11 @@
             isobs = unfi.obsstore.successors.__contains__
             torev = unfi.changelog.rev
             sortfunc = lambda ns: torev(ns[0])
-            rels = [(unfi[n], tuple(unfi[m] for m in s))
-                    for n, s in sorted(replacements.items(), key=sortfunc)
-                    if s or not isobs(n)]
+            rels = []
+            for n, s in sorted(replacements.items(), key=sortfunc):
+                if s or not isobs(n):
+                    rel = (unfi[n], tuple(unfi[m] for m in s))
+                    rels.append(rel)
             if rels:
                 obsolete.createmarkers(repo, rels, operation=operation,
                                        metadata=metadata)