# HG changeset patch # User Martin Geisler # Date 1230686656 21600 # Node ID fdc249cd1a0aa9ef8cabe96c6bee7494bb993982 # Parent 7a58ff3502b760d084bfcc5438a72f0e17dd560c Combine sort and reverse. diff --git a/fetch_command.py b/fetch_command.py --- a/fetch_command.py +++ b/fetch_command.py @@ -360,8 +360,7 @@ def makecopyfinder(r, branchpath, rootdi source = e.copyfrom_path[len(fullbranchpath):] copies.append((dest, (source, e.copyfrom_rev))) - copies.sort() - copies.reverse() + copies.sort(reverse=True) exactcopies = dict(copies) def finder(path): diff --git a/push_cmd.py b/push_cmd.py --- a/push_cmd.py +++ b/push_cmd.py @@ -212,8 +212,7 @@ def commit_from_rev(ui, repo, rev_ctx, h # Now we are done with files, we can prune deleted directories # against themselves: ignore a/b if a/ is already removed deleteddirs2 = list(deleteddirs) - deleteddirs2.sort() - deleteddirs2.reverse() + deleteddirs2.sort(reverse=True) for d in deleteddirs2: pos = d.rfind('/') if pos >= 0 and d[:pos] in deleteddirs: