# # patch "ChangeLog" # from [4d144d1179427e2c980a2e618b9cdb532eb332d3] # to [648e9e24f7fd8ecc09fda252e9c325d725518bb1] # # patch "std_hooks.lua" # from [4948b0bd7f95c210458b10105fe671dae7a5e81b] # to [979f3a22db89cdd9e14d79262c4d48b8633aabb4] # ======================================================================== --- ChangeLog 4d144d1179427e2c980a2e618b9cdb532eb332d3 +++ ChangeLog 648e9e24f7fd8ecc09fda252e9c325d725518bb1 @@ -1,3 +1,8 @@ +2005-08-17 Matthew Gregan + + * std_hooks.lua: Merge hooks for TortoiseMerge (part of + TortoiseSVN). + 2005-08-10 Matthew Gregan * monotone.spec: include zlib-devel and texinfo as build ======================================================================== --- std_hooks.lua 4948b0bd7f95c210458b10105fe671dae7a5e81b +++ std_hooks.lua 979f3a22db89cdd9e14d79262c4d48b8633aabb4 @@ -229,7 +229,27 @@ end end +function merge2_tortoise_cmd(lfile, rfile, outfile) + return + function() + return execute("tortoisemerge", + string.format("/theirs:%s", lfile), + string.format("/mine:%s", rfile), + string.format("/merged:%s", outfile)) + end +end +function merge3_tortoise_cmd(lfile, afile, rfile, outfile) + return + function() + return execute("tortoisemerge", + string.format("/base:%s", afile), + string.format("/theirs:%s", lfile), + string.format("/mine:%s", rfile), + string.format("/merged:%s", outfile)) + end +end + function merge2_vim_cmd(vim, lfile, rfile, outfile) return function() @@ -356,6 +376,8 @@ cmd = merge2_kdiff3_cmd (left_path, right_path, merged_path, lfile, rfile, outfile) elseif program_exists_in_path ("xxdiff") then cmd = merge2_xxdiff_cmd (left_path, right_path, merged_path, lfile, rfile, outfile) + elseif program_exists_in_path ("TortoiseMerge") then + cmd = merge2_tortoise_cmd(lfile, rfile, outfile) elseif string.find(editor, "emacs") ~= nil or string.find(editor, "gnu") ~= nil then if string.find(editor, "xemacs") and program_exists_in_path("xemacs") then cmd = merge2_emacs_cmd ("xemacs", lfile, rfile, outfile) @@ -449,6 +471,8 @@ cmd = merge3_kdiff3_cmd (left_path, anc_path, right_path, merged_path, lfile, afile, rfile, outfile) elseif program_exists_in_path ("xxdiff") then cmd = merge3_xxdiff_cmd (left_path, anc_path, right_path, merged_path, lfile, afile, rfile, outfile) + elseif program_exists_in_path ("TortoiseMerge") then + cmd = merge3_tortoise_cmd(lfile, afile, rfile, outfile) elseif string.find(editor, "emacs") ~= nil or string.find(editor, "gnu") ~= nil then if string.find(editor, "xemacs") and program_exists_in_path ("xemacs") then cmd = merge3_emacs_cmd ("xemacs", lfile, afile, rfile, outfile)