mercurial/patch.py
changeset 6762 f67d1468ac50
parent 6760 4faaa0535ea7
child 6792 b2c4be19d7b1
--- a/mercurial/patch.py	Fri Jun 27 14:53:30 2008 -0500
+++ b/mercurial/patch.py	Fri Jun 27 18:28:45 2008 -0500
@@ -1094,8 +1094,7 @@
         repo.copy(src, dst)
     removes = removes.keys()
     if removes:
-        removes.sort()
-        repo.remove(removes, True)
+        repo.remove(util.sort(removes), True)
     for f in patches:
         ctype, gp = patches[f]
         if gp and gp.mode:
@@ -1113,9 +1112,7 @@
     cmdutil.addremove(repo, cfiles)
     files = patches.keys()
     files.extend([r for r in removes if r not in files])
-    files.sort()
-
-    return files
+    return util.sort(files)
 
 def b85diff(to, tn):
     '''print base85-encoded binary diff'''
@@ -1208,13 +1205,10 @@
         for k, v in copy.items():
             copy[v] = k
 
-    all = modified + added + removed
-    all.sort()
     gone = {}
-
     gitmode = {'l': '120000', 'x': '100755', '': '100644'}
 
-    for f in all:
+    for f in util.sort(modified + added + removed):
         to = None
         tn = None
         dodiff = True