largefiles: fix a spurious missing file warning with forget (issue4053)
If an uncommitted and deleted file was forgotten, a warning would be emitted,
even though the operation was successful. See the previous patch for
'remove -A' for the exact circumstances, and details about the cause.
--- a/hgext/largefiles/overrides.py Sun Dec 21 15:04:13 2014 -0500
+++ b/hgext/largefiles/overrides.py Sun Dec 21 15:06:54 2014 -0500
@@ -1008,7 +1008,8 @@
installnormalfilesmatchfn(repo[None].manifest())
result = orig(ui, repo, *pats, **opts)
restorematchfn()
- m = scmutil.match(repo[None], pats, opts)
+ m = composelargefilematcher(scmutil.match(repo[None], pats, opts),
+ repo[None].manifest())
try:
repo.lfstatus = True
--- a/tests/test-largefiles-cache.t Sun Dec 21 15:04:13 2014 -0500
+++ b/tests/test-largefiles-cache.t Sun Dec 21 15:06:54 2014 -0500
@@ -136,7 +136,8 @@
#endif
Test issue 4053 (remove --after on a deleted, uncommitted file shouldn't say
-it is missing, but a remove on a nonexistant unknown file still should)
+it is missing, but a remove on a nonexistant unknown file still should. Same
+for a forget.)
$ cd src
$ touch x
@@ -146,3 +147,9 @@
ENOENT: * (glob)
not removing y: file is untracked
[1]
+ $ hg add y
+ $ mv y z
+ $ hg forget y z ENOENT
+ ENOENT: * (glob)
+ not removing z: file is already untracked
+ [1]