Not reading Mercurial.ini in Windows system
Bergquist, Jerome
Jerome.Bergquist at sage.com
Thu Oct 18 09:22:21 CDT 2007
Steve,
Yes, I did use your install script. I had emailed you then about the hg path
not being added during the install so I was not able to run hg.
I ran the commands you asked for (see below) and yes, the HGRCPATH was not
set correctly. I must have missed the HGRCPATH part when reading the setup
and configuration sections.
I updated the path and it is working now. What was throwing me off was that
commit found that .ini, in the list of directories that HGRC(5) says it
looks for, to write the username to even though it did not find it to read
from. I had run commit with different user names and they were updated in
the %USERPROFILE%\Mercurial.ini that I had created.
Thank you Steve again for your help !!
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
U:\>c:
C:\>hg version
Mercurial Distributed SCM (version 0.9.4)
Copyright (C) 2005-2007 Matt Mackall <mpm at selenic.com> and others
This is free software; see the source for copying conditions. There
is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
C:\>echo %HGRCPATH%
C:\Python25\mercurial\hgrc.d;U:\\mercurial.ini
C:\>hg showconfig ui.username
C:\>hg config -g ui.username
abort: There is no Mercurial repository here (.hg not found)!
C:\>cd \__W\jab
C:\__W\jab>hg config -g ui.username
Jerome Bergquist <jerome.bergquist at sage.com>
C:\__W\jab>set
HGRCPATH="Python25\mercurial\hgrc.d;%USERPROFILE%\Mercurial.ini
C:\__W\jab>echo %HGRCPATH%
"Python25\mercurial\hgrc.d;C:\Documents and
Settings\jbergquist\Mercurial.ini
C:\__W\jab>hg showconfig ui.username
Jerome Bergquist <jerome.bergquist at sage.com>
C:\__W\jab>
C:\__W\jab>vim test.txt
C:\__W\jab>hg stat
M test.txt
C:\__W\jab>hg commit -m "Another test"
C:\__W\jab>
- Jerome
-----Original Message-----
From: Steve Borho [mailto:steve at borho.org]
Sent: Wednesday, October 17, 2007 6:49 PM
To: Bergquist, Jerome
Cc: mercurial at selenic.com
Subject: Re: Not reading Mercurial.ini in Windows system
On Wed, 2007-10-17 at 17:45 -0400, Bergquist, Jerome wrote:
> I have been using Mercurial on my Linux system for some time and I
> love it!
>
> I have just loaded it on my Windows system and cloned some projects. I
> created the %USERPROFILE%\Mercurial.ini as outlined in the HGRC(5)
> page and copied my Linux .hgrc configurations to it but it does not
> appear that hg is reading that file.
>
> When I commit changes I get prompted for the user name. The user name
> I type in DOES get written back to the %USERPROFILE%\Mercurial.ini but
> is not read next time and I get prompted again. I also changed some of
> the default command flags to see if they get read and they do not
> either.
It sounds like you're using one of my windows packages. I've not seen any
problems like this before. It seems hg-config is finding your Mercurial.ini
but Mercurial itself is not. Could you reply with the output to these
commands?
hg version
echo %HGRCPATH%
hg showconfig ui.username
hg config -g ui.username
> I created a C:\Mercurial folder and copiet that Mercurial.ini into as
> well and that did not work either. I have tried saving the
> Mercurial.ini as a DOS (CR/LF terminated) and as a Unix (LF
> terminated) file but that did not make a difference either. Is there
> something I am missing?
None of these should make any difference. The problem is in the hgrc search
path.
Cheers,
--
Steve Borho (steve at borho.org)
http://www.borho.org/~steve/steve.asc
Key fingerprint = 2D08 E7CF B624 624C DE1F E2E4 B0C2 5292 F2C6 2C8C
More information about the Mercurial
mailing list