(Not sure if it's a bug, but at least it's an inconsistency that bit me) Unlike (q)diff, but like commit, qrefresh is case sensitive. This is bad since qref does not print any warning if a given file was not found: (Windows) > hg version Mercurial Distributed SCM (version 2.1) (see http://mercurial.selenic.com for more information) > hg init foo > cd foo > echo A > A > echo B > B > hg commit -Amfoo > hg qnew foo > echo a > A > echo b > B Now I want to prepare to put "A" in the mq patch, but write it as lowercase > hg qref a > No warning, nothing. But actually I now have an empty patch > hg diff a diff -r f5d460f9c189 A --- a/A Tue Feb 14 23:42:23 2012 +0100 +++ b/A Tue Feb 14 23:45:05 2012 +0100 @@ -1,1 +1,1 @@ -A +a Notice how "diff" (and qdiff too) knows that I actually meant A, not a. Likewise, > hg qref a B > hg qnew foo would result in only "B" being added. and "A" being in the new "foo" patch I'm not sure what the actual issue is here: 1. that qref is still case sensitive on non-case sensitive file system (but commit also isn't, but aborts) 2. that (q)diff is not case sensitive 3. that qref does not emit a warning if a specified file was not found
I'd say this is a bug. Probably qref is applying the matcher directly to dirstate entries at some point rather than going through the path walker.
--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:28 EDT --- This bug was previously known as _bug_ 3270 at http://mercurial.selenic.com/bts/issue3270
Fixed by http://selenic.com/repo/hg/rev/39b7052b217b Durham Goode <durham@fb.com> mq: fix qrefresh case sensitivity (issue3271) When calling qrefresh with filenames, the filenames were being treated as case-sensistive on case-insensitive file systems. So 'qrefresh foo' would not match file 'Foo', and it failed silently. This fix makes it work correctly on case-insensitive file systems. Previously the matching function was applied directly to the filenames. Now we apply the matching function through repo.status, which handles the case logic for us. A side effect of using repo.status is that if the qrefresh file doesn't exist, there is output stating it doesn't exist. Adds a test to an existing mq refresh case test. (please test the fix)
Verified that the steps in the description work correctly in the latest pull of the source.