replace util.sort with sorted built-in stable
authorMatt Mackall <mpm@selenic.com>
Sun, 26 Apr 2009 16:50:44 -0500
branchstable
changeset 538 db71342ad29d
parent 536 af1cbe3a9141
child 539 c04db4a88523
child 540 e30c2a251010
replace util.sort with sorted built-in This is marginally faster for small and moderately-sized lists [ original upstream message ]
hgkw/keyword.py
--- a/hgkw/keyword.py	Sun Apr 26 14:29:02 2009 +0200
+++ b/hgkw/keyword.py	Sun Apr 26 16:50:44 2009 -0500
@@ -379,7 +379,7 @@
     kwt = kwtools['templater']
     status = _status(ui, repo, kwt, opts.get('untracked'), *pats, **opts)
     modified, added, removed, deleted, unknown, ignored, clean = status
-    files = util.sort(modified + added + clean + unknown)
+    files = sorted(modified + added + clean + unknown)
     wctx = repo[None]
     kwfiles = [f for f in files if kwt.iskwfile(f, wctx.flags)]
     cwd = pats and repo.getcwd() or ''