Re: Diffing directories with external diff

"kirillmueller" <[email protected]> Mon, 17 Apr 2006 20:13:28 -0000
Newsgroups gmane.comp.version-control.cvs.gui.devel
Message-ID <[email protected]>
I got it working, finally!

My local WinCvs performs a diff for multiple files with only one 
invocation of cvs. It issues one "cvs update -p" with all files in 
question as argument. The command produces output on stderr _and_ 
stdout -- the stderr output contains the name of the current file, 
followed by the file's contents on stdout. I wrote a filter class 
that parses this kind of output and generates temporary files 
accordingly. After all temp files have been generated, the external 
differ is launched once for every pair of files.

I've been testing the feature for a month now. Diffing multiple files 
works much faster than before, with both local and remote 
repositories. Apart from a problem that I've fixed today (correct 
handling of added/removed files) I've found only one problem: The 
differs that I've tested (Araxis Merge and WinMerge 2.4) crashed with 
a huge (> 100) number of invocations. The problem did not occur 
before because a cvs command was been issued before each invocation 
of the differ, giving it time to sort its affairs and not to crash.

Do we need to care about that? If so, I would like to have this fixed 
before I check in. I have four ideas and would appreciate feedback.

1. Issue a diff command after every temp file has been written. Needs 
special handling for the case "diff tag against tag". For local 
repositories, the update still may be fast enough to confuse the 
differ.

2. Offer an option "Wait for external diff command to complete" 
(checkbox in global options, WinCvs pane, default: off). When 
checked, WinCvs would not launch a second diff instance before the 
first one hasn't completed. This solution works with Araxis Merge (it 
has its own launcher that exits immediately), but not with WinMerge.

3. Launch only a limited number of comparisons (say, 10) at a time, 
and prompt the user to continue or abort. The number can be made 
customizable in above options pane.

4. Hard-code a ::Sleep(50) between invocations of the external differ.


Cheers,

Kirill





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/cvsgui-dev/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/