diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py --- a/hgext/largefiles/overrides.py +++ b/hgext/largefiles/overrides.py @@ -1116,9 +1116,11 @@ def overridecat(orig, ui, repo, file1, * m = scmutil.match(ctx, (file1,) + pats, opts) origmatchfn = m.matchfn def lfmatchfn(f): + if origmatchfn(f): + return True lf = lfutil.splitstandin(f) if lf is None: - return origmatchfn(f) + return False notbad.add(lf) return origmatchfn(lf) m.matchfn = lfmatchfn @@ -1131,7 +1133,7 @@ def overridecat(orig, ui, repo, file1, * fp = cmdutil.makefileobj(repo, opts.get('output'), ctx.node(), pathname=f) lf = lfutil.splitstandin(f) - if lf is None: + if lf is None or origmatchfn(f): # duplicating unreachable code from commands.cat data = ctx[f].data() if opts.get('decode'): diff --git a/tests/test-largefiles.t b/tests/test-largefiles.t --- a/tests/test-largefiles.t +++ b/tests/test-largefiles.t @@ -1506,6 +1506,12 @@ Cat a largefile large4-modified $ hg --cwd sub cat -r '.^' ../normal3 normal3-modified +Cat a standin + $ hg cat .hglf/sub/large4 + e166e74c7303192238d60af5a9c4ce9bef0b7928 + $ hg cat .hglf/normal3 + .hglf/normal3: no such file in rev 598410d3eb9a + [1] Test that renaming a largefile results in correct output for status