Show More
@@ -139,9 +139,7 b' def _exthook(ui, repo, htype, name, cmd,' | |||||
139 | v = stringutil.pprint(v) |
|
139 | v = stringutil.pprint(v) | |
140 | env['HG_' + k.upper()] = v |
|
140 | env['HG_' + k.upper()] = v | |
141 |
|
141 | |||
142 | if pycompat.iswindows: |
|
142 | cmd = procutil.shelltonative(cmd, env) | |
143 | environ = procutil.shellenviron(env) |
|
|||
144 | cmd = util.platform.shelltocmdexe(cmd, environ) |
|
|||
145 |
|
143 | |||
146 | ui.note(_("running hook %s: %s\n") % (name, cmd)) |
|
144 | ui.note(_("running hook %s: %s\n") % (name, cmd)) | |
147 |
|
145 |
@@ -317,6 +317,13 b' def shellenviron(environ=None):' | |||||
317 | env['HG'] = hgexecutable() |
|
317 | env['HG'] = hgexecutable() | |
318 | return env |
|
318 | return env | |
319 |
|
319 | |||
|
320 | if pycompat.iswindows: | |||
|
321 | def shelltonative(cmd, env): | |||
|
322 | return platform.shelltocmdexe(cmd, shellenviron(env)) | |||
|
323 | else: | |||
|
324 | def shelltonative(cmd, env): | |||
|
325 | return cmd | |||
|
326 | ||||
320 | def system(cmd, environ=None, cwd=None, out=None): |
|
327 | def system(cmd, environ=None, cwd=None, out=None): | |
321 | '''enhanced shell command execution. |
|
328 | '''enhanced shell command execution. | |
322 | run with environment maybe modified, maybe in different dir. |
|
329 | run with environment maybe modified, maybe in different dir. |
General Comments 0
You need to be logged in to leave comments.
Login now