Mercurial > hg
comparison hgext/convert/gnuarch.py @ 39826:c31ce080eb75
py3: convert arguments, cwd and env to native strings when spawning subprocess
This keeps Windows happy.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 23 Sep 2018 00:47:04 -0400 |
parents | a8a902d7176e |
children | 28626957395a |
comparison
equal
deleted
inserted
replaced
39825:874712506b07 | 39826:c31ce080eb75 |
---|---|
15 | 15 |
16 from mercurial.i18n import _ | 16 from mercurial.i18n import _ |
17 from mercurial import ( | 17 from mercurial import ( |
18 encoding, | 18 encoding, |
19 error, | 19 error, |
20 pycompat, | |
20 ) | 21 ) |
21 from mercurial.utils import ( | 22 from mercurial.utils import ( |
22 dateutil, | 23 dateutil, |
23 procutil, | 24 procutil, |
24 ) | 25 ) |
199 cmdline += args | 200 cmdline += args |
200 cmdline = [procutil.shellquote(arg) for arg in cmdline] | 201 cmdline = [procutil.shellquote(arg) for arg in cmdline] |
201 cmdline += ['>', os.devnull, '2>', os.devnull] | 202 cmdline += ['>', os.devnull, '2>', os.devnull] |
202 cmdline = procutil.quotecommand(' '.join(cmdline)) | 203 cmdline = procutil.quotecommand(' '.join(cmdline)) |
203 self.ui.debug(cmdline, '\n') | 204 self.ui.debug(cmdline, '\n') |
204 return os.system(cmdline) | 205 return os.system(pycompat.rapply(procutil.tonativestr, cmdline)) |
205 | 206 |
206 def _update(self, rev): | 207 def _update(self, rev): |
207 self.ui.debug('applying revision %s...\n' % rev) | 208 self.ui.debug('applying revision %s...\n' % rev) |
208 changeset, status = self.runlines('replay', '-d', self.tmppath, | 209 changeset, status = self.runlines('replay', '-d', self.tmppath, |
209 rev) | 210 rev) |