[PATCH 4 of 4] log: add TODO comments about --line-range processing

Denis Laxalde denis at laxalde.org
Mon Feb 12 02:20:29 EST 2018


The series looks good to me, thanks for doing that work!

Just a few notes about these todos.

Yuya Nishihara a écrit :
> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # 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

Do you mean handling "--line-range file1,from:to file2", where "file2" 
would be "a pattern 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

I remember having tried something like that earlier but it got too 
complicated. Maybe your recent refactorings would make this easier now.

>           revs, differ = logcmdutil.getlinerangerevs(repo, revs, opts)
>   
>       getrenamed = None
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
> 



More information about the Mercurial-devel mailing list