[PATCH 2 of 2 V2] crecord: drop unused "operation" parameter from filterpatch function

Yuya Nishihara yuya at tcha.org
Wed Jun 8 10:08:09 EDT 2016


On Tue, 07 Jun 2016 13:55:34 +0200, Denis Laxalde wrote:
> # HG changeset patch
> # User Denis Laxalde <denis.laxalde at logilab.fr>
> # Date 1465293431 -7200
> #      Tue Jun 07 11:57:11 2016 +0200
> # Node ID 3f890304e34ed182142ff5017406b4eb088b0d0d
> # Parent  608c9db1b99f36e3857c2e4081c5d6629aae8bab
> crecord: drop unused "operation" parameter from filterpatch function
> 
> diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
> --- a/mercurial/cmdutil.py
> +++ b/mercurial/cmdutil.py
> @@ -83,7 +83,7 @@ def filterchunks(ui, originalhunks, usec
>          else:
>              recordfn = crecordmod.chunkselector
>  
> -        return crecordmod.filterpatch(ui, originalhunks, recordfn, operation)
> +        return crecordmod.filterpatch(ui, originalhunks, recordfn)
>  
>      else:
>          return patch.filterpatch(ui, originalhunks, operation)
> diff --git a/mercurial/crecord.py b/mercurial/crecord.py
> --- a/mercurial/crecord.py
> +++ b/mercurial/crecord.py
> @@ -440,11 +440,8 @@ class uihunk(patchnode):
>      def __repr__(self):
>          return '<hunk %r@%d>' % (self.filename(), self.fromline)
>  
> -def filterpatch(ui, chunks, chunkselector, operation=None):
> +def filterpatch(ui, chunks, chunkselector):
>      """interactively filter patch chunks into applied-only chunks"""
> -
> -    if operation is None:
> -        operation = _('confirm')

This "operation" parameter might be planned to be used, but the default value
_('confirm') is getting wrong and unclear today. So it makes sense to me to
drop this parameter.

Pushed to the committed repo, thanks.


More information about the Mercurial-devel mailing list