Mercurial > public > mercurial-scm > hg-stable
diff hgext/bugzilla.py @ 6762:f67d1468ac50
util: add sort helper
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 27 Jun 2008 18:28:45 -0500 |
parents | f6c00b17387c |
children | 6b1ece890f9a |
line wrap: on
line diff
--- a/hgext/bugzilla.py Fri Jun 27 14:53:30 2008 -0500 +++ b/hgext/bugzilla.py Fri Jun 27 18:28:45 2008 -0500 @@ -99,9 +99,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)) - ids = [c[0] for c in self.cursor.fetchall()] - ids.sort() - return ids + return util.sort([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.''' @@ -114,9 +112,7 @@ self.ui.status(_('bug %d already knows about changeset %s\n') % (id, short(node))) unknown.pop(id, None) - ids = unknown.keys() - ids.sort() - return ids + return util.sort(unknown.keys()) def notify(self, ids): '''tell bugzilla to send mail.'''