Mercurial > hg
comparison mercurial/commands.py @ 46041:9c0db3671008
log: do not override other filtering and sorting options by --bookmark
This basically reimplements 0aa118f18d4b 'log: add bookmark option to
"hg log"'. Before, any other filtering options but --rev were ignored.
-G didn't work either since the ordering constraint wasn't enforced.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Tue, 01 Dec 2020 19:32:36 +0900 |
parents | b86608e97fa8 |
children | 7a2b67e6b680 |
comparison
equal
deleted
inserted
replaced
46040:9ee791f3278f | 46041:9c0db3671008 |
---|---|
4634 if linerange: | 4634 if linerange: |
4635 # TODO: should follow file history from logcmdutil._initialrevs(), | 4635 # TODO: should follow file history from logcmdutil._initialrevs(), |
4636 # then filter the result by logcmdutil._makerevset() and --limit | 4636 # then filter the result by logcmdutil._makerevset() and --limit |
4637 revs, differ = logcmdutil.getlinerangerevs(repo, revs, opts) | 4637 revs, differ = logcmdutil.getlinerangerevs(repo, revs, opts) |
4638 | 4638 |
4639 if opts.get(b'bookmark'): | |
4640 cmdutil.check_at_most_one_arg(opts, b'rev', b'bookmark') | |
4641 bookmarks = opts.get(b'bookmark') | |
4642 bookmark = bookmarks[0] | |
4643 revs, differ = logcmdutil.get_bookmark_revs(repo, bookmark, walk_opts) | |
4644 | |
4645 getcopies = None | 4639 getcopies = None |
4646 if opts.get(b'copies'): | 4640 if opts.get(b'copies'): |
4647 endrev = None | 4641 endrev = None |
4648 if revs: | 4642 if revs: |
4649 endrev = revs.max() + 1 | 4643 endrev = revs.max() + 1 |