Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 24189:8b4b9ee6001a
log: make -fr show complete history from the given revs
Right now it's very obtuse to show the history of a particular rev (hg log -r
'reverse(::foo)'). This changes the -f option to make it follow history for the
revs specified by -r.
The current -f -r behavior is to limit the result of -r to only the
commits that are ancestors of the current working copy. Changing this
is a bit of a BC break, but the old behavior is A) rare, B) easy to
emulate (& ::.), and C) currently undefined. The new behavior is
frequently requested enough that I think the change is worth it.
author | Durham Goode <durham@fb.com> |
---|---|
date | Fri, 06 Feb 2015 11:04:55 -0800 |
parents | 9cb1f82a2571 |
children | 8fe5fc8d7b8e |
comparison
equal
deleted
inserted
replaced
24188:5a7920c4d2ea | 24189:8b4b9ee6001a |
---|---|
4476 specifying custom templates. | 4476 specifying custom templates. |
4477 | 4477 |
4478 Returns 0 on success. | 4478 Returns 0 on success. |
4479 | 4479 |
4480 """ | 4480 """ |
4481 if opts.get('follow') and opts.get('rev'): | |
4482 opts['rev'] = [revset.formatspec('reverse(::%lr)', opts.get('rev'))] | |
4483 del opts['follow'] | |
4484 | |
4481 if opts.get('graph'): | 4485 if opts.get('graph'): |
4482 return cmdutil.graphlog(ui, repo, *pats, **opts) | 4486 return cmdutil.graphlog(ui, repo, *pats, **opts) |
4483 | 4487 |
4484 revs, expr, filematcher = cmdutil.getlogrevs(repo, pats, opts) | 4488 revs, expr, filematcher = cmdutil.getlogrevs(repo, pats, opts) |
4485 limit = cmdutil.loglimit(opts) | 4489 limit = cmdutil.loglimit(opts) |