hgext/bugzilla.py
changeset 16683 525fdb738975
parent 16649 822e75386c16
child 16743 38caf405d010
equal deleted inserted replaced
16676:654b9e1966f7 16683:525fdb738975
   414         self.ui.status(_('telling bugzilla to send mail:\n'))
   414         self.ui.status(_('telling bugzilla to send mail:\n'))
   415         (user, userid) = self.get_bugzilla_user(committer)
   415         (user, userid) = self.get_bugzilla_user(committer)
   416         for id in bugs.keys():
   416         for id in bugs.keys():
   417             self.ui.status(_('  bug %s\n') % id)
   417             self.ui.status(_('  bug %s\n') % id)
   418             cmdfmt = self.ui.config('bugzilla', 'notify', self.default_notify)
   418             cmdfmt = self.ui.config('bugzilla', 'notify', self.default_notify)
   419             bzdir = self.ui.config('bugzilla', 'bzdir', '/var/www/html/bugzilla')
   419             bzdir = self.ui.config('bugzilla', 'bzdir',
       
   420                                    '/var/www/html/bugzilla')
   420             try:
   421             try:
   421                 # Backwards-compatible with old notify string, which
   422                 # Backwards-compatible with old notify string, which
   422                 # took one string. This will throw with a new format
   423                 # took one string. This will throw with a new format
   423                 # string.
   424                 # string.
   424                 cmd = cmdfmt % id
   425                 cmd = cmdfmt % id
   466                     raise util.Abort(_('cannot find bugzilla user id for %s') %
   467                     raise util.Abort(_('cannot find bugzilla user id for %s') %
   467                                      user)
   468                                      user)
   468                 userid = self.get_user_id(defaultuser)
   469                 userid = self.get_user_id(defaultuser)
   469                 user = defaultuser
   470                 user = defaultuser
   470             except KeyError:
   471             except KeyError:
   471                 raise util.Abort(_('cannot find bugzilla user id for %s or %s') %
   472                 raise util.Abort(_('cannot find bugzilla user id for %s or %s')
   472                                  (user, defaultuser))
   473                                  % (user, defaultuser))
   473         return (user, userid)
   474         return (user, userid)
   474 
   475 
   475     def updatebug(self, bugid, newstate, text, committer):
   476     def updatebug(self, bugid, newstate, text, committer):
   476         '''update bug state with comment text.
   477         '''update bug state with comment text.
   477 
   478