[PATCH] setup: get version number using pure Python modules
steve at borho.org
Thu Jan 29 15:41:25 CST 2009
On Thu, Jan 29, 2009 at 3:12 PM, Pascal Quantin
<pascal.quantin at gmail.com> wrote:
> your patch fails on my windows box (Win XP, python 2.5).
> The code os.path.join('.', 'hg') produces the following command line:
> .\hg id -it
> which returns nothing (empty string) as ".\hg" is an invalid command on windows.
> I propose to apply the following diff that should work for everybody:
> - cmd = '%s id -it' % os.path.join('.', 'hg')
> + if os.name == 'nt':
> + cmd = 'hg id -it'
> + else:
> + cmd = '%s id -it' % os.path.join('.', 'hg')
> I know it's more a workaround than a real fix, but at least it works for me. :)
Calling out to hg on Windows is a can of worms you don't want to open. Would it
be possible to call directly into that function in commands.py?
More information about the Mercurial-devel