# HG changeset patch # User Matt Harbison # Date 1419192414 18000 # Node ID 70afc58c32d3619ca2161eb3fc9d6d30a57e53f7 # Parent 9dd5dfeaab4c4f62527675e08d84e2eb334557d7 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. diff -r 9dd5dfeaab4c -r 70afc58c32d3 hgext/largefiles/overrides.py --- 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 diff -r 9dd5dfeaab4c -r 70afc58c32d3 tests/test-largefiles-cache.t --- 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]