[PATCH] Fix the path problem on Windows that prevents to run hg from its own repository

Matt Mackall mpm at selenic.com
Fri Jul 1 17:02:24 CDT 2005


On Fri, Jul 01, 2005 at 06:17:18PM +0200, Giuseppe Bilotta wrote:
> The attached patch solves the path problem that prevents to run hg
> from its own repository. Under Windows, under normal circumstances,
> the current path is searched before the site-lib path. Therefore, when
> running a properly-installed hg from a repository containing a
> directory named 'mercurial', hg will fail in various way. The solution
> is to move the current path to the end of the module look-up path.
> This is only done if the current path is present already.

This is still slightly problematic.

What if you're running Mercurial out of its working directory? I think
you need to go a step further and not do this unless
os.path.dirname(__file__) != os.getcwd(). 

What do other Windows folks think about this? Is it necessary?

-- 
Mathematics is the supreme nostalgia of our time.


More information about the Mercurial mailing list