Show More
@@ -1713,6 +1713,8 b' def log(ui, repo, *pats, **opts):' | |||||
1713 | if opts["date"]: |
|
1713 | if opts["date"]: | |
1714 | df = util.matchdate(opts["date"]) |
|
1714 | df = util.matchdate(opts["date"]) | |
1715 |
|
1715 | |||
|
1716 | only_branches = opts['only_branch'] | |||
|
1717 | ||||
1716 | displayer = cmdutil.show_changeset(ui, repo, opts, True, matchfn) |
|
1718 | displayer = cmdutil.show_changeset(ui, repo, opts, True, matchfn) | |
1717 | for st, rev, fns in changeiter: |
|
1719 | for st, rev, fns in changeiter: | |
1718 | if st == 'add': |
|
1720 | if st == 'add': | |
@@ -1724,6 +1726,11 b' def log(ui, repo, *pats, **opts):' | |||||
1724 | if opts['only_merges'] and len(parents) != 2: |
|
1726 | if opts['only_merges'] and len(parents) != 2: | |
1725 | continue |
|
1727 | continue | |
1726 |
|
1728 | |||
|
1729 | if only_branches: | |||
|
1730 | revbranch = get(rev)[5]['branch'] | |||
|
1731 | if revbranch not in only_branches: | |||
|
1732 | continue | |||
|
1733 | ||||
1727 | if df: |
|
1734 | if df: | |
1728 | changes = get(rev) |
|
1735 | changes = get(rev) | |
1729 | if not df(changes[2][0]): |
|
1736 | if not df(changes[2][0]): | |
@@ -2930,6 +2937,8 b' table = {' | |||||
2930 | ('M', 'no-merges', None, _('do not show merges')), |
|
2937 | ('M', 'no-merges', None, _('do not show merges')), | |
2931 | ('', 'style', '', _('display using template map file')), |
|
2938 | ('', 'style', '', _('display using template map file')), | |
2932 | ('m', 'only-merges', None, _('show only merges')), |
|
2939 | ('m', 'only-merges', None, _('show only merges')), | |
|
2940 | ('b', 'only-branch', [], | |||
|
2941 | _('show only changesets within the given named branch')), | |||
2933 | ('p', 'patch', None, _('show patch')), |
|
2942 | ('p', 'patch', None, _('show patch')), | |
2934 | ('P', 'prune', [], _('do not display revision or any of its ancestors')), |
|
2943 | ('P', 'prune', [], _('do not display revision or any of its ancestors')), | |
2935 | ('', 'template', '', _('display with template')), |
|
2944 | ('', 'template', '', _('display with template')), |
@@ -34,3 +34,9 b' hg commit -d \'5 0\' -u test -m "Adding c ' | |||||
34 | hg branches |
|
34 | hg branches | |
35 | echo '-------' |
|
35 | echo '-------' | |
36 | hg branches -a |
|
36 | hg branches -a | |
|
37 | ||||
|
38 | echo "--- Branch a" | |||
|
39 | hg log -b a | |||
|
40 | ||||
|
41 | echo "---- Branch b" | |||
|
42 | hg log -b b |
@@ -10,3 +10,31 b' default 0:19709c5' | |||||
10 | ------- |
|
10 | ------- | |
11 | c 5:5ca481e59b8c |
|
11 | c 5:5ca481e59b8c | |
12 | a 1:dd6b440dd85a |
|
12 | a 1:dd6b440dd85a | |
|
13 | --- Branch a | |||
|
14 | changeset: 1:dd6b440dd85a | |||
|
15 | branch: a | |||
|
16 | user: test | |||
|
17 | date: Thu Jan 01 00:00:01 1970 +0000 | |||
|
18 | summary: Adding a branch | |||
|
19 | ||||
|
20 | ---- Branch b | |||
|
21 | changeset: 4:22df7444f7c1 | |||
|
22 | branch: b | |||
|
23 | parent: 2:ac22033332d1 | |||
|
24 | user: test | |||
|
25 | date: Thu Jan 01 00:00:04 1970 +0000 | |||
|
26 | summary: Adding b branch head 2 | |||
|
27 | ||||
|
28 | changeset: 3:aee39cd168d0 | |||
|
29 | branch: b | |||
|
30 | user: test | |||
|
31 | date: Thu Jan 01 00:00:03 1970 +0000 | |||
|
32 | summary: Adding b branch head 1 | |||
|
33 | ||||
|
34 | changeset: 2:ac22033332d1 | |||
|
35 | branch: b | |||
|
36 | parent: 0:19709c5a4e75 | |||
|
37 | user: test | |||
|
38 | date: Thu Jan 01 00:00:02 1970 +0000 | |||
|
39 | summary: Adding b branch | |||
|
40 |
General Comments 0
You need to be logged in to leave comments.
Login now