Re: Diffing directories with external diff

"kirillmueller" <[email protected]> Thu, 23 Feb 2006 12:09:57 -0000
Newsgroups gmane.comp.version-control.cvs.gui.devel
Message-ID <[email protected]>
Thank you for your comments so far.

[Timestamp comparison] I guess it is a good idea to make this 
optimization an option as Jens suggested. I can do diffs between 
sandbox and HEAD of the repository just by selecting the modified 
files, what I cannot do easily is diffing the sandbox against a 
specific tag/date or diffing two tags/dates. Since the server-based 
approach is more generic, I'll do that first and implement the 
timestamp approach as an optimization for the case "diff sandbox 
against HEAD".

[Replicate folder] Yes, I'm using Araxis Merge -- it displays panes 
for each file in one main window. Araxis Merge also detects when 
there is an open instance, and opens a new comparison in that 
instance. WinMerge 2.4 has an MDI interface, but I've found no way to 
reuse instances. I feel this is more a problem with WinMerge than 
with WinCVS, anyway we can try to work around this.

Copying the entire folder to a temporary location will be horribly 
slow, especially when the repository is on the internet. We could 
find out what files have really changed and insert "dummy" files 
(either taken from the sandbox or zero-length files) with equal 
timestamps for the files that have not changed. Then, WinMerge would 
detect that equal files were equal by the timestamps (there is an 
option for timestamp comparison in WinMerge) and not show them. We 
could also simply skip the files that have not changed, this would be 
as fast as the other approach, but then, when comparing against the 
sandbox, Araxis Merge an WinMerge would show differences (existing 
vs. non-existing) for equal files. -- Personally, I still don't like 
this approach for its weak performance. Usually, differences tend to 
be only a handful of files, and sandboxes sometimes have many 
thousands of files that all need to be created, touched and destroyed 
just for the convenience to show everything in one window...

There is an option to start WinMerge with a project file (XML format) 
that describes what files need to be compared. We could implement the 
desired behavior as follows:

- In "Preferences/WinCvs", add a new executable path for "multi-file 
diff"
- This multi-file diff application would get all files to be diffed 
either in one (huge) command line, from stdin or from a temporary file
- A wrapper for WinMerge would generate a project file from this 
command line/stdin input/temp file and start WinMerge with this 
project file

Since the WinCVS/WinMerge combination may be a really frequent case, 
WinCVS also could output a WinMerge project file by itself. The 
WinMerge project format is pretty generic, so if other diff 
application had the same problem they could convert this input file 
themselves.

[OT: Diff performance] Currently, external diff is implemented by 
issung an update command for every single file and capturing CVS's 
stdout to a temporary file. This means reconnecting to the server for 
every file and really slows down multi-file diff. I'll try and see if 
I can change this to one checkout command for each distinct CVSROOT. 
IMO this means reading the CVS/cvsroot file for every parent folder 
involved.

Another option would be to keep the current diff approach but issue 
one update command for all files to be diffed and capture CVS's 
stderr output as well -- when a new file begins, CVS writes its name 
to stderr, and WinCvs would open a new target temporary file then.


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/