Patchwork D2481: wireproto: use named arguments for commandentry

login
register
mail settings
Submitter phabricator
Date March 1, 2018, 9:56 p.m.
Message ID <9adbbb9d662c0192c572c7d79c52b951@localhost.localdomain>
Download mbox | patch
Permalink /patch/28605/
State Not Applicable
Headers show

Comments

phabricator - March 1, 2018, 9:56 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG91247ab87fb5: wireproto: use named arguments for commandentry (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2481?vs=6180&id=6290

REVISION DETAIL
  https://phab.mercurial-scm.org/D2481

AFFECTED FILES
  mercurial/wireproto.py

CHANGE DETAILS




To: indygreg, #hg-reviewers, durin42
Cc: mercurial-devel

Patch

diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -604,7 +604,7 @@ 
         data not captured by the 2-tuple and a new instance containing
         the union of the two objects is returned.
         """
-        return commandentry(func, args)
+        return commandentry(func, args=args)
 
     # Old code treats instances as 2-tuples. So expose that interface.
     def __iter__(self):
@@ -640,7 +640,7 @@ 
             if k in self:
                 v = self[k]._merge(v[0], v[1])
             else:
-                v = commandentry(v[0], v[1])
+                v = commandentry(v[0], args=v[1])
         else:
             raise ValueError('command entries must be commandentry instances '
                              'or 2-tuples')
@@ -664,7 +664,7 @@ 
     accepts. ``*`` is a special value that says to accept all arguments.
     """
     def register(func):
-        commands[name] = commandentry(func, args)
+        commands[name] = commandentry(func, args=args)
         return func
     return register