Another Mercurial - Bugzilla Extension Setup Question
Melissa Mann
melissa.mann at pluribusnetworks.com
Thu Apr 25 20:52:13 UTC 2013
After looking into this a bit further, it looks like I have an old copy
of the bugzilla.py file.
Question 1: what's the best way to get the patched version of bugzilla.py?
I "cheated" and created a more recent bugzilla.py by using the code here:
http://fossies.org/linux/misc/mercurial-2.5.4.tar.gz:a/mercurial-2.5.4/hgext/bugzilla.py
When I try to push, I'm getting this error:
error: incoming.bugzilla hook failed: Bugzilla error: 'module' object
has no attribute 'safehasattr'
I'm running Mercurial on opensolaris; here's the versioning info for the
mercurial package that's installed:
Version: 1.3.1
Build Release: 5.11
Branch: 0.134
Packaging Date: March 2, 2010 01:52:02 AM
Size: 3.64 MB
FMRI:
pkg://opensolaris.org/developer/versioning/mercurial@1.3.1,5.11-0.134:20100302T015202Z
More Questions:
- Which version of Mercurial is compatible with the updated bugzilla.py
that supports xmlrpc?
- I don't see any mercurial packages available for download. Would I
need to build the source, or is there a secret stash of packages I don't
know about?
Thanks again!
- Melissa
On 04/25/13 12:25 PM, Melissa Mann wrote:
> 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?
>
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial
More information about the Mercurial
mailing list