graphlog: pass function arguments without expansion
authorYuya Nishihara <yuya@tcha.org>
Tue, 14 Mar 2017 18:16:13 +0900
changeset 31486 06d3c40fc3e7
parent 31485 cad95575dc46
child 31487 a992caaf0e22
graphlog: pass function arguments without expansion It's annoying on Python 3 because keys must be unicode type. Let's stop using **opts expansion when not necessary.
mercurial/cmdutil.py
mercurial/commands.py
--- a/mercurial/cmdutil.py	Fri Mar 17 23:48:22 2017 +0900
+++ b/mercurial/cmdutil.py	Tue Mar 14 18:16:13 2017 +0900
@@ -2212,7 +2212,7 @@
             graphmod.ascii(ui, state, type, char, lines, coldata)
     displayer.close()
 
-def graphlog(ui, repo, *pats, **opts):
+def graphlog(ui, repo, pats, opts):
     # Parameters are identical to log command ones
     revs, expr, filematcher = getgraphlogrevs(repo, pats, opts)
     revdag = graphmod.dagwalker(repo, revs)
--- a/mercurial/commands.py	Fri Mar 17 23:48:22 2017 +0900
+++ b/mercurial/commands.py	Tue Mar 14 18:16:13 2017 +0900
@@ -3398,7 +3398,7 @@
         del opts['follow']
 
     if opts.get('graph'):
-        return cmdutil.graphlog(ui, repo, *pats, **opts)
+        return cmdutil.graphlog(ui, repo, pats, opts)
 
     revs, expr, filematcher = cmdutil.getlogrevs(repo, pats, opts)
     limit = cmdutil.loglimit(opts)