##// END OF EJS Templates
cleanupnodes: preserve phase of parents of new nodes...
Martin von Zweigbergk -
r38451:05b7dd11 default
parent child Browse files
Show More
@@ -842,13 +842,13 b' def cleanupnodes(repo, replacements, ope'
842 return newphases.get(ctx.node(), ctx.phase())
842 return newphases.get(ctx.node(), ctx.phase())
843 for newnode in allnewnodes:
843 for newnode in allnewnodes:
844 ctx = unfi[newnode]
844 ctx = unfi[newnode]
845 parentphase = max(phase(p) for p in ctx.parents())
845 if targetphase is None:
846 if targetphase is None:
846 oldphase = max(unfi[oldnode].phase()
847 oldphase = max(unfi[oldnode].phase()
847 for oldnode in precursors[newnode])
848 for oldnode in precursors[newnode])
848 parentphase = max(phase(p) for p in ctx.parents())
849 newphase = max(oldphase, parentphase)
849 newphase = max(oldphase, parentphase)
850 else:
850 else:
851 newphase = targetphase
851 newphase = max(targetphase, parentphase)
852 newphases[newnode] = newphase
852 newphases[newnode] = newphase
853 if newphase > ctx.phase():
853 if newphase > ctx.phase():
854 toretract.setdefault(newphase, []).append(newnode)
854 toretract.setdefault(newphase, []).append(newnode)
General Comments 0
You need to be logged in to leave comments. Login now