diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py --- a/hgext/largefiles/overrides.py +++ b/hgext/largefiles/overrides.py @@ -156,7 +156,8 @@ def removelargefiles(ui, repo, isaddremo after = opts.get('after') if not pats and not after: raise util.Abort(_('no files specified')) - m = scmutil.match(repo[None], pats, opts) + m = composelargefilematcher(scmutil.match(repo[None], pats, opts), + repo[None].manifest()) try: repo.lfstatus = True s = repo.status(match=m, clean=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 @@ -134,3 +134,15 @@ Test permission of files created by push $ cd .. #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) + + $ cd src + $ touch x + $ hg add x + $ mv x y + $ hg remove -A x y ENOENT + ENOENT: * (glob) + not removing y: file is untracked + [1]