Fixed calling the merge script and reporting errors in debuginstall (issue617)
authorThomas Arendsen Hein <thomas@intevation.de>
Wed, 04 Jul 2007 09:20:56 +0200
changeset 4747 452d171a1b39
parent 4746 62c56d8f368b
child 4748 8808ea7da86b
child 4800 27d5c4d51686
child 4802 3a4310e8fe72
Fixed calling the merge script and reporting errors in debuginstall (issue617)
mercurial/commands.py
--- a/mercurial/commands.py	Tue Jul 03 12:45:33 2007 +0200
+++ b/mercurial/commands.py	Wed Jul 04 09:20:56 2007 +0200
@@ -929,16 +929,17 @@
         fa = writetemp("1\n2\n3\n4\n")
         fl = writetemp("1\n2\n3\ninsert\n4\n")
         fr = writetemp("begin\n1\n2\n3\n4\n")
-        r = os.system('%s %s %s %s' % (cmd, fl, fa, fr))
+        r = util.system('%s "%s" "%s" "%s"' % (cmd, fl, fa, fr))
         if r:
-            ui.write(_(" got unexpected merge error %d!") % r)
+            ui.write(_(" Got unexpected merge error %d!\n") % r)
             problems += 1
         m = file(fl).read()
         if m != "begin\n1\n2\n3\ninsert\n4\n":
-            ui.write(_(" got unexpected merge results!") % r)
+            ui.write(_(" Got unexpected merge results!\n"))
             ui.write(_(" (your merge helper may have the"
                        " wrong argument order)\n"))
-            ui.write(m)
+            ui.write(_(" Result: %r\n") % m)
+            problems += 1
         os.unlink(fa)
         os.unlink(fl)
         os.unlink(fr)