Comments
Patch
@@ -1148,9 +1148,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
@@ -1163,7 +1165,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'):
@@ -1503,6 +1503,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