Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

runrig (3385)

runrig
  dougwNO@SPAMcpan.org

Just another perl hacker somewhere near Disneyland

I have this homenode [perlmonks.org] of little consequence on Perl Monks [perlmonks.org] that you probably have no interest in whatsoever.

I also have some modules [cpan.org] on CPAN [cpan.org] some of which are marginally [cpan.org] more [cpan.org] useful [cpan.org] than others.

Journal of runrig (3385)

Tuesday July 29, 2003
01:26 PM

Cygwin

[ #13765 ]

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.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • http://unxutils.sourceforge.net/ [sourceforge.net]

    Contains both diff and patch.

    • Or you could get the Perl Power Tools [perl.com] version.

      --
      J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
      • 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...

    • 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_
  • If you're looking for a Windows diff and merge program, take a look at Araxis Merge [araxis.com]. It is outstanding.