##// END OF EJS Templates
histedit: max(x, key=y) and min(x, key=y) are not available in python 2.4...
Thomas Arendsen Hein -
r17769:8672e615 default
parent child Browse files
Show More
@@ -701,14 +701,14 b' def processreplacement(repo, replacement'
701
701
702 # computed topmost element (necessary for bookmark)
702 # computed topmost element (necessary for bookmark)
703 if new:
703 if new:
704 newtopmost = max(new, key=repo.changelog.rev)
704 newtopmost = sorted(new, key=repo.changelog.rev)[-1]
705 elif not final:
705 elif not final:
706 # Nothing rewritten at all. we won't need `newtopmost`
706 # Nothing rewritten at all. we won't need `newtopmost`
707 # It is the same as `oldtopmost` and `processreplacement` know it
707 # It is the same as `oldtopmost` and `processreplacement` know it
708 newtopmost = None
708 newtopmost = None
709 else:
709 else:
710 # every body died. The newtopmost is the parent of the root.
710 # every body died. The newtopmost is the parent of the root.
711 newtopmost = repo[min(final, key=repo.changelog.rev)].p1().node()
711 newtopmost = repo[sorted(final, key=repo.changelog.rev)[0]].p1().node()
712
712
713 return final, tmpnodes, new, newtopmost
713 return final, tmpnodes, new, newtopmost
714
714
General Comments 0
You need to be logged in to leave comments. Login now