Small patch to keyword extension ('module' object has no attribute '_parse')
Christian Ebert
blacktrash at gmx.net
Tue Nov 6 03:58:13 CST 2007
Hi Marcin,
I mailed you personally, but perhaps the message got spam
trapped.
* Marcin Kasperski on Monday, November 05, 2007 at 19:34:42 +0100
>> Are you sure your version is not outdated?
>
> Well, I cloned it just before installing and trying... Newest change
> is:
>
> changeset: 287:62eff490c844
> user: Christian Ebert <blacktrash at gmx.net>
> date: Mon Oct 29 10:55:41 2007 +0100
> summary: Add convert to nokwcommands (fix issue802)
Ok.
>> But looking at the traceback, I believe you can (and should) try
>> the non-backwards compatible version from:
>> <http://www.blacktrash.org/hg/hg-crew-keyword/>
>
> Considering this patch works for me I will stay with it for now.
> I can't imagine it doing anything wrong ;-)
No. I had something similar to your patch first, but had to split
the errors up for backwards compatibility.
In case you were using a recent Mercurial version I recommended
you the extension without the backwards compatibility overhead.
> BTW, I found what is going wrong - there is simple name conflict here.
> See yourself:
Thanks a lot for debugging this.
[...]
> b) If you load system libraries, it is not quite so. Here some module
> loads system dispatch module which does not offer what we want.
I have no such module here.
[...]
> (/var/lib/python-support/python2.4/dispatch/ is a directory installed
> by python-dispatch package,
> http://packages.debian.org/stable/python/python-dispatch)
Seems to debian specific.
Could you do me a favor and test the following patch instead of
yours?
TIA
c
# HG changeset patch
# User Christian Ebert <blacktrash at gmx.net>
# Date 1194339560 -3600
# Node ID efa96c43486076d5e338ab7af790b554e7d28edc
# Parent 62eff490c844015812000397c3ccb0164ab07416
Avoid name conflict with debian's python-dispatch package
diff -r 62eff490c844 -r efa96c434860 hgkw/keyword.py
--- a/hgkw/keyword.py Mon Oct 29 10:55:41 2007 +0100
+++ b/hgkw/keyword.py Tue Nov 06 09:59:20 2007 +0100
@@ -89,8 +89,8 @@ import getopt, os.path, re, shutil, sys,
try:
# cmdutil.parse moves to dispatch._parse in 18a9fbb5cd78
- from mercurial import dispatch
- _parse = dispatch._parse
+ # also avoid name conflict debian python-dispatch package
+ from mercurial.dispatch import _parse
except ImportError:
try:
# commands.parse moves to cmdutil.parse in 0c61124ad877
More information about the Mercurial
mailing list