hg diff/status <dir> problem

Johnny Stenback jst at mozilla.com
Thu Feb 22 17:06:46 UTC 2007


Hello Andrei,

Thanks for the suggestion, I tried that but there seems to be more to it 
than that.

I see this problem when I do:

E:\>hg init test
E:\>cd test
E:\test>mkdir foo
E:\test>echo 123 > foo\bar
E:\test>hg add .
adding foo\bar
E:\test>hg commit -m "Initial commit."
No username found, using ...
E:\test>echo 456 > foo\bar
E:\test>hg status
M foo\bar
E:\test>hg status foo\bar
M foo\bar
E:\test>hg status foo

Here hg status sees the change when I give it no directory argument, or 
when I point it at the exact file, but if I point it at the directory 
containing the changed file it doesn't notice the change at all.

If I cd into the directory with the changed file in it and do hg stat, 
it does see the file. I verified with both cmd, bash, and the windows 
explorer that all files and directories involved here are lower case, 
and all commands use only lower case arguments.

Andrei Vermel wrote:
> Check that the case of your paths is correct.
> This involves both the path you type and the current work dir.
> If you do 'cd repo\SuBdIr', then windows will think you are really in
> SuBdIr, regardless of the actual case of the subdir on disk,
> and will deceive hg. This was driving me nuts for a while, until I got
> careful about it, and had no such problems since then.
> 
> Interestingly enough, on another windows box I got also with XP sp2 ,
> the cmd console will always cd to the proper case of subdir.
> No idea what is different, could be some registry setting.
> 
> Andrei
> 
> ----- Original Message ----- From: "Johnny Stenback" <jst at jstenback.com>
> To: <mercurial-devel at selenic.com>
> Sent: Thursday, February 22, 2007 6:05 AM
> Subject: hg diff/status <dir> problem
> 
> 
>> Hello all,
>>
>> I recently realized that the windows version of hg (0.9.3) doesn't 
>> appear to find changes to files in a repository when given a directory 
>> to look in. I.e. if I set up a trivial repository with a file inside a 
>> sub directory and change that file, then "hg status" shows the change, 
>> as does "hg status somedir/somefile", but "hg status somedir" does 
>> *not* show the change. Same goes for hg diff, hg commit, and maybe 
>> other commands as well.
>>
>> I only see this on windows, hg on linux appears to work fine. This 
>> appears to have worked in version 0.9.1, but I haven't verified that 
>> myself.
>>
>> Anyone have any ideas about this?
>>
>> -- 
>> jst
>> _______________________________________________
>> Mercurial-devel mailing list
>> Mercurial-devel at selenic.com
>> http://selenic.com/mailman/listinfo/mercurial-devel
>>
> 
> 

-- 
jst


More information about the Mercurial-devel mailing list