comparison mercurial/scmutil.py @ 39923:61f39a892168

cleanupnodes: pass multiple predecessors to `createmarkers` directly
author Boris Feld <boris.feld@octobus.net>
date Thu, 27 Sep 2018 12:06:32 +0200
parents 1857f50a9643
children ca9d0c93acea
comparison
equal deleted inserted replaced
39922:6335c0de80fa 39923:61f39a892168
982 # NOTE: the filtering and sorting might belong to createmarkers. 982 # NOTE: the filtering and sorting might belong to createmarkers.
983 torev = unfi.changelog.rev 983 torev = unfi.changelog.rev
984 sortfunc = lambda ns: torev(ns[0][0]) 984 sortfunc = lambda ns: torev(ns[0][0])
985 rels = [] 985 rels = []
986 for ns, s in sorted(replacements.items(), key=sortfunc): 986 for ns, s in sorted(replacements.items(), key=sortfunc):
987 for n in ns: 987 rel = (tuple(unfi[n] for n in ns), tuple(unfi[m] for m in s))
988 rel = (unfi[n], tuple(unfi[m] for m in s)) 988 rels.append(rel)
989 rels.append(rel)
990 if rels: 989 if rels:
991 obsolete.createmarkers(repo, rels, operation=operation, 990 obsolete.createmarkers(repo, rels, operation=operation,
992 metadata=metadata) 991 metadata=metadata)
993 else: 992 else:
994 from . import repair # avoid import cycle 993 from . import repair # avoid import cycle