mercurial/cmdutil.py
changeset 24554 6e73c66a6919
parent 24534 1925769b4ff8
parent 24548 c780a63f61ca
child 24583 6117a29e9e76
--- a/mercurial/cmdutil.py	Tue Mar 31 15:41:02 2015 -0700
+++ b/mercurial/cmdutil.py	Tue Mar 31 17:49:46 2015 -0500
@@ -2240,6 +2240,12 @@
             if f not in repo.dirstate and not repo.wvfs.isdir(f):
                 if f not in forgot:
                     if repo.wvfs.exists(f):
+                        # Don't complain if the exact case match wasn't given.
+                        # But don't do this until after checking 'forgot', so
+                        # that subrepo files aren't normalized, and this op is
+                        # purely from data cached by the status walk above.
+                        if repo.dirstate.normalize(f) in repo.dirstate:
+                            continue
                         ui.warn(_('not removing %s: '
                                   'file is already untracked\n')
                                 % match.rel(f))