Show More
@@ -231,19 +231,8 b' def _newchgui(srcui, csystem):' | |||
|
231 | 231 | or self.fout.fileno() != util.stdout.fileno()): |
|
232 | 232 | return super(chgui, self).system(cmd, environ, cwd, onerr, |
|
233 | 233 | errprefix) |
|
234 | # copied from mercurial/util.py:system() | |
|
235 | 234 | self.flush() |
|
236 | def py2shell(val): | |
|
237 | if val is None or val is False: | |
|
238 | return '0' | |
|
239 | if val is True: | |
|
240 | return '1' | |
|
241 | return str(val) | |
|
242 | env = encoding.environ.copy() | |
|
243 | if environ: | |
|
244 | env.update((k, py2shell(v)) for k, v in environ.iteritems()) | |
|
245 | env['HG'] = util.hgexecutable() | |
|
246 | rc = self._csystem(cmd, env, cwd) | |
|
235 | rc = self._csystem(cmd, util.shellenviron(environ), cwd) | |
|
247 | 236 | if rc and onerr: |
|
248 | 237 | errmsg = '%s %s' % (os.path.basename(cmd.split(None, 1)[0]), |
|
249 | 238 | util.explainexit(rc)[0]) |
General Comments 0
You need to be logged in to leave comments.
Login now