Plugin unpack/pack order of events

Main development forum.

Plugin unpack/pack order of events

Postby dmccarty » Tue Jul 20, 2010 9:48 pm

(Sorry for the dupe, I originally posted this in the user forum)

I typically use WinMerge to merge source before checking in to our source control (Sablime), which uses an old mish mash of unix scripts, binaries and a GET/POST HTTP front-end. My typical workflow looks something like:

1. Do dev work on Win32/64, make sure things work
2. edget (checkout) the corresponding files from a "mirror" fs on unix
3. WinMerge my Windows sources to the unix files
4. edput (checkin) the unix files
5. submit the MR

The edget/edput commands are some standard scripts that call the source control back-end. They have to be supplied with various command-line parameters, though this can be handled by an HTTP POST as well. I would like to write a plugin that would automatically handle our checkout before the diff and the checkin after the diff.

I can't seem to find what I'm looking for in the docs, but in looking over some of the plugin example sources it seems like the main work is done in the UnpackFile() and PackFile() functions, which makes me think that the order of events for the function call wouldn't allow me to do what I want?

I think the current order of events looks like this:
File Open:
1. WinMerge opens the file
2. WinMerge passes the input stream to UnpackFile() in my plugin
3. My plugin modifies the input stream if it wishes and writes to the output stream
4. WinMerge displays the file

File Save/Close:
A. WinMerge passes the input stream to PackFile() in my plugin
B. My plugin modifies the input stream if it wishes and writes to the output stream
C. WinMerge closes the file

I need to do a checkout before #1 and a checkin after C. Is this possible with the current plugin model?

Thanks in advance,
Dan.
dmccarty
 
Posts: 2
Joined: Thu Jul 15, 2010 9:56 pm

Return to Developers

Who is online

Users browsing this forum: No registered users and 2 guests

cron