Show More
@@ -304,17 +304,31 b' def overridelog(orig, ui, repo, *pats, *' | |||||
304 | return matchandpats |
|
304 | return matchandpats | |
305 |
|
305 | |||
306 | pats = set(p) |
|
306 | pats = set(p) | |
307 | # TODO: handling of patterns in both cases below |
|
307 | ||
|
308 | def fixpats(pat, tostandin=lfutil.standin): | |||
|
309 | kindpat = match_._patsplit(pat, None) | |||
|
310 | ||||
|
311 | if kindpat[0] is not None: | |||
|
312 | return kindpat[0] + ':' + tostandin(kindpat[1]) | |||
|
313 | return tostandin(kindpat[1]) | |||
|
314 | ||||
308 | if m._cwd: |
|
315 | if m._cwd: | |
309 | if os.path.isabs(m._cwd): |
|
316 | if os.path.isabs(m._cwd): | |
310 | # TODO: handle largefile magic when invoked from other cwd |
|
317 | # TODO: handle largefile magic when invoked from other cwd | |
311 | return matchandpats |
|
318 | return matchandpats | |
312 | back = (m._cwd.count('/') + 1) * '../' |
|
319 | back = (m._cwd.count('/') + 1) * '../' | |
313 | pats.update(back + lfutil.standin(m._cwd + '/' + f) for f in p) |
|
320 | ||
|
321 | def tostandin(f): | |||
|
322 | return back + lfutil.standin(m._cwd + '/' + f) | |||
|
323 | ||||
|
324 | pats.update(fixpats(f, tostandin) for f in p) | |||
314 | else: |
|
325 | else: | |
315 |
pats.update( |
|
326 | pats.update(fixpats(f) for f in p) | |
316 |
|
327 | |||
317 | for i in range(0, len(m._files)): |
|
328 | for i in range(0, len(m._files)): | |
|
329 | # Don't add '.hglf' to m.files, since that is already covered by '.' | |||
|
330 | if m._files[i] == '.': | |||
|
331 | continue | |||
318 | standin = lfutil.standin(m._files[i]) |
|
332 | standin = lfutil.standin(m._files[i]) | |
319 | # If the "standin" is a directory, append instead of replace to |
|
333 | # If the "standin" is a directory, append instead of replace to | |
320 | # support naming a directory on the command line with only |
|
334 | # support naming a directory on the command line with only | |
@@ -325,7 +339,6 b' def overridelog(orig, ui, repo, *pats, *' | |||||
325 | elif m._files[i] not in repo[ctx.node()] \ |
|
339 | elif m._files[i] not in repo[ctx.node()] \ | |
326 | and repo.wvfs.isdir(standin): |
|
340 | and repo.wvfs.isdir(standin): | |
327 | m._files.append(standin) |
|
341 | m._files.append(standin) | |
328 | pats.add(standin) |
|
|||
329 |
|
342 | |||
330 | m._fmap = set(m._files) |
|
343 | m._fmap = set(m._files) | |
331 | m._always = False |
|
344 | m._always = False |
@@ -458,6 +458,22 b' Test actions on largefiles using relativ' | |||||
458 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
458 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
459 | | summary: anotherlarge |
|
459 | | summary: anotherlarge | |
460 | | |
|
460 | | | |
|
461 | ||||
|
462 | $ hg log glob:another* | |||
|
463 | changeset: 1:9627a577c5e9 | |||
|
464 | tag: tip | |||
|
465 | user: test | |||
|
466 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
467 | summary: anotherlarge | |||
|
468 | ||||
|
469 | $ hg log -G glob:another* | |||
|
470 | @ changeset: 1:9627a577c5e9 | |||
|
471 | | tag: tip | |||
|
472 | | user: test | |||
|
473 | | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
474 | | summary: anotherlarge | |||
|
475 | | | |||
|
476 | ||||
461 | $ echo more >> anotherlarge |
|
477 | $ echo more >> anotherlarge | |
462 | $ hg st . |
|
478 | $ hg st . | |
463 | M anotherlarge |
|
479 | M anotherlarge | |
@@ -468,6 +484,22 b' Test actions on largefiles using relativ' | |||||
468 | ? sub/anotherlarge.orig |
|
484 | ? sub/anotherlarge.orig | |
469 | $ cd .. |
|
485 | $ cd .. | |
470 |
|
486 | |||
|
487 | Test glob logging from the root dir | |||
|
488 | $ hg log glob:**another* | |||
|
489 | changeset: 1:9627a577c5e9 | |||
|
490 | tag: tip | |||
|
491 | user: test | |||
|
492 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
493 | summary: anotherlarge | |||
|
494 | ||||
|
495 | $ hg log -G glob:**another* | |||
|
496 | @ changeset: 1:9627a577c5e9 | |||
|
497 | | tag: tip | |||
|
498 | | user: test | |||
|
499 | | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
500 | | summary: anotherlarge | |||
|
501 | | | |||
|
502 | ||||
471 | $ cd .. |
|
503 | $ cd .. | |
472 |
|
504 | |||
473 | Check error message while exchange |
|
505 | Check error message while exchange |
@@ -58,6 +58,28 b" Make sure largefiles doesn't interfere w" | |||||
58 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
58 | date: Thu Jan 01 00:00:01 1970 +0000 | |
59 | summary: a |
|
59 | summary: a | |
60 |
|
60 | |||
|
61 | $ hg log glob:a* | |||
|
62 | changeset: 3:2ca5ba701980 | |||
|
63 | user: test | |||
|
64 | date: Thu Jan 01 00:00:04 1970 +0000 | |||
|
65 | summary: d | |||
|
66 | ||||
|
67 | changeset: 0:9161b9aeaf16 | |||
|
68 | user: test | |||
|
69 | date: Thu Jan 01 00:00:01 1970 +0000 | |||
|
70 | summary: a | |||
|
71 | ||||
|
72 | $ hg log glob:a* --config extensions.largefiles= | |||
|
73 | changeset: 3:2ca5ba701980 | |||
|
74 | user: test | |||
|
75 | date: Thu Jan 01 00:00:04 1970 +0000 | |||
|
76 | summary: d | |||
|
77 | ||||
|
78 | changeset: 0:9161b9aeaf16 | |||
|
79 | user: test | |||
|
80 | date: Thu Jan 01 00:00:01 1970 +0000 | |||
|
81 | summary: a | |||
|
82 | ||||
61 | log on directory |
|
83 | log on directory | |
62 |
|
84 | |||
63 | $ hg log dir |
|
85 | $ hg log dir |
General Comments 0
You need to be logged in to leave comments.
Login now