Missing working directory / current path case normalization on Windows
Created originally on Bitbucket by psuter (Peter Suter)
On Windows paths are case preserving but case insensitive.
C:\>md A
C:\>cd a
C:\A>hginit .
C:\A>md B
C:\A>cd b
C:\A\B>echo foo>file.txt
C:\A\B>hg add file.txt
C:\A\B>cd ..
C:\A>hg commit -m "Added file"
C:\A>thg filelog b\file.txt
C:\A>thg filelog B\file.txt
The last command (thg filelog B\file.txt
) works. The previous command (thg filelog b\file.txt
) does not work. There is no error message, but no changesets are shown.
Worse:
- Press WIN+R, write
c:\a\b
. (Windows Explorer opens inc:\a\b
.) - Right click
file.txt
and TortoiseHG and Revision History. (Again, this does not work!) - Press CTRL+L (Focus on the location bar)
- Write
cmd.exe
and hit ENTER. (Command shell opens inc:\a\b>
.) -
c:\a\b>thg filelog file.txt
(Again, this does not work!)
In these cases the user that performed step 2. or step 5. did nothing wrong and can not really do anything to fix the problem. In reality this may happen much later than the "problematic"1 step 1. and the path may be much longer and less obvious than in this simple example. A single "wrong"2 lowercase character anywhere in the current path can lead to much confusion.
Please consider if on Windows normalizing (some) paths would be possible. Thanks!