Problem installing the Mercurial extension

I am using Windows XP with Mercurial TortoiseHg installed. Now I need to install an external extension of activity . I downloaded the extension and included it in hgrc.

When I try to call it using the command:

hg activity

I get the following error:

There are 292 changesets
Hg activity options: you need matplotlib in your python path in order to use the hg activity extension.

Then I installed python 2.6 and matplotlib. So their paths are:

  • D: \ Python26 \
  • D: \ Python26 \ Lib \ site packages \ Matplotlib

Now I do not know how to say the expansion of mercury activity to use matplotlib from this location? I found some explanation in the TortoiseHg FAQ under the heading "Where do TortoiseHg extensions look for Python external modules in Windows?"

But when I do the steps that are written there, I get the same error message as above.

+5
2

, , .

import sys
sys.path.append(r'C:\Python26\Lib\site-packages')

. @http://bitbucket.org/tortoisehg/stable/src/cf4b3dfd15ee/contrib/hg

# enable importing on demand to reduce startup time
try:
    from mercurial import demandimport; demandimport.enable()
except ImportError:
    sys.stderr.write("abort: couldn't find mercurial libraries in [%s]\n" %
                     ' '.join(sys.path))
    sys.stderr.write("(check your install and PYTHONPATH)\n")
    sys.exit(-1)

(D:\Python26\Lib\site-packages) PYTHONPATH.

python TortoiseHg .

+1

, . python 2.7 hg

python Windows:

python -m pip install -U pip setuptools
python -m pip install matplotlib
python -m pip install mercurial

hgactivity

hg clone http://sources.freehackers.org/Hgactivity/

mercurial.ini:

[extensions]
activity = C:\Repos\Hgactivity\activity

:

C:\Python27\Scripts\hg activity --help

, .

0

All Articles