# HG changeset patch # User Alexis S. L. Carvalho # Date 1166243898 7200 # Node ID a8c0365b2ace7ef6224b6c9fa833e0ac3140ac8e # Parent 0dd07dd63db3bd48c4c4989eac150c9a9a28058b util.system: fix quoting on windows diff -r 0dd07dd63db3 -r a8c0365b2ace mercurial/util.py --- a/mercurial/util.py Sat Dec 16 02:21:46 2006 -0200 +++ b/mercurial/util.py Sat Dec 16 02:38:18 2006 -0200 @@ -501,6 +501,9 @@ 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) @@ -508,7 +511,7 @@ 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)