extensions storage location (Windows)

Steve Borho steve at borho.org
Mon Jan 18 16:16:35 CST 2010


On Mon, Jan 18, 2010 at 3:55 PM, Maris <maris.rob at vdi.de> wrote:
> In Windows, the python search path is apparently restricted to library.zip,
> which makes adding extensions a bit complicated, but more important: they
> are lost upon mercurial updates. This can be overcome by specifiying
> absolute paths in mercurial.ini, which is not that elegant, too.
> In Linux, however, the search path points to a normal directory.
>
> Am I missing some undocumented feature?

No, the recommended approach on Windows, when using a binary
installer, is to specify full paths to your local extensions in your
user Mercurial.ini file (found in your %USERPROFILE% folder).

There is an undocumented hack, which is to have an extension that adds
a directory to sys.path that you then place your extensions into.  But
you have to ensure this extension is loaded before any of those that
are stored in that path.

If you want the same PYTHONPATH features as Linux, you have to install
a Python interpreter on your Windows machine and then install
mercurial from source.  Not very difficult, but most users do not
bother.

--
Steve Borho


More information about the Mercurial mailing list