hgext/bugzilla.py
changeset 10282 08a0f04b56bd
parent 10263 25e572394f5c
child 10292 ea7a14ca118a
equal deleted inserted replaced
10281:e7d3b509af8b 10282:08a0f04b56bd
   295 class bugzilla_2_18(bugzilla_2_16):
   295 class bugzilla_2_18(bugzilla_2_16):
   296     '''support for bugzilla 2.18 series.'''
   296     '''support for bugzilla 2.18 series.'''
   297 
   297 
   298     def __init__(self, ui):
   298     def __init__(self, ui):
   299         bugzilla_2_16.__init__(self, ui)
   299         bugzilla_2_16.__init__(self, ui)
   300         self.default_notify = "cd %(bzdir)s && perl -T contrib/sendbugmail.pl %(id)s %(user)s"
   300         self.default_notify = \
       
   301             "cd %(bzdir)s && perl -T contrib/sendbugmail.pl %(id)s %(user)s"
   301 
   302 
   302 class bugzilla_3_0(bugzilla_2_18):
   303 class bugzilla_3_0(bugzilla_2_18):
   303     '''support for bugzilla 3.0 series.'''
   304     '''support for bugzilla 3.0 series.'''
   304 
   305 
   305     def __init__(self, ui):
   306     def __init__(self, ui):
   367             m = bugzilla._bug_re.search(ctx.description(), start)
   368             m = bugzilla._bug_re.search(ctx.description(), start)
   368             if not m:
   369             if not m:
   369                 break
   370                 break
   370             start = m.end()
   371             start = m.end()
   371             for id in bugzilla._split_re.split(m.group(1)):
   372             for id in bugzilla._split_re.split(m.group(1)):
   372                 if not id: continue
   373                 if not id:
       
   374                     continue
   373                 ids.add(int(id))
   375                 ids.add(int(id))
   374         if ids:
   376         if ids:
   375             ids = self.filter_real_bug_ids(ids)
   377             ids = self.filter_real_bug_ids(ids)
   376         if ids:
   378         if ids:
   377             ids = self.filter_unknown_bug_ids(ctx.node(), ids)
   379             ids = self.filter_unknown_bug_ids(ctx.node(), ids)
   387             root = util.pconvert(root)
   389             root = util.pconvert(root)
   388             while count > 0:
   390             while count > 0:
   389                 c = root.find('/')
   391                 c = root.find('/')
   390                 if c == -1:
   392                 if c == -1:
   391                     break
   393                     break
   392                 root = root[c+1:]
   394                 root = root[c + 1:]
   393                 count -= 1
   395                 count -= 1
   394             return root
   396             return root
   395 
   397 
   396         mapfile = self.ui.config('bugzilla', 'style')
   398         mapfile = self.ui.config('bugzilla', 'style')
   397         tmpl = self.ui.config('bugzilla', 'template')
   399         tmpl = self.ui.config('bugzilla', 'template')