Show More
@@ -240,11 +240,34 b' def overridedirty(orig, repo, ignoreupda' | |||||
240 | repo._repo.lfstatus = False |
|
240 | repo._repo.lfstatus = False | |
241 |
|
241 | |||
242 | def overridelog(orig, ui, repo, *pats, **opts): |
|
242 | def overridelog(orig, ui, repo, *pats, **opts): | |
|
243 | def overridematch(ctx, pats=[], opts={}, globbed=False, | |||
|
244 | default='relpath'): | |||
|
245 | """Matcher that merges root directory with .hglf, suitable for log. | |||
|
246 | It is still possible to match .hglf directly. | |||
|
247 | For any listed files run log on the standin too. | |||
|
248 | matchfn tries both the given filename and with .hglf stripped. | |||
|
249 | """ | |||
|
250 | match = oldmatch(ctx, pats, opts, globbed, default) | |||
|
251 | m = copy.copy(match) | |||
|
252 | standins = [lfutil.standin(f) for f in m._files] | |||
|
253 | m._files.extend(standins) | |||
|
254 | m._fmap = set(m._files) | |||
|
255 | origmatchfn = m.matchfn | |||
|
256 | def lfmatchfn(f): | |||
|
257 | lf = lfutil.splitstandin(f) | |||
|
258 | if lf is not None and origmatchfn(lf): | |||
|
259 | return True | |||
|
260 | r = origmatchfn(f) | |||
|
261 | return r | |||
|
262 | m.matchfn = lfmatchfn | |||
|
263 | return m | |||
|
264 | oldmatch = installmatchfn(overridematch) | |||
243 | try: |
|
265 | try: | |
244 | repo.lfstatus = True |
|
266 | repo.lfstatus = True | |
245 | return orig(ui, repo, *pats, **opts) |
|
267 | return orig(ui, repo, *pats, **opts) | |
246 | finally: |
|
268 | finally: | |
247 | repo.lfstatus = False |
|
269 | repo.lfstatus = False | |
|
270 | restorematchfn() | |||
248 |
|
271 | |||
249 | def overrideverify(orig, ui, repo, *pats, **opts): |
|
272 | def overrideverify(orig, ui, repo, *pats, **opts): | |
250 | large = opts.pop('large', False) |
|
273 | large = opts.pop('large', False) |
@@ -987,6 +987,47 b" The error messages go away if repo 'b' i" | |||||
987 | $ cat sub2/large7 |
|
987 | $ cat sub2/large7 | |
988 | large7 |
|
988 | large7 | |
989 |
|
989 | |||
|
990 | Log on largefiles | |||
|
991 | ||||
|
992 | - same output | |||
|
993 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub/large4 | |||
|
994 | 8:a381d2c8c80e modify normal file and largefile in repo b | |||
|
995 | 6:4355d653f84f edit files yet again | |||
|
996 | 5:9d5af5072dbd edit files again | |||
|
997 | 4:74c02385b94c move files | |||
|
998 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' sub/large4 | |||
|
999 | 8:a381d2c8c80e modify normal file and largefile in repo b | |||
|
1000 | 6:4355d653f84f edit files yet again | |||
|
1001 | 5:9d5af5072dbd edit files again | |||
|
1002 | 4:74c02385b94c move files | |||
|
1003 | ||||
|
1004 | - .hglf only matches largefiles, without .hglf it matches 9 bco sub/normal | |||
|
1005 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub | |||
|
1006 | 8:a381d2c8c80e modify normal file and largefile in repo b | |||
|
1007 | 6:4355d653f84f edit files yet again | |||
|
1008 | 5:9d5af5072dbd edit files again | |||
|
1009 | 4:74c02385b94c move files | |||
|
1010 | 1:ce8896473775 edit files | |||
|
1011 | 0:30d30fe6a5be add files | |||
|
1012 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' sub | |||
|
1013 | 9:598410d3eb9a modify normal file largefile in repo d | |||
|
1014 | 8:a381d2c8c80e modify normal file and largefile in repo b | |||
|
1015 | 6:4355d653f84f edit files yet again | |||
|
1016 | 5:9d5af5072dbd edit files again | |||
|
1017 | 4:74c02385b94c move files | |||
|
1018 | 1:ce8896473775 edit files | |||
|
1019 | 0:30d30fe6a5be add files | |||
|
1020 | ||||
|
1021 | - globbing gives same result | |||
|
1022 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' 'glob:sub/*' | |||
|
1023 | 9:598410d3eb9a modify normal file largefile in repo d | |||
|
1024 | 8:a381d2c8c80e modify normal file and largefile in repo b | |||
|
1025 | 6:4355d653f84f edit files yet again | |||
|
1026 | 5:9d5af5072dbd edit files again | |||
|
1027 | 4:74c02385b94c move files | |||
|
1028 | 1:ce8896473775 edit files | |||
|
1029 | 0:30d30fe6a5be add files | |||
|
1030 | ||||
990 | Rollback on largefiles. |
|
1031 | Rollback on largefiles. | |
991 |
|
1032 | |||
992 | $ echo large4-modified-again > sub/large4 |
|
1033 | $ echo large4-modified-again > sub/large4 |
General Comments 0
You need to be logged in to leave comments.
Login now