Cygwin

runrig on 2003-07-29T18:26:28

All I wanted was diff and patch from the Cygwin tools (I installed the whole thing on my old system, but I just wanted the minumum on the new one), so when you get to selecting packages (running their setup.exe), you have to open up every category, and uncheck every package, and open up 'Utils' and check 'patch' (because it's not checked by default). It loads most dependencies by default, except, for some reason, libintl1 (you end up getting "Can't find libxxxx.dll when you try to run after installation). I think I saw that in the FAQ, but why is it not just in the dependency list and automatically installed?

Why am I doing this? Because I'm patching SqlWindows code (I've mentioned this before, hope I'm not being too redundant), and the built in diff/merge tool sux. And I like having a record of my changes in the form of diffs. You could probably get the same thing from CVS, but we're already using the built in Version control, and not likely to change that anytime soon (or maybe I should just set up my own repository). It has diff files (which it calls 'reverse-deltas'), but they're useless for seeing what changes you actually made. If you add, say, a while loop block of code, the reverse-delta will just list the first line of the block (the "while xxxx" part), so the file is only good for undoing your changes to a particular version of code. Bleh.


non-cygwin win32 ports

gav on 2003-07-29T19:04:31

http://unxutils.sourceforge.net/

Contains both diff and patch.

Re:non-cygwin win32 ports

jdavidb on 2003-07-29T19:52:07

Or you could get the Perl Power Tools version.

Re:non-cygwin win32 ports

runrig on 2003-07-29T20:51:53

Or you could get the Perl Power Tools version.
I looked at that. The diff seems to work ok, but patch isn't working on Windows. I tracked it down to line endings, but didn't have time to actually make it work. The problem is that the files are set to binmode, but the regexes use 'pattern\n' in matches at the end of line. I tried just taking out the binmode setting, but then there were other problems; I think you also maybe have to change the regexen to use '$' instead of '\n'. I did email the author...

Re:non-cygwin win32 ports

runrig on 2003-07-29T22:08:04

Thanks. This is much better for my purposes. The Cygwin utilities have odd quirks that these utilities don't seem to have, e.g., after Cygwin patches a DOS file, it leaves it with Unix line endings. And diff behaves differently if file paths have forward or backward slashes, e.g., "diff ./tmp.txt .\tmp.txt" thinks the entire file is different, whereas "diff ./tmp.txt ./tmp.txt" or "diff .\tmp.txt .\tmp.txt" works ok. And no path behaves as if there were forward slashes in the path, so "diff tmp.txt ..\this_directory\tmp.txt" doesn't work either.

Araxis Merge

jplindstrom on 2003-07-29T19:18:45

If you're looking for a Windows diff and merge program, take a look at Araxis Merge. It is outstanding.

Re:Araxis Merge

runrig on 2003-07-29T20:53:58

I've used Araxis Merge before. It is nice, but I'm trying not to spend money at the moment :-)