Using extensions that are not bundled with Mercurial on Windows
Steve Borho
steve at borho.org
Sun Dec 27 11:08:07 CST 2009
On Sun, Dec 27, 2009 at 8:10 AM, Stanimir Stamenkov <s7an10 at netscape.net> wrote:
> This might have been discussed before but I haven't been able to
> find specific answers.
>
> I'm using a pre-compiled binary Mercurial 1.4.1 package [1] on
> Windows and I'm trying to use some of the extensions that are not
> bundled with Mercurial (aka provided by others) [2] for which I've
> installed ActivePython 2.5 [3]. The most simple ones seem to work
> (e.g. the info extension [4]) but I'm not able to use others I'm
> interested in like the activity [5] and tasks [6] extensions.
>
> Trying to use 'hg activity' I get:
>
> There are 13 changesets
> You need matplotlib in your python path for this program to work
> ** unknown exception encountered, details follow
> ** report bug details to http://mercurial.selenic.com/bts/
> ** or mercurial at selenic.com
> ** Mercurial Distributed SCM (version 1.4.1)
> ** Extensions loaded: extdiff, bookmarks, convert, graphlog, rebase,
> transplant, relink, activity, collapse, info
> Traceback (most recent call last):
> File "hg", line 36, in <module>
> File "mercurial\dispatch.pyo", line 16, in run
> File "mercurial\dispatch.pyo", line 30, in dispatch
> File "mercurial\dispatch.pyo", line 46, in _runcatch
> File "mercurial\dispatch.pyo", line 449, in _dispatch
> File "mercurial\dispatch.pyo", line 319, in runcommand
> File "mercurial\dispatch.pyo", line 500, in _runcommand
> File "mercurial\dispatch.pyo", line 454, in checkargs
> File "mercurial\dispatch.pyo", line 448, in <lambda>
> File "mercurial\util.pyo", line 386, in check
> File "Z:\Stanimir\Programs\hgext\activity.py", line 130, in activity
> draw_graph(options, dates_tab, tags)
> File "Z:\Stanimir\Programs\hgext\activity.py", line 259, in draw_graph
> exit(1)
> NameError: global name 'exit' is not defined
>
> I certainly have installed the matplotlib [7] and I can see its
> directory under "<python>\lib\site-packages".
>
> Configuring the tasks extensions in my hgrc file causes error
> similar to the following to happen issuing various commands like 'hg
> task mytask' or even 'hg log':
>
> ** unknown exception encountered, details follow
> ** report bug details to http://mercurial.selenic.com/bts/
> ** or mercurial at selenic.com
> ** Mercurial Distributed SCM (version 1.4.1)
> ** Extensions loaded: extdiff, bookmarks, convert, graphlog, rebase,
> transplant, relink, activity, collapse, info, tasks
> Traceback (most recent call last):
> File "hg", line 36, in <module>
> File "mercurial\dispatch.pyo", line 16, in run
> File "mercurial\dispatch.pyo", line 30, in dispatch
> File "mercurial\dispatch.pyo", line 46, in _runcatch
> File "mercurial\dispatch.pyo", line 449, in _dispatch
> File "mercurial\dispatch.pyo", line 319, in runcommand
> File "mercurial\dispatch.pyo", line 500, in _runcommand
> File "mercurial\dispatch.pyo", line 454, in checkargs
> File "mercurial\dispatch.pyo", line 448, in <lambda>
> File "mercurial\util.pyo", line 386, in check
> File "Z:\Stanimir\Programs\hgext\tasks.py", line 412, in task
> if (task in repo.tags() and not force):
> File "Z:\Stanimir\Programs\hgext\tasks.py", line 683, in tags
> if self.tagscache:
> AttributeError: 'task_repo' object has no attribute 'tagscache'
>
> Are there any issues one should be aware when trying to use
> third-party extensions on Windows (the way I'm trying)? Is it just
> an unhappy coincidence the given extensions don't work for me -
> either not compatible with the current (1.4.1) Mercurial version, or
> just with my software setup?
>
> [1] http://mercurial.selenic.com/wiki/Download#Windows
> [2] http://mercurial.selenic.com/wiki/CategoryExtensionsByOthers
> [3] https://www.activestate.com/activepython/downloads/
> [4] http://mercurial.selenic.com/wiki/InfoExtension
> [5] http://mercurial.selenic.com/wiki/ActivityExtension
> [6] http://mercurial.selenic.com/wiki/TasksExtension
> [7] http://matplotlib.sourceforge.net/
Binary packages will completely ignore other Python installations on
your machine. They hard-code the PYTHONPATH to only see Python files
in their packaged library.zip file. If your extension needs Python
modules which were not included in the binary package, you must edit
the extension and add those other system Python paths to sys.path.
http://bitbucket.org/tortoisehg/stable/wiki/FAQ#where-do-tortoisehg-extensions-look-for-external-python-modules-on-windows
--
Steve Borho
More information about the Mercurial
mailing list