mercurial/scmutil.py
changeset 39890 1c3f1491965f
parent 39836 f1d6021453c2
child 39891 b99903534e06
equal deleted inserted replaced
39889:d9ba836fc234 39890:1c3f1491965f
   966             # some obsstore logic.
   966             # some obsstore logic.
   967             # NOTE: the filtering and sorting might belong to createmarkers.
   967             # NOTE: the filtering and sorting might belong to createmarkers.
   968             isobs = unfi.obsstore.successors.__contains__
   968             isobs = unfi.obsstore.successors.__contains__
   969             torev = unfi.changelog.rev
   969             torev = unfi.changelog.rev
   970             sortfunc = lambda ns: torev(ns[0])
   970             sortfunc = lambda ns: torev(ns[0])
   971             rels = [(unfi[n], tuple(unfi[m] for m in s))
   971             rels = []
   972                     for n, s in sorted(replacements.items(), key=sortfunc)
   972             for n, s in sorted(replacements.items(), key=sortfunc):
   973                     if s or not isobs(n)]
   973                 if s or not isobs(n):
       
   974                     rel = (unfi[n], tuple(unfi[m] for m in s))
       
   975                     rels.append(rel)
   974             if rels:
   976             if rels:
   975                 obsolete.createmarkers(repo, rels, operation=operation,
   977                 obsolete.createmarkers(repo, rels, operation=operation,
   976                                        metadata=metadata)
   978                                        metadata=metadata)
   977         else:
   979         else:
   978             from . import repair # avoid import cycle
   980             from . import repair # avoid import cycle