C:\ugs\CMM\8>hg version Mercurial Distributed SCM (version 2.3) (see http://mercurial.selenic.com for more information) Copyright (C) 2005-2012 Matt Mackall 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:\ugs\CMM\8>hg init C:\ugs\CMM\8>hg add Config\cmmConfig.xml C:\ugs\CMM\8>hg commit config\cmmConfig.cmd abort: config/cmmConfig.cmd: file not tracked! C:\ugs\CMM\8>hg commit Config\cmmConfig.xml abort: empty commit message C:\ugs\CMM\8>hg commit config\cmmconfig.xml abort: config/cmmconfig.xml: file not tracked! Should commit either way on windows. ----------------------------------------------------------------------------- C:\Users\ideasadm\test>hg version Mercurial Distributed SCM (version 2.2.1) (see http://mercurial.selenic.com for more information) Copyright (C) 2005-2012 Matt Mackall 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:\Users\ideasadm>hg version Mercurial Distributed SCM (version 2.2.1) (see http://mercurial.selenic.com for more information) Copyright (C) 2005-2012 Matt Mackall 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:\Users\ideasadm>mkdir test C:\Users\ideasadm>mkdir test\Config\ C:\Users\ideasadm>echo "Hello" > test\Config\config.xml C:\Users\ideasadm>cd test C:\Users\ideasadm\test>hg add config\config.xml adding Config\config.xml C:\Users\ideasadm\test>hg commit Config\config.xml C:\Users\ideasadm\test>hg init ------------------------------------------------------------------------------- Works fine in 2.2.1
Pardon my poor copy and paste in the second example. I put the text in before the init command, but you get the idea.
Could you bisect the issue to find out which changese had introduced this regression?
(In reply to comment #2) Perhaps later tonight (After 8PM EDT)
Issue is not a regression. I rolled back to 1.9 and the behavior is consistent. Real issue differs somewhat from original classification. When using commit to commit individual files, the case used to specify the file must match the exact windows case (output by the add command). Add allows file names with any case to be added. Mercurial then emits the actual name of the added file back to the user. For commit to be successful, when specifying a single file to commit, The case must match the case of the file exactly. e.g. Config\AddMeToTheRepo.txt hg add config\addmetotherepo.txt adding Config/AddMeToTheRepo.txt hg commit -m "really!?" config\addmetotherepo.txt # fails abort: config/addmetotherepo.txt: file not tracked! hg commit -m "really!?" Config\addMetoTherepo.txt # fails abort: Config/addMetoTherepo.txt: file not tracked! hg commit -m "exact path" Config/AddMeToTheRepo.txt #success Long story short, on the Windows platform I'd expect to be lazy with the capitalization for the commit command as well as with the add command.
This seems to affect all OSes if the filesystem is case insensitive but preserving. I can repro it on OS X, too.
I've queued this fix for stable: diff -r c6f88e7f95b7 mercurial/localrepo.py --- a/mercurial/localrepo.py Sat Aug 11 12:45:53 2012 -0500 +++ b/mercurial/localrepo.py Fri Aug 17 14:34:44 2012 -0500 @@ -1312,6 +1312,7 @@ matched = set(changes[0] + changes[1] + changes[2]) for f in match.files(): + f = self.dirstate.normalize(f) if f == '.' or f in matched or f in wctx.substate: continue if f in changes[3]: # missing
Fixed by http://selenic.com/repo/hg/rev/b05e517c2236 Matt Mackall <mpm@selenic.com> commit: normalize filenames when checking explicit files (issue3576) (please test the fix)
Mass close old bugs in testing.