merge with crew-stable
authorAlexis S. L. Carvalho <alexis@cecm.usp.br>
Sat, 16 Dec 2006 02:51:16 -0200
changeset 3906 1063a631cb8e
parent 3903 f9136599700f (current diff)
parent 3905 a8c0365b2ace (diff)
child 3909 dd86f99e3c02
merge with crew-stable
mercurial/templater.py
mercurial/util.py
--- a/mercurial/templater.py	Fri Dec 15 20:16:20 2006 -0800
+++ b/mercurial/templater.py	Sat Dec 16 02:51:16 2006 -0200
@@ -203,7 +203,7 @@
     return text.replace('\n', '<br/>\n')
 
 def obfuscate(text):
-    text = unicode(text, 'utf-8', 'replace')
+    text = unicode(text, util._encoding, 'replace')
     return ''.join(['&#%d;' % ord(c) for c in text])
 
 def domain(author):
--- a/mercurial/util.py	Fri Dec 15 20:16:20 2006 -0800
+++ b/mercurial/util.py	Sat Dec 16 02:51:16 2006 -0200
@@ -500,6 +500,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)
@@ -507,7 +510,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)