[PATCH] Exit with status code 2 if we get an exception.

Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Fredrik Kuivinen 2005-09-12 23:29:54 +02:00 committed by Junio C Hamano
parent 8ceba720ba
commit ace36858d3

View File

@ -1,6 +1,6 @@
#!/usr/bin/python #!/usr/bin/python
import sys, math, random, os, re, signal, tempfile, stat, errno import sys, math, random, os, re, signal, tempfile, stat, errno, traceback
from heapq import heappush, heappop from heapq import heappush, heappop
from sets import Set from sets import Set
@ -409,6 +409,8 @@ for nextArg in xrange(1, len(sys.argv)):
break break
print 'Merging', h1, 'with', h2 print 'Merging', h1, 'with', h2
try:
h1 = runProgram(['git-rev-parse', '--verify', h1 + '^0']).rstrip() h1 = runProgram(['git-rev-parse', '--verify', h1 + '^0']).rstrip()
h2 = runProgram(['git-rev-parse', '--verify', h2 + '^0']).rstrip() h2 = runProgram(['git-rev-parse', '--verify', h2 + '^0']).rstrip()
@ -418,6 +420,9 @@ graph = buildGraph([h1, h2])
firstBranch, secondBranch, graph) firstBranch, secondBranch, graph)
print '' print ''
except:
traceback.print_exc(None, sys.stderr)
sys.exit(2)
if clean: if clean:
sys.exit(0) sys.exit(0)