hgext/bugzilla.py
changeset 6762 f67d1468ac50
parent 6747 f6c00b17387c
child 7019 6b1ece890f9a
equal deleted inserted replaced
6761:cb981fc955fb 6762:f67d1468ac50
    97             raise
    97             raise
    98 
    98 
    99     def filter_real_bug_ids(self, ids):
    99     def filter_real_bug_ids(self, ids):
   100         '''filter not-existing bug ids from list.'''
   100         '''filter not-existing bug ids from list.'''
   101         self.run('select bug_id from bugs where bug_id in %s' % buglist(ids))
   101         self.run('select bug_id from bugs where bug_id in %s' % buglist(ids))
   102         ids = [c[0] for c in self.cursor.fetchall()]
   102         return util.sort([c[0] for c in self.cursor.fetchall()])
   103         ids.sort()
       
   104         return ids
       
   105 
   103 
   106     def filter_unknown_bug_ids(self, node, ids):
   104     def filter_unknown_bug_ids(self, node, ids):
   107         '''filter bug ids from list that already refer to this changeset.'''
   105         '''filter bug ids from list that already refer to this changeset.'''
   108 
   106 
   109         self.run('''select bug_id from longdescs where
   107         self.run('''select bug_id from longdescs where
   112         unknown = dict.fromkeys(ids)
   110         unknown = dict.fromkeys(ids)
   113         for (id,) in self.cursor.fetchall():
   111         for (id,) in self.cursor.fetchall():
   114             self.ui.status(_('bug %d already knows about changeset %s\n') %
   112             self.ui.status(_('bug %d already knows about changeset %s\n') %
   115                            (id, short(node)))
   113                            (id, short(node)))
   116             unknown.pop(id, None)
   114             unknown.pop(id, None)
   117         ids = unknown.keys()
   115         return util.sort(unknown.keys())
   118         ids.sort()
       
   119         return ids
       
   120 
   116 
   121     def notify(self, ids):
   117     def notify(self, ids):
   122         '''tell bugzilla to send mail.'''
   118         '''tell bugzilla to send mail.'''
   123 
   119 
   124         self.ui.status(_('telling bugzilla to send mail:\n'))
   120         self.ui.status(_('telling bugzilla to send mail:\n'))