[PATCH] phabricator: remove *-argument from _getdrevs()

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] phabricator: remove *-argument from _getdrevs()

Yuya Nishihara
# HG changeset patch
# User Yuya Nishihara <[hidden email]>
# Date 1584766870 -32400
#      Sat Mar 21 14:01:10 2020 +0900
# Node ID c1c2f6e0cd9f819389c18245d791c906023d9545
# Parent  a7f8c657a3f08d1e71ee112f797df011eea7a078
phabricator: remove *-argument from _getdrevs()

It can't take more than one specs arguments per len(*specs).

diff --git a/hgext/phabricator.py b/hgext/phabricator.py
--- a/hgext/phabricator.py
+++ b/hgext/phabricator.py
@@ -1632,19 +1632,19 @@ def getdiffmeta(diff):
     return meta
 
 
-def _getdrevs(ui, stack, *specs):
+def _getdrevs(ui, stack, specs):
     """convert user supplied DREVSPECs into "Differential Revision" dicts
 
     See ``hg help phabread`` for how to specify each DREVSPEC.
     """
-    if len(*specs) > 0:
+    if len(specs) > 0:
 
         def _formatspec(s):
             if stack:
                 s = b':(%s)' % s
             return b'(%s)' % s
 
-        spec = b'+'.join(pycompat.maplist(_formatspec, *specs))
+        spec = b'+'.join(pycompat.maplist(_formatspec, specs))
 
         drevs = querydrev(ui, spec)
         if drevs:
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] phabricator: remove *-argument from _getdrevs()

Augie Fackler-2
queued, thanks

> On Mar 21, 2020, at 01:26, Yuya Nishihara <[hidden email]> wrote:
>
> # HG changeset patch
> # User Yuya Nishihara <[hidden email]>
> # Date 1584766870 -32400
> #      Sat Mar 21 14:01:10 2020 +0900
> # Node ID c1c2f6e0cd9f819389c18245d791c906023d9545
> # Parent  a7f8c657a3f08d1e71ee112f797df011eea7a078
> phabricator: remove *-argument from _getdrevs()
>
> It can't take more than one specs arguments per len(*specs).
>
> diff --git a/hgext/phabricator.py b/hgext/phabricator.py
> --- a/hgext/phabricator.py
> +++ b/hgext/phabricator.py
> @@ -1632,19 +1632,19 @@ def getdiffmeta(diff):
>     return meta
>
>
> -def _getdrevs(ui, stack, *specs):
> +def _getdrevs(ui, stack, specs):
>     """convert user supplied DREVSPECs into "Differential Revision" dicts
>
>     See ``hg help phabread`` for how to specify each DREVSPEC.
>     """
> -    if len(*specs) > 0:
> +    if len(specs) > 0:
>
>         def _formatspec(s):
>             if stack:
>                 s = b':(%s)' % s
>             return b'(%s)' % s
>
> -        spec = b'+'.join(pycompat.maplist(_formatspec, *specs))
> +        spec = b'+'.join(pycompat.maplist(_formatspec, specs))
>
>         drevs = querydrev(ui, spec)
>         if drevs:
> _______________________________________________
> Mercurial-devel mailing list
> [hidden email]
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel