Second, I think it would be helpful to have a couple additional keyboard/macro functions for Diff. I know you can start the diff dialog, but it might also be useful to be able to have some functions to set the 2 file names to be compared (and any diff options) and launch the actual diff display, either the diff dialog version or the tool window difference display.
I've got a list of files that create conflicts on a sync between 2 machines, and it would be helpful to be able to write a macro to process the list in pairs, view the diff, and decide which to keep.
There is already a macro to do this, diff2Tabs.lua. It can diff two sequential tabs. You may move the tabs to make them sequential if the tabs are not when you begin.First, the ability to select 2 files on the buffer list and do a diff would be useful.
Code: Select all
function key_macro() screen_update_disable() local fname1 = get_file_name() WindowNext() local fname2 = get_file_name() WindowPrevious() screen_update() local cmd = 'p4merge.exe "' .. fname1 .. '" "' .. fname2 .. '"' --message_box(1,cmd) system(cmd) end key_macro()
The macro code is shown in the mesaage text; just change p4merge.exe to point the WinDiff executabe. This is the difference tool that comes with Perforce.I have neither that macro nor that program
Here is another nice difference tool: http://www.zeusedit.com/forum/viewtopic.php?t=1435