changeset 163:fdc249cd1a0a

Combine sort and reverse.
author Martin Geisler <mg@daimi.au.dk>
date Tue, 30 Dec 2008 19:24:16 -0600
parents 7a58ff3502b7
children 2a4b7a86af93
files fetch_command.py push_cmd.py
diffstat 2 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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):
--- 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: