histedit: max(x, key=y) and min(x, key=y) are not available in python 2.4
Use sorted(x, key=y)[-1] or sorted(x, key=y)[0] instead.
--- a/hgext/histedit.py Sat Oct 13 15:10:39 2012 -0500
+++ b/hgext/histedit.py Tue Oct 16 16:04:28 2012 +0200
@@ -701,14 +701,14 @@
# computed topmost element (necessary for bookmark)
if new:
- newtopmost = max(new, key=repo.changelog.rev)
+ newtopmost = sorted(new, key=repo.changelog.rev)[-1]
elif not final:
# Nothing rewritten at all. we won't need `newtopmost`
# It is the same as `oldtopmost` and `processreplacement` know it
newtopmost = None
else:
# every body died. The newtopmost is the parent of the root.
- newtopmost = repo[min(final, key=repo.changelog.rev)].p1().node()
+ newtopmost = repo[sorted(final, key=repo.changelog.rev)[0]].p1().node()
return final, tmpnodes, new, newtopmost