Show More
@@ -2157,6 +2157,8 b' def log(ui, repo, *pats, **opts):' | |||
|
2157 | 2157 | if opts["date"]: |
|
2158 | 2158 | df = util.matchdate(opts["date"]) |
|
2159 | 2159 | |
|
2160 | opts['branch'] += opts.get('only_branch') | |
|
2161 | ||
|
2160 | 2162 | displayer = cmdutil.show_changeset(ui, repo, opts, True, matchfn) |
|
2161 | 2163 | def prep(ctx, fns): |
|
2162 | 2164 | rev = ctx.rev() |
@@ -2166,7 +2168,7 b' def log(ui, repo, *pats, **opts):' | |||
|
2166 | 2168 | return |
|
2167 | 2169 | if opts.get('only_merges') and len(parents) != 2: |
|
2168 | 2170 | return |
|
2169 |
if opts.get(' |
|
|
2171 | if opts.get('branch') and ctx.branch() not in opts['branch']: | |
|
2170 | 2172 | return |
|
2171 | 2173 | if df and not df(ctx.date()[0]): |
|
2172 | 2174 | return |
@@ -3739,8 +3741,10 b' table = {' | |||
|
3739 | 3741 | ('', 'removed', None, _('include revisions where files were removed')), |
|
3740 | 3742 | ('m', 'only-merges', None, _('show only merges')), |
|
3741 | 3743 | ('u', 'user', [], _('revisions committed by user')), |
|
3742 |
(' |
|
|
3743 | _('show only changesets within the given named branch')), | |
|
3744 | ('', 'only-branch', [], | |
|
3745 | _('show only changesets within the given named branch (DEPRECATED)')), | |
|
3746 | ('b', 'branch', [], | |
|
3747 | _('show changesets within the given named branch')), | |
|
3744 | 3748 | ('P', 'prune', [], |
|
3745 | 3749 | _('do not display revision or any of its ancestors')), |
|
3746 | 3750 | ] + logopts + walkopts, |
@@ -171,7 +171,7 b' diff: rev, change, text, git, nodates, s' | |||
|
171 | 171 | export: output, switch-parent, rev, text, git, nodates |
|
172 | 172 | forget: include, exclude |
|
173 | 173 | init: ssh, remotecmd |
|
174 | log: follow, follow-first, date, copies, keyword, rev, removed, only-merges, user, only-branch, prune, patch, git, limit, no-merges, style, template, include, exclude | |
|
174 | log: follow, follow-first, date, copies, keyword, rev, removed, only-merges, user, only-branch, branch, prune, patch, git, limit, no-merges, style, template, include, exclude | |
|
175 | 175 | merge: force, rev, preview |
|
176 | 176 | pull: update, force, rev, branch, ssh, remotecmd |
|
177 | 177 | push: force, rev, branch, ssh, remotecmd |
@@ -135,4 +135,34 b' hg log -u "User One <user1@example.org>"' | |||
|
135 | 135 | hg log -u "user1" -u "user2" |
|
136 | 136 | hg log -u "user3" |
|
137 | 137 | |
|
138 | cd .. | |
|
139 | ||
|
140 | hg init branches | |
|
141 | cd branches | |
|
142 | ||
|
143 | echo a > a | |
|
144 | hg ci -A -m "commit on default" | |
|
145 | hg branch test | |
|
146 | echo b > b | |
|
147 | hg ci -A -m "commit on test" | |
|
148 | ||
|
149 | hg up default | |
|
150 | echo c > c | |
|
151 | hg ci -A -m "commit on default" | |
|
152 | hg up test | |
|
153 | echo c > c | |
|
154 | hg ci -A -m "commit on test" | |
|
155 | ||
|
156 | echo '% log -b default' | |
|
157 | hg log -b default | |
|
158 | ||
|
159 | echo '% log -b test' | |
|
160 | hg log -b test | |
|
161 | ||
|
162 | echo '% log -b dummy' | |
|
163 | hg log -b dummy | |
|
164 | ||
|
165 | echo '% log -b default -b test' | |
|
166 | hg log -b default -b test | |
|
167 | ||
|
138 | 168 | exit 0 |
@@ -324,3 +324,65 b' user: User One <user1@example.org' | |||
|
324 | 324 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
325 | 325 | summary: a |
|
326 | 326 | |
|
327 | adding a | |
|
328 | marked working directory as branch test | |
|
329 | adding b | |
|
330 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
331 | adding c | |
|
332 | created new head | |
|
333 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
334 | adding c | |
|
335 | % log -b default | |
|
336 | changeset: 2:c3a4f03cc9a7 | |
|
337 | parent: 0:24427303d56f | |
|
338 | user: test | |
|
339 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
340 | summary: commit on default | |
|
341 | ||
|
342 | changeset: 0:24427303d56f | |
|
343 | user: test | |
|
344 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
345 | summary: commit on default | |
|
346 | ||
|
347 | % log -b test | |
|
348 | changeset: 3:f5d8de11c2e2 | |
|
349 | branch: test | |
|
350 | tag: tip | |
|
351 | parent: 1:d32277701ccb | |
|
352 | user: test | |
|
353 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
354 | summary: commit on test | |
|
355 | ||
|
356 | changeset: 1:d32277701ccb | |
|
357 | branch: test | |
|
358 | user: test | |
|
359 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
360 | summary: commit on test | |
|
361 | ||
|
362 | % log -b dummy | |
|
363 | % log -b default -b test | |
|
364 | changeset: 3:f5d8de11c2e2 | |
|
365 | branch: test | |
|
366 | tag: tip | |
|
367 | parent: 1:d32277701ccb | |
|
368 | user: test | |
|
369 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
370 | summary: commit on test | |
|
371 | ||
|
372 | changeset: 2:c3a4f03cc9a7 | |
|
373 | parent: 0:24427303d56f | |
|
374 | user: test | |
|
375 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
376 | summary: commit on default | |
|
377 | ||
|
378 | changeset: 1:d32277701ccb | |
|
379 | branch: test | |
|
380 | user: test | |
|
381 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
382 | summary: commit on test | |
|
383 | ||
|
384 | changeset: 0:24427303d56f | |
|
385 | user: test | |
|
386 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
387 | summary: commit on default | |
|
388 |
General Comments 0
You need to be logged in to leave comments.
Login now