# # # patch "ChangeLog" # from [ce11cd3ab433ce9fe8c1645321267dc93865514e] # to [afbfbc85661520b6b22d180f74da2e477c9fb37a] # # patch "mtn.1" # from [d2591d8c59bb4f17910e39919aa4eac96e9668f3] # to [2cbc38f5f198204b0c6e3ee962545979d4c9f34a] # # patch "std_hooks.lua" # from [7d02599c61fce706fbf058f315265bd59fbb8b25] # to [d7dca04b8ad3933e828583bf53ac06874fea9620] # ============================================================ --- ChangeLog ce11cd3ab433ce9fe8c1645321267dc93865514e +++ ChangeLog afbfbc85661520b6b22d180f74da2e477c9fb37a @@ -1,3 +1,12 @@ +2007-02-04 Ralf S. Engelschall + + (via Richard Levitte ) + * mtn.1: Fix two typos. + * std_hooks.lua: Add support for a "last resort" merging via GNU + diffutils' diff3/sdiff (it first shows the 3-way diff via diff3 + and then allows interactive 2-way merging via sdiff -- a little + bit similar to what the FreeBSD mergemaster script does). + 2007-02-01 Matthew Gregan * sqlite/*: Import SQLite 3.3.12. ============================================================ --- mtn.1 d2591d8c59bb4f17910e39919aa4eac96e9668f3 +++ mtn.1 2cbc38f5f198204b0c6e3ee962545979d4c9f34a @@ -19,7 +19,7 @@ Make a "branch" cert approving of a revi Make a "branch" cert approving of a revision's membership in a branch. .TP \fBdisapprove\fP \fI\fP -Disapprove of a revision, committing the inverse changes as as a +Disapprove of a revision, committing the inverse changes as a descendant of the disapproved revision. .TP \fBtag\fP \fI \fP @@ -45,7 +45,7 @@ Generate an RSA key-pair and store it in \fBgenkey\fP \fI\fP Generate an RSA key-pair and store it in the database. .TP -\chkeypass\fP \fI\fP +\fBchkeypass\fP \fI\fP Change passphrase of the private half of a key. .TP \fBlist certs\fP \fI\fP ============================================================ --- std_hooks.lua 7d02599c61fce706fbf058f315265bd59fbb8b25 +++ std_hooks.lua d7dca04b8ad3933e828583bf53ac06874fea9620 @@ -458,6 +458,48 @@ mergers.rcsmerge = { wanted = function () return os.getenv("MTN_RCSMERGE") ~= nil end } +mergers.diffutils = { + cmd = function (tbl) + local ret = execute( + "diff3", + "--merge", + "--label", string.format("%s [left]", tbl.left_path ), + "--label", string.format("%s [ancestor]", tbl.anc_path ), + "--label", string.format("%s [right]", tbl.right_path), + tbl.lfile, + tbl.afile, + tbl.rfile + ) + if (ret ~= 0) then + io.write(gettext("Error running GNU diffutils 3-way difference tool 'diff3'\n")) + return false + end + local ret = execute( + "sdiff", + "--diff-program=diff", + "--suppress-common-lines", + "--minimal", + "--output", tbl.outfile, + tbl.lfile, + tbl.rfile + ) + if (ret == 2) then + io.write(gettext("Error running GNU diffutils 2-two merging tool 'sdiff'\n")) + return false + end + return tbl.outfile + end, + available = + function () + return program_exists_in_path("diff3") and + program_exists_in_path("sdiff"); + end, + wanted = + function () + return true + end +} + mergers.emacs = { cmd = function (tbl) local emacs @@ -592,7 +634,7 @@ function get_preferred_merge3_command (t end function get_preferred_merge3_command (tbl) - local default_order = {"kdiff3", "xxdiff", "opendiff", "tortoise", "emacs", "vim", "meld"} + local default_order = {"kdiff3", "xxdiff", "opendiff", "tortoise", "emacs", "vim", "meld", "diffutils"} local function existmerger(name) local m = mergers[name] if type(m) == "table" and m.available(tbl) then