Mercurial > hg > mercurial-crew-with-dirclash
diff mercurial/util.py @ 3906:1063a631cb8e
merge with crew-stable
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Sat, 16 Dec 2006 02:51:16 -0200 |
parents | 6b4127c7d52a a8c0365b2ace |
children | 1cc60eebc71f |
line wrap: on
line diff
--- a/mercurial/util.py +++ b/mercurial/util.py @@ -500,6 +500,9 @@ def system(cmd, environ={}, cwd=None, on oldenv[k] = os.environ.get(k) if cwd is not None: oldcwd = os.getcwd() + origcmd = cmd + if os.name == 'nt': + cmd = '"%s"' % cmd try: for k, v in environ.iteritems(): os.environ[k] = py2shell(v) @@ -507,7 +510,7 @@ def system(cmd, environ={}, cwd=None, on os.chdir(cwd) rc = os.system(cmd) if rc and onerr: - errmsg = '%s %s' % (os.path.basename(cmd.split(None, 1)[0]), + errmsg = '%s %s' % (os.path.basename(origcmd.split(None, 1)[0]), explain_exit(rc)[0]) if errprefix: errmsg = '%s: %s' % (errprefix, errmsg)