Default mercurial.ini for Windows

Vadim Gelfer vadim.gelfer at gmail.com
Thu May 4 17:39:33 CDT 2006


On 5/4/06, Stephen Darnell <stephen at darnell.plus.com> wrote:

> def system_rcpath_win32():
>     '''return default os-specific hgrc search path'''
>     proc = win32api.GetCurrentProcess()
>     filename = win32process.GetModuleFileNameEx(proc, 0)
>     return [os.path.join(os.path.dirname(filename), 'mercurial.ini')]
>
> Is there a reason why sys.executable wouldn't do the same more portably?

i do not know why that code is like that. i moved it in there, but i
did not write it. i think it was lee cantey.

> I don't use the py2exe form on Windows, and the module filename is
> always c:\Python2.4\python.exe which results in the default
> mercurial.ini being located in c:\python2.4\mercurial.ini which I
> guess does no harm, but isn't documented and 'feels a bit odd'.

that is not intention, i think.

> Presumably there is a way to detect you're running from a py2exe'd version?

yes. is documented somewhere.

> Alternatively, should we make the default for all platforms
> to be look in the python directory?

no. looking in there is wrong. maybe ok for py2exe, but not anything else.

> I'd also suggest a new command or derivative of an existing command that can
> display information about the version being run, e.g.:
>  version, hgrc files/locations, key settings (such as username, editor,
> diff)
>  where modules are loaded from/installed
>  key supported features that might be platform specific (e.g. hardlinks,
> case sesitivity)
>  installed extensions
>  repository format in use (revlogng vers?)
>  repository source(s) (e.g. default path)
> This sort of thing is useful for debugging someone's setup.

good idea.

> My proposal is to ditch "hg paths"+"hg version" and replace it with a "hg info"

i do not know if this is so good idea.



More information about the Mercurial mailing list