# # # patch "ChangeLog" # from [dd911157c0cc9de3b27fb9fbe9454021a93b9966] # to [603ba701b7da08d620b0450a3eddfd8bb7eea463] # # patch "std_hooks.lua" # from [29e090db74372425eb9f1e35d448c2c9d992f274] # to [9ea5ff4f7eacc7f5b5f1e8ec181154434a48637b] # ============================================================ --- ChangeLog dd911157c0cc9de3b27fb9fbe9454021a93b9966 +++ ChangeLog 603ba701b7da08d620b0450a3eddfd8bb7eea463 @@ -1,3 +1,10 @@ +2006-05-29 Richard Levitte + + * std_hooks.lua (merge3): Check the exit code from the merging + program to detect failure. We could do that by strictly checking + if the output file exists, but since some programs, like meld, + don't produce a specific output file, that method is unsafe. + 2006-05-28 Richard Levitte * po/sv.po: A few new and fuzzy strings to (re)translate. ============================================================ --- std_hooks.lua 29e090db74372425eb9f1e35d448c2c9d992f274 +++ std_hooks.lua 9ea5ff4f7eacc7f5b5f1e8ec181154434a48637b @@ -489,17 +489,21 @@ if cmd ~=nil then io.write (string.format(gettext("executing external 3-way merge command\n"))) - cmd () - if tbl.meld_exists - then - ret = read_contents_of_file (tbl.afile, "r") - else - ret = read_contents_of_file (tbl.outfile, "r") - end - if string.len (ret) == 0 - then - ret = nil - end + ret = nil + -- cmd() return 0 on success. + if cmd () == 0 + then + if tbl.meld_exists + then + ret = read_contents_of_file (tbl.afile, "r") + else + ret = read_contents_of_file (tbl.outfile, "r") + end + if string.len (ret) == 0 + then + ret = nil + end + end else io.write (string.format("No external 3-way merge command found.\n".. "You may want to check that $EDITOR is set to an editor that supports 3-way merge,\n".. @@ -654,16 +658,20 @@ if item.name == "pattern" then if matches and not cont then return false end matches = false + cont = false for j, val in pairs(item.values) do if globish_match(val, branch) then matches = true end end elseif item.name == "allow" then if matches then for j, val in pairs(item.values) do if val == "*" then return true end + if val == "" and ident == nil then return true end if globish_match(val, ident) then return true end end end elseif item.name == "deny" then if matches then for j, val in pairs(item.values) do + if val == "*" then return false end + if val == "" and ident == nil then return false end if globish_match(val, ident) then return false end end end elseif item.name == "continue" then if matches then