# HG changeset patch # User Thomas Arendsen Hein # Date 1350396268 -7200 # Node ID 8672e615d81ca419d6c25cc3e16c93089f321b2f # Parent 9837cafc25b10c51659b65b5971622eab0bc9197 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. diff -r 9837cafc25b1 -r 8672e615d81c hgext/histedit.py --- 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