- warn("$mergerc doesn't exist. Creating file with default mergers.");
- open(DATA, ">$mergerc") or error("can't open $mergerc $!");
- my $defaultrc = "".
-" function local_execute_redirected(stdin, stdout, stderr, path, ...)\n".
-" local pid\n".
-" local ret = -1\n".
-" io.flush();\n".
-" pid = spawn_redirected(stdin, stdout, stderr, path, unpack(arg))\n".
-" if (pid ~= -1) then ret, pid = wait(pid) end\n".
-" return ret\n".
-" end\n".
-" if (not execute_redirected) then -- use standard function if available\n".
-" execute_redirected = local_execute_redirected\n".
-" end\n".
-" if (not mergers.fail) then -- use standard merger if available\n".
-" mergers.fail = {\n".
-" cmd = function (tbl) return false end,\n".
-" available = function () return true end,\n".
-" wanted = function () return true end\n".
-" }\n".
-" end\n".
-" mergers.diffutils_force = {\n".
-" cmd = function (tbl)\n".
-" local ret = execute_redirected(\n".
-" \"\",\n".
-" tbl.outfile,\n".
-" \"\",\n".
-" \"diff3\",\n".
-" \"--merge\",\n".
-" \"--show-overlap\",\n".
-" \"--label\", string.format(\"[Yours]\", tbl.left_path ),\n".
-" \"--label\", string.format(\"[Original]\", tbl.anc_path ),\n".
-" \"--label\", string.format(\"[Theirs]\", tbl.right_path),\n".
-" tbl.lfile,\n".
-" tbl.afile,\n".
-" tbl.rfile\n".
-" )\n".
-" if (ret > 1) then\n".
-" io.write(gettext(\"Error running GNU diffutils 3-way difference tool 'diff3'\"))\n".
-" return false\n".
-" end\n".
-" return tbl.outfile\n".
-" end,\n".
-" available =\n".
-" function ()\n".
-" return program_exists_in_path(\"diff3\");\n".
-" end,\n".
-" wanted =\n".
-" function ()\n".
-" return true\n".
-" end\n".
-" }\n";
- print DATA $defaultrc;
- close(DATA);