diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py --- a/hgext/largefiles/overrides.py +++ b/hgext/largefiles/overrides.py @@ -1008,7 +1008,8 @@ def overrideforget(orig, ui, repo, *pats 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 --git a/tests/test-largefiles-cache.t b/tests/test-largefiles-cache.t --- a/tests/test-largefiles-cache.t +++ b/tests/test-largefiles-cache.t @@ -136,7 +136,8 @@ Test permission of files created by push #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 @@ it is missing, but a remove on a nonexis 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]