comparison mercurial/logcmdutil.py @ 45564:a717de1cb624

log: remove unused argument from _makerevset() I want to make getrevs() reusable for other commands, but the dependency graph of this getrevs() function is a mess. Let's minimize it first.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 12 Sep 2020 16:19:01 +0900
parents 142f0dcf90d0
children c1d0f83d62c4
comparison
equal deleted inserted replaced
45563:142f0dcf90d0 45564:a717de1cb624
798 b'prune': (b'ancestors(%s)', b'not %lr'), 798 b'prune': (b'ancestors(%s)', b'not %lr'),
799 b'user': (b'user(%s)', b'%lr'), 799 b'user': (b'user(%s)', b'%lr'),
800 } 800 }
801 801
802 802
803 def _makerevset(repo, match, pats, slowpath, opts): 803 def _makerevset(repo, pats, slowpath, opts):
804 """Return a revset string built from log options and file patterns""" 804 """Return a revset string built from log options and file patterns"""
805 opts = dict(opts) 805 opts = dict(opts)
806 # follow or not follow? 806 # follow or not follow?
807 follow = opts.get(b'follow') or opts.get(b'follow_first') 807 follow = opts.get(b'follow') or opts.get(b'follow_first')
808 808
894 if filematcher is None: 894 if filematcher is None:
895 895
896 def filematcher(ctx): 896 def filematcher(ctx):
897 return match 897 return match
898 898
899 expr = _makerevset(repo, match, pats, slowpath, opts) 899 expr = _makerevset(repo, pats, slowpath, opts)
900 if opts.get(b'graph'): 900 if opts.get(b'graph'):
901 if repo.ui.configbool(b'experimental', b'log.topo'): 901 if repo.ui.configbool(b'experimental', b'log.topo'):
902 if not revs.istopo(): 902 if not revs.istopo():
903 revs = dagop.toposort(revs, repo.changelog.parentrevs) 903 revs = dagop.toposort(revs, repo.changelog.parentrevs)
904 # TODO: try to iterate the set lazily 904 # TODO: try to iterate the set lazily