##// END OF EJS Templates
dispatch: consolidate formatting of arguments...
Augie Fackler -
r31492:3c77414a default
parent child Browse files
Show More
@@ -92,6 +92,9 b' def _formatparse(write, inst):'
92 if inst.hint:
92 if inst.hint:
93 write(_("(%s)\n") % inst.hint)
93 write(_("(%s)\n") % inst.hint)
94
94
95 def _formatargs(args):
96 return ' '.join(' ' in a and repr(a) or a for a in args)
97
95 def dispatch(req):
98 def dispatch(req):
96 "run the command specified in req.args"
99 "run the command specified in req.args"
97 if req.ferr:
100 if req.ferr:
@@ -123,7 +126,7 b' def dispatch(req):'
123 _formatparse(ferr.write, inst)
126 _formatparse(ferr.write, inst)
124 return -1
127 return -1
125
128
126 msg = ' '.join(' ' in a and repr(a) or a for a in req.args)
129 msg = _formatargs(req.args)
127 starttime = util.timer()
130 starttime = util.timer()
128 ret = None
131 ret = None
129 try:
132 try:
@@ -829,7 +832,7 b' def _dispatch(req):'
829 elif rpath:
832 elif rpath:
830 ui.warn(_("warning: --repository ignored\n"))
833 ui.warn(_("warning: --repository ignored\n"))
831
834
832 msg = ' '.join(' ' in a and repr(a) or a for a in fullargs)
835 msg = _formatargs(fullargs)
833 ui.log("command", '%s\n', msg)
836 ui.log("command", '%s\n', msg)
834 strcmdopt = pycompat.strkwargs(cmdoptions)
837 strcmdopt = pycompat.strkwargs(cmdoptions)
835 d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
838 d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
General Comments 0
You need to be logged in to leave comments. Login now