merge-recursive: Improve the error message printed when merge(1) isn't found.
Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
d37fd03222
commit
4353f38616
@ -205,11 +205,16 @@ def mergeFile(oPath, oSha, oMode, aPath, aSha, aMode, bPath, bSha, bMode,
|
|||||||
orig = runProgram(['git-unpack-file', oSha]).rstrip()
|
orig = runProgram(['git-unpack-file', oSha]).rstrip()
|
||||||
src1 = runProgram(['git-unpack-file', aSha]).rstrip()
|
src1 = runProgram(['git-unpack-file', aSha]).rstrip()
|
||||||
src2 = runProgram(['git-unpack-file', bSha]).rstrip()
|
src2 = runProgram(['git-unpack-file', bSha]).rstrip()
|
||||||
|
try:
|
||||||
[out, code] = runProgram(['merge',
|
[out, code] = runProgram(['merge',
|
||||||
'-L', branch1Name + '/' + aPath,
|
'-L', branch1Name + '/' + aPath,
|
||||||
'-L', 'orig/' + oPath,
|
'-L', 'orig/' + oPath,
|
||||||
'-L', branch2Name + '/' + bPath,
|
'-L', branch2Name + '/' + bPath,
|
||||||
src1, orig, src2], returnCode=True)
|
src1, orig, src2], returnCode=True)
|
||||||
|
except ProgramError, e:
|
||||||
|
print >>sys.stderr, e
|
||||||
|
die("Failed to execute 'merge'. merge(1) is used as the "
|
||||||
|
"file-level merge tool. Is 'merge' in your path?")
|
||||||
|
|
||||||
sha = runProgram(['git-hash-object', '-t', 'blob', '-w',
|
sha = runProgram(['git-hash-object', '-t', 'blob', '-w',
|
||||||
src1]).rstrip()
|
src1]).rstrip()
|
||||||
|
Loading…
Reference in New Issue
Block a user