parsed.org

Tips by tag: diff

Context Diff by xinu on Apr 29, 2005 02:26 PM

If you want to have a context diff instead of the default that subversion offers, you can give it the binary and options to use on the commandline:

$ svn diff --diff-cmd /usr/bin/diff -x '-crN'
commandscontextdiffsubversionsvn
Diff & Patch by xinu on Jan 12, 2005 12:30 PM

Make a recursive copy of your source tree before any changes (pristine version). E.g., copy project/ to project-pristine/.

After the changes, run this command:

$ diff -crN old new > output.diff
- or -
$ diff -crN project-pristine project > name_of_change.diff

On the target system in /path/to/project/../:

$ patch -p0 --dry-run < ./name_of_change.diff

Remove --dry-run to make it take effect.

commandsdiffpatchprogrammingshell
Process Substitution by cygnus on Jan 20, 2005 10:16 AM

Zsh can run a command and let you do things with a temporary file with the resulting output:

$ emacs -nw =(ps aux)

This will create a temporary file with the output of ps aux and let you edit it in Emacs. Or:

$ diff =(ls) =(ls -F)

Will run diff on the output of the two commands.

diffemacsprocesssubstitutionzsh
RSS