Show More
@@ -304,17 +304,31 b' def overridelog(orig, ui, repo, *pats, *' | |||
|
304 | 304 | return matchandpats |
|
305 | 305 | |
|
306 | 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 | 315 | if m._cwd: |
|
309 | 316 | if os.path.isabs(m._cwd): |
|
310 | 317 | # TODO: handle largefile magic when invoked from other cwd |
|
311 | 318 | return matchandpats |
|
312 | 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 | 325 | else: |
|
315 |
pats.update( |
|
|
326 | pats.update(fixpats(f) for f in p) | |
|
316 | 327 | |
|
317 | 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 | 332 | standin = lfutil.standin(m._files[i]) |
|
319 | 333 | # If the "standin" is a directory, append instead of replace to |
|
320 | 334 | # support naming a directory on the command line with only |
@@ -325,7 +339,6 b' def overridelog(orig, ui, repo, *pats, *' | |||
|
325 | 339 | elif m._files[i] not in repo[ctx.node()] \ |
|
326 | 340 | and repo.wvfs.isdir(standin): |
|
327 | 341 | m._files.append(standin) |
|
328 | pats.add(standin) | |
|
329 | 342 | |
|
330 | 343 | m._fmap = set(m._files) |
|
331 | 344 | m._always = False |
@@ -458,6 +458,22 b' Test actions on largefiles using relativ' | |||
|
458 | 458 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
459 | 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 | 477 | $ echo more >> anotherlarge |
|
462 | 478 | $ hg st . |
|
463 | 479 | M anotherlarge |
@@ -468,6 +484,22 b' Test actions on largefiles using relativ' | |||
|
468 | 484 | ? sub/anotherlarge.orig |
|
469 | 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 | 503 | $ cd .. |
|
472 | 504 | |
|
473 | 505 | Check error message while exchange |
@@ -58,6 +58,28 b" Make sure largefiles doesn't interfere w" | |||
|
58 | 58 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
59 | 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 | 83 | log on directory |
|
62 | 84 | |
|
63 | 85 | $ hg log dir |
General Comments 0
You need to be logged in to leave comments.
Login now