@matheusbsbs / matheus-bagliano / commits / 4353f38616
Fork 0

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>

Fredrik Kuivinen committed Jan 29, 2006 at 13:16 UTC 4353f386166d74fd96cb552900fc22f6df211c21
1 file changed +10 -5
git-merge-recursive.py
+10 -5
@@ -205,11 +205,16 @@ def mergeFile(oPath, oSha, oMode, aPath, aSha, aMode, bPath, bSha, bMode,
205 orig = runProgram(['git-unpack-file', oSha]).rstrip()
206 src1 = runProgram(['git-unpack-file', aSha]).rstrip()
207 src2 = runProgram(['git-unpack-file', bSha]).rstrip()
208 - [out, code] = runProgram(['merge',
209 - '-L', branch1Name + '/' + aPath,
210 - '-L', 'orig/' + oPath,
211 - '-L', branch2Name + '/' + bPath,
212 - src1, orig, src2], returnCode=True)
208 + try:
209 + [out, code] = runProgram(['merge',
210 + '-L', branch1Name + '/' + aPath,
211 + '-L', 'orig/' + oPath,
212 + '-L', branch2Name + '/' + bPath,
213 + src1, orig, src2], returnCode=True)
214 + except ProgramError, e:
215 + print >>sys.stderr, e
216 + die("Failed to execute 'merge'. merge(1) is used as the "
217 + "file-level merge tool. Is 'merge' in your path?")
218
219 sha = runProgram(['git-hash-object', '-t', 'blob', '-w',
220 src1]).rstrip()