[PATCH] Minimal fix for non-py2exe config search path
Stephen Darnell
stephen at darnell.plus.com
Mon May 15 15:55:11 CDT 2006
Vadim wrote:
>> Please let me know what your preference is - or alter the patch and
>> submit something similar.
>
> please look at recent changes to config code in crew,
> and tell if you think they are okay yet.
Just pulled crew, but the code is essentiall the same,
that is system_rcpath_win32() is called even if we're
not using a py2exe'd executable. In this case the path
returned is where python.exe is located, which isn't
what was intended - at least I don't think so.
Whilst looking for mercurial.ini in c:\Python24\ is unlikely
it isn't ideal, and stops the process from looking in
c:\mercurial\mercurial.ini.
I notice that templater.py uses __file__ (of templater.py)
or sys.executable. Not sure if on windows py2exe sys.executable
is always the full path or not - if it is, system_rcpath_win32()
could be implemented in without util_win32.py.
Apart from the question of backwards compatability I think I'm
most comfortable if we use __file__/sys.executable
in util.py and effectively store the config in
C:\Python24\lib\site-packages\mercurial\mercurial.ini
or wherever mercurial is installed.
How does that sound? (if OK, I'll prepare a patch)
Regards,
Stephen
More information about the Mercurial
mailing list