Mercurial > public > mercurial-scm > hg-stable
diff hgext/convert/cvsps.py @ 8209:a1a5a57efe90
replace util.sort with sorted built-in
This is marginally faster for small and moderately-sized lists
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 26 Apr 2009 16:50:44 -0500 |
parents | 4e5bd9b97bb3 |
children | 46293a0c7e9f |
line wrap: on
line diff
--- a/hgext/convert/cvsps.py Sun Apr 26 16:50:44 2009 -0500 +++ b/hgext/convert/cvsps.py Sun Apr 26 16:50:44 2009 -0500 @@ -383,7 +383,7 @@ if store: # clean up the results and save in the log. store = False - e.tags = util.sort([scache(x) for x in tags.get(e.revision, [])]) + e.tags = sorted([scache(x) for x in tags.get(e.revision, [])]) e.comment = scache('\n'.join(e.comment)) revn = len(e.revision) @@ -576,7 +576,7 @@ for tag in e.tags: tags[tag] = True # remember tags only if this is the latest changeset to have it - c.tags = util.sort([tag for tag in tags if globaltags[tag] is c]) + c.tags = sorted([tag for tag in tags if globaltags[tag] is c]) # Find parent changesets, handle {{mergetobranch BRANCHNAME}} # by inserting dummy changesets with two parents, and handle