提交 ace36858 编写于 作者: F Fredrik Kuivinen 提交者: Junio C Hamano

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

Signed-off-by: NFredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 8ceba720
#!/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 sets import Set
......@@ -409,15 +409,20 @@ def usage():
break
print 'Merging', h1, 'with', h2
h1 = runProgram(['git-rev-parse', '--verify', h1 + '^0']).rstrip()
h2 = runProgram(['git-rev-parse', '--verify', h2 + '^0']).rstrip()
graph = buildGraph([h1, h2])
try:
h1 = runProgram(['git-rev-parse', '--verify', h1 + '^0']).rstrip()
h2 = runProgram(['git-rev-parse', '--verify', h2 + '^0']).rstrip()
[res, clean] = merge(graph.shaMap[h1], graph.shaMap[h2],
firstBranch, secondBranch, graph)
graph = buildGraph([h1, h2])
print ''
[res, clean] = merge(graph.shaMap[h1], graph.shaMap[h2],
firstBranch, secondBranch, graph)
print ''
except:
traceback.print_exc(None, sys.stderr)
sys.exit(2)
if clean:
sys.exit(0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册