revset: rename getkwargs() to getargsdict()
authorYuya Nishihara <yuya@tcha.org>
Thu, 02 Jul 2015 21:39:31 +0900
changeset 25767 026105c442d7
parent 25766 d51dac68ec98
child 25768 7a9ef8608a1d
revset: rename getkwargs() to getargsdict() This function was added recently at 48919d246a47, but its name was misleading because it processes both positional and keyword arguments.
mercurial/revset.py
--- a/mercurial/revset.py	Sun Jun 28 16:08:07 2015 +0900
+++ b/mercurial/revset.py	Thu Jul 02 21:39:31 2015 +0900
@@ -282,7 +282,7 @@
         raise error.ParseError(err)
     return l
 
-def getkwargs(x, funcname, keys):
+def getargsdict(x, funcname, keys):
     return parser.buildargsdict(getlist(x), funcname, keys.split(),
                                 keyvaluenode='keyvalue', keynode='symbol')
 
@@ -846,7 +846,7 @@
     a regular expression. To match a value that actually starts with `re:`,
     use the prefix `literal:`.
     """
-    args = getkwargs(x, 'extra', 'label value')
+    args = getargsdict(x, 'extra', 'label value')
     if 'label' not in args:
         # i18n: "extra" is a keyword
         raise error.ParseError(_('extra takes at least 1 argument'))