comparison mercurial/commands.py @ 4798:452d171a1b39

Fixed calling the merge script and reporting errors in debuginstall (issue617)
author Thomas Arendsen Hein <thomas@intevation.de>
date Wed, 04 Jul 2007 09:20:56 +0200
parents 44e17f5029d0
children 7db38bfb307e
comparison
equal deleted inserted replaced
4781:62c56d8f368b 4798:452d171a1b39
927 else: 927 else:
928 # actually attempt a patch here 928 # actually attempt a patch here
929 fa = writetemp("1\n2\n3\n4\n") 929 fa = writetemp("1\n2\n3\n4\n")
930 fl = writetemp("1\n2\n3\ninsert\n4\n") 930 fl = writetemp("1\n2\n3\ninsert\n4\n")
931 fr = writetemp("begin\n1\n2\n3\n4\n") 931 fr = writetemp("begin\n1\n2\n3\n4\n")
932 r = os.system('%s %s %s %s' % (cmd, fl, fa, fr)) 932 r = util.system('%s "%s" "%s" "%s"' % (cmd, fl, fa, fr))
933 if r: 933 if r:
934 ui.write(_(" got unexpected merge error %d!") % r) 934 ui.write(_(" Got unexpected merge error %d!\n") % r)
935 problems += 1 935 problems += 1
936 m = file(fl).read() 936 m = file(fl).read()
937 if m != "begin\n1\n2\n3\ninsert\n4\n": 937 if m != "begin\n1\n2\n3\ninsert\n4\n":
938 ui.write(_(" got unexpected merge results!") % r) 938 ui.write(_(" Got unexpected merge results!\n"))
939 ui.write(_(" (your merge helper may have the" 939 ui.write(_(" (your merge helper may have the"
940 " wrong argument order)\n")) 940 " wrong argument order)\n"))
941 ui.write(m) 941 ui.write(_(" Result: %r\n") % m)
942 problems += 1
942 os.unlink(fa) 943 os.unlink(fa)
943 os.unlink(fl) 944 os.unlink(fl)
944 os.unlink(fr) 945 os.unlink(fr)
945 946
946 # editor 947 # editor