Mercurial > hg
diff hgext/bugzilla.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 | 1750510251d0 |
children | 46293a0c7e9f |
line wrap: on
line diff
--- a/hgext/bugzilla.py Sun Apr 26 16:50:44 2009 -0500 +++ b/hgext/bugzilla.py Sun Apr 26 16:50:44 2009 -0500 @@ -169,7 +169,7 @@ def filter_real_bug_ids(self, ids): '''filter not-existing bug ids from list.''' self.run('select bug_id from bugs where bug_id in %s' % buglist(ids)) - return util.sort([c[0] for c in self.cursor.fetchall()]) + return sorted([c[0] for c in self.cursor.fetchall()]) def filter_unknown_bug_ids(self, node, ids): '''filter bug ids from list that already refer to this changeset.''' @@ -182,7 +182,7 @@ self.ui.status(_('bug %d already knows about changeset %s\n') % (id, short(node))) unknown.discard(id) - return util.sort(unknown) + return sorted(unknown) def notify(self, ids, committer): '''tell bugzilla to send mail.'''