largefiles: don't unnecessarily sort merge action lists
authorMartin von Zweigbergk <martinvonz@google.com>
Mon, 08 Dec 2014 15:20:42 -0800
changeset 23527 e61de5556b73
parent 23526 a5887f2da5e6
child 23528 5a6d85bae97f
largefiles: don't unnecessarily sort merge action lists The action lists returned from calculateupdates() (in merge.py) are not required to be sorted. In fact, since they result from iteration over the unordered manifest, they are unlikely to be sorted. Moreover, some of the lists are appended to after they are returned from manifestmerge(). The lists are instead sorted in applyupdates(). Therefore, let's not sort the lists generated in largefiles' overridecalculateupdates().
hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py	Tue Dec 09 16:49:55 2014 -0800
+++ b/hgext/largefiles/overrides.py	Mon Dec 08 15:20:42 2014 -0800
@@ -476,10 +476,8 @@
         else:
             newglist.append(action)
 
-    newglist.sort()
     actions['g'] = newglist
     if lfmr:
-        lfmr.sort()
         actions['lfmr'] = lfmr
 
     return actions, diverge, renamedelete