Show More
@@ -314,7 +314,7 b' class changeset_printer(object):' | |||
|
314 | 314 | def showpatch(self, node): |
|
315 | 315 | if self.patch: |
|
316 | 316 | prev = self.repo.changelog.parents(node)[0] |
|
317 | patch.diff(self.repo, prev, node, fp=self.ui) | |
|
317 | patch.diff(self.repo, prev, node, match=self.patch, fp=self.ui) | |
|
318 | 318 | self.ui.write("\n") |
|
319 | 319 | |
|
320 | 320 | class changeset_templater(changeset_printer): |
@@ -510,7 +510,7 b' class changeset_templater(changeset_prin' | |||
|
510 | 510 | except SyntaxError, inst: |
|
511 | 511 | raise util.Abort(_('%s: %s') % (self.t.mapfile, inst.args[0])) |
|
512 | 512 | |
|
513 | def show_changeset(ui, repo, opts, buffered=False): | |
|
513 | def show_changeset(ui, repo, opts, buffered=False, matchfn=False): | |
|
514 | 514 | """show one changeset using template or regular display. |
|
515 | 515 | |
|
516 | 516 | Display format will be the first non-empty hit of: |
@@ -522,7 +522,12 b' def show_changeset(ui, repo, opts, buffe' | |||
|
522 | 522 | regular display via changeset_printer() is done. |
|
523 | 523 | """ |
|
524 | 524 | # options |
|
525 |
patch = |
|
|
525 | patch = False | |
|
526 | if opts.get('patch'): | |
|
527 | patch = lambda x: True | |
|
528 | if matchfn: | |
|
529 | patch = matchfn | |
|
530 | ||
|
526 | 531 | br = None |
|
527 | 532 | if opts.get('branches'): |
|
528 | 533 | ui.warn(_("the --branches option is deprecated, " |
@@ -1548,7 +1548,7 b' def log(ui, repo, *pats, **opts):' | |||
|
1548 | 1548 | df = util.matchdate(opts["date"]) |
|
1549 | 1549 | |
|
1550 | 1550 | |
|
1551 |
displayer = cmdutil.show_changeset(ui, repo, opts, |
|
|
1551 | displayer = cmdutil.show_changeset(ui, repo, opts, True, matchfn) | |
|
1552 | 1552 | for st, rev, fns in changeiter: |
|
1553 | 1553 | if st == 'add': |
|
1554 | 1554 | changenode = repo.changelog.node(rev) |
@@ -14,6 +14,8 b' hg mv b dir' | |||
|
14 | 14 | hg ci -mc -d '3 0' |
|
15 | 15 | |
|
16 | 16 | hg mv a b |
|
17 | echo a > d | |
|
18 | hg add d | |
|
17 | 19 | hg ci -md -d '4 0' |
|
18 | 20 | |
|
19 | 21 | hg mv dir/b e |
@@ -39,6 +41,9 b' echo foo > foo' | |||
|
39 | 41 | hg ci -Ame2 -d '6 0' |
|
40 | 42 | hg log -vC --template '{rev} {file_copies%filecopy}\n' -r 5 |
|
41 | 43 | |
|
44 | echo '% log -p d' | |
|
45 | hg log -pv d | |
|
46 | ||
|
42 | 47 | # log --follow tests |
|
43 | 48 | hg init ../follow |
|
44 | 49 | cd ../follow |
@@ -7,13 +7,13 b' summary: a' | |||
|
7 | 7 | % -f, directory |
|
8 | 8 | abort: can only follow copies/renames for explicit file names |
|
9 | 9 | % -f, but no args |
|
10 |
changeset: 4: |
|
|
10 | changeset: 4:b30c444c7c84 | |
|
11 | 11 | tag: tip |
|
12 | 12 | user: test |
|
13 | 13 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
14 | 14 | summary: e |
|
15 | 15 | |
|
16 |
changeset: 3: |
|
|
16 | changeset: 3:16b60bf3f99a | |
|
17 | 17 | user: test |
|
18 | 18 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
19 | 19 | summary: d |
@@ -43,7 +43,7 b' a' | |||
|
43 | 43 | |
|
44 | 44 | |
|
45 | 45 | % many renames |
|
46 |
changeset: 4: |
|
|
46 | changeset: 4:b30c444c7c84 | |
|
47 | 47 | tag: tip |
|
48 | 48 | user: test |
|
49 | 49 | date: Thu Jan 01 00:00:05 1970 +0000 |
@@ -86,6 +86,21 b' 0' | |||
|
86 | 86 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
87 | 87 | adding foo |
|
88 | 88 | 5 e (dir/b) |
|
89 | % log -p d | |
|
90 | changeset: 3:16b60bf3f99a | |
|
91 | user: test | |
|
92 | date: Thu Jan 01 00:00:04 1970 +0000 | |
|
93 | files: a b d | |
|
94 | description: | |
|
95 | d | |
|
96 | ||
|
97 | ||
|
98 | diff -r 21fba396af4c -r 16b60bf3f99a d | |
|
99 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
|
100 | +++ b/d Thu Jan 01 00:00:04 1970 +0000 | |
|
101 | @@ -0,0 +1,1 @@ | |
|
102 | +a | |
|
103 | ||
|
89 | 104 | adding base |
|
90 | 105 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
91 | 106 | adding b1 |
General Comments 0
You need to be logged in to leave comments.
Login now