Show More
@@ -1149,10 +1149,25 b' def overridetransplant(orig, ui, repo, *' | |||||
1149 |
|
1149 | |||
1150 | def overridecat(orig, ui, repo, file1, *pats, **opts): |
|
1150 | def overridecat(orig, ui, repo, file1, *pats, **opts): | |
1151 | ctx = scmutil.revsingle(repo, opts.get('rev')) |
|
1151 | ctx = scmutil.revsingle(repo, opts.get('rev')) | |
1152 | if not lfutil.standin(file1) in ctx: |
|
1152 | err = 1 | |
1153 | result = orig(ui, repo, file1, *pats, **opts) |
|
1153 | notbad = set() | |
1154 | return result |
|
1154 | m = scmutil.match(ctx, (file1,) + pats, opts) | |
1155 | return lfcommands.catlfile(repo, file1, ctx.rev(), opts.get('output')) |
|
1155 | origmatchfn = m.matchfn | |
|
1156 | def lfmatchfn(f): | |||
|
1157 | lf = lfutil.splitstandin(f) | |||
|
1158 | if lf is None: | |||
|
1159 | return origmatchfn(f) | |||
|
1160 | notbad.add(lf) | |||
|
1161 | return origmatchfn(lf) | |||
|
1162 | m.matchfn = lfmatchfn | |||
|
1163 | m.bad = lambda f, msg: f not in notbad | |||
|
1164 | for f in ctx.walk(m): | |||
|
1165 | lf = lfutil.splitstandin(f) | |||
|
1166 | if lf is None: | |||
|
1167 | err = orig(ui, repo, f, **opts) | |||
|
1168 | else: | |||
|
1169 | err = lfcommands.catlfile(repo, lf, ctx.rev(), opts.get('output')) | |||
|
1170 | return err | |||
1156 |
|
1171 | |||
1157 | def mercurialsinkbefore(orig, sink): |
|
1172 | def mercurialsinkbefore(orig, sink): | |
1158 | sink.repo._isconverting = True |
|
1173 | sink.repo._isconverting = True |
@@ -1412,8 +1412,10 b' Cat a largefile' | |||||
1412 | normal3-modified |
|
1412 | normal3-modified | |
1413 | $ hg cat -r '.^' normal3 |
|
1413 | $ hg cat -r '.^' normal3 | |
1414 | normal3-modified |
|
1414 | normal3-modified | |
1415 | $ hg cat -r '.^' sub/large4 |
|
1415 | $ hg cat -r '.^' sub/large4 doesntexist | |
1416 | large4-modified |
|
1416 | large4-modified | |
|
1417 | doesntexist: no such file in rev a381d2c8c80e | |||
|
1418 | [1] | |||
1417 |
|
1419 | |||
1418 | Test that renaming a largefile results in correct output for status |
|
1420 | Test that renaming a largefile results in correct output for status | |
1419 |
|
1421 | |||
@@ -2010,6 +2012,8 b' Test actions on largefiles using relativ' | |||||
2010 | $ echo more >> anotherlarge |
|
2012 | $ echo more >> anotherlarge | |
2011 | $ hg st . |
|
2013 | $ hg st . | |
2012 | M anotherlarge |
|
2014 | M anotherlarge | |
|
2015 | $ hg cat anotherlarge | |||
|
2016 | anotherlarge | |||
2013 | $ hg revert anotherlarge |
|
2017 | $ hg revert anotherlarge | |
2014 | $ hg st |
|
2018 | $ hg st | |
2015 | ? sub/anotherlarge.orig |
|
2019 | ? sub/anotherlarge.orig |
General Comments 0
You need to be logged in to leave comments.
Login now