monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] Re: How to 3-way merge with kdiff3 and Cygwin?


From: Graydon Hoare
Subject: [Monotone-devel] Re: How to 3-way merge with kdiff3 and Cygwin?
Date: Wed, 21 Feb 2007 11:50:08 -0800
User-agent: Thunderbird 2.0b2 (Windows/20070116)

Boris wrote:

How do others merge on Cygwin?

I use the following entries in my monotonerc file. Something like this should probably be fixed up in mainline; we're not very useful on cygwin.

-graydon

--snip--

function cygpath(p)
        p = string.gsub(p, "/", "\\")
        p = string.gsub(p, "\\cygdrive\\c", "C:")
        return p
end


mergers.kdiff3 = {
   cmd = function (tbl)
      local path = "kdiff3"
      local ret = execute(path,
                          "--L1", tbl.anc_path,
                          "--L2", tbl.left_path,
                          "--L3", tbl.right_path,
                          cygpath(tbl.afile),
                          cygpath(tbl.lfile),
                          cygpath(tbl.rfile),
                          "--merge",
                          "--o", cygpath(tbl.outfile))
      if (ret ~= 0) then
io.write(string.format(gettext("Error running merger '%s'\n"), path))
         return false
      end
      return tbl.outfile
   end,
   available = function () return program_exists_in_path("kdiff3") end,
   wanted = function () return true end
}





reply via email to

[Prev in Thread] Current Thread [Next in Thread]