Commits

Augie Fackler committed cb6db96

Use key instead of cmp in sorted()

Comments (0)

Files changed (1)

     if not keep:
         ui.debug('should strip replaced nodes %s\n' %
                  ', '.join([node.hex(n)[:12] for n in replaced]))
-        for n in sorted(replaced, lambda x, y: cmp(repo[x].rev(), repo[y].rev())):
+        for n in sorted(replaced, key=lambda x: repo[x].rev()):
             try:
                 repair.strip(ui, repo, n)
             except error.LookupError: