# HG changeset patch # User Matt Mackall # Date 1427842186 18000 # Node ID 6e73c66a69199a179b30c0e543c86792f5a52b70 # Parent afc29e29d569e1761b86d9b1924ea5db8dc64288# Parent c780a63f61caad7ee656d2c83733a28e1376f490 merge with stable diff -r afc29e29d569 -r 6e73c66a6919 mercurial/cmdutil.py --- 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)) diff -r afc29e29d569 -r 6e73c66a6919 tests/test-add.t --- a/tests/test-add.t Tue Mar 31 15:41:02 2015 -0700 +++ b/tests/test-add.t Tue Mar 31 17:49:46 2015 -0500 @@ -179,6 +179,9 @@ $ hg add -v capsdir1/capsdir adding CapsDir1/CapsDir/AbC.txt (glob) adding CapsDir1/CapsDir/SubDir/Def.txt (glob) + + $ hg forget capsdir1/capsdir/abc.txt + removing CapsDir1/CapsDir/AbC.txt (glob) #endif $ cd ..