Another Mercurial - Bugzilla Extension Setup Question

Melissa Mann melissa.mann at pluribusnetworks.com
Thu Apr 25 19:25:39 UTC 2013


Jim,

Thank you so much for your help!

I'm a little embarrassed to admit that I was using the hgrc file in my 
local directory rather than the repo directory.  I've fixed that and 
taken out the line for the regexp.  When I push, it's triggering the 
bugzilla extension, but now I get this error message:

incoming.bugzilla hook failed: bugzilla version xmlrpc not supported

Any tips for trouble shooting this would be much appreciated!

Thanks again!

- Melissa

On 04/25/13 06:34 AM, Jim Hague wrote:
> On Wednesday 24 Apr 2013 03:54:45 mmann964 wrote:
>> I'm trying to setup the Bugzilla extension for Mercurial.  When I do a
>> commit, I don't see the Bugzilla hook being called.
>>
>> Here's my hgrc file:
>>
>> [extensions]
>> hgext.bugzilla =
>>
>> [hooks]
>> incoming.bugzilla = python:hgext.bugzilla.hook
> Can I just check - is this the .hg/hgrc in the repository on the server you
> are pushing to, or the .hg/hgrc in your local repository? The above needs to
> be in the repo you are pushing to.
>
> The rest of the configuration looks OK. I assume you have
>
> [web]
> baseurl=
>
> defined somewhere.
>
> I put the [bugzilla] part of the configuration into
> /etc/mercurial/hgrc.d/hgbugzilla.rc, as I have several repos linked Bugzilla
> and that part of the configuration is common between them all.
>
> You won't see a report of the hook being called when you 'hg push', because
> the hook is being run on the remote end.
>
> The Bugzilla extension is intentionally not chatty. But it will report if
> anything goes wrong. So if the extension was being called, I'd expect to see
> either an error or success.
>
> However, if the regexp isn't matching, then the extension will keep silent.
> I've found that defining your own regexp is a bit of a minefield, and it can be
> tricky to get right. Can you try using the default built-in regexp? That will
> definitely match your sample commit message.
>
> In fact, I just tried your RE now, and it's not matching as you expect.
>
> $ python
> Python 2.7.3 (default, Mar  4 2013, 14:57:34)
> [GCC 4.7.2] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import re
>>>> bug_re=re.compile("Bug (?P<ids>\d+?)", re.IGNORECASE)
>>>> m = bug_re.search("Bug 719 test")
>>>> print m.group("ids")
> 7
>
> Is there anything interesting in Bug 7 in your Bugzilla?




More information about the Mercurial mailing list