From patchwork Mon Feb 12 01:05:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [4,of,4] log: add TODO comments about --line-range processing From: Yuya Nishihara X-Patchwork-Id: 27603 Message-Id: <3dd9becb635b9e077b53.1518397500@mimosa> To: mercurial-devel@mercurial-scm.org Date: Mon, 12 Feb 2018 10:05:00 +0900 # HG changeset patch # User Yuya Nishihara # Date 1516521882 -32400 # Sun Jan 21 17:04:42 2018 +0900 # Node ID 3dd9becb635b9e077b53f140c65f349cb0776991 # Parent e5ba72e0361bb859b1688ab1bc620c6ca870d951 log: add TODO comments about --line-range processing diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -3414,6 +3414,7 @@ def log(ui, repo, *pats, **opts): raise error.Abort(_('--line-range requires --follow')) if linerange and pats: + # TODO: take pats as patterns with no line-range filter raise error.Abort( _('FILE arguments are not compatible with --line-range option') ) @@ -3421,6 +3422,8 @@ def log(ui, repo, *pats, **opts): repo = scmutil.unhidehashlikerevs(repo, opts.get('rev'), 'nowarn') revs, differ = logcmdutil.getrevs(repo, pats, opts) if linerange: + # TODO: should follow file history from logcmdutil._initialrevs(), + # then filter the result by logcmdutil._makerevset() and --limit revs, differ = logcmdutil.getlinerangerevs(repo, revs, opts) getrenamed = None