monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] external diff hook


From: Matthew A. Nicholson
Subject: Re: [Monotone-devel] external diff hook
Date: Tue, 27 Jun 2006 20:14:51 -0500
User-agent: Thunderbird 1.5.0.4 (X11/20060619)

Nevermind, I see this is for the mtn diff --external command, not merging.

Matthew A. Nicholson wrote:
I thought monotone a;ready sypported xxdiff.

Derek Scherger wrote:
Here's a little something I've been using lately. It's a hook definition
that allows monotone to use xxdiff as the external diff tool:

function external_diff(file_path, data_old, data_new, is_binary,
diff_args, rev_old, rev_new)
   local old_file = write_to_temporary_file(data_old);
   local new_file = write_to_temporary_file(data_new);

   execute("xxdiff", "-bBw",
    "--title1", "[OLD] " .. file_path, old_file,
    "--title2", "[NEW] " .. file_path, new_file);

   os.remove(old_file);
   os.remove(new_file);
end

Put this in your ~/.monotone/monotonerc or _MTN/monotonerc and invoke
xxdiff with:

    $ mtn diff --external

Cheers,
Derek



_______________________________________________
Monotone-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/monotone-devel


--
Matthew A. Nicholson
matt-land.com




reply via email to

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