Mercurial > hg
changeset 25767:026105c442d7
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.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 02 Jul 2015 21:39:31 +0900 |
parents | d51dac68ec98 |
children | 7a9ef8608a1d |
files | mercurial/revset.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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'))