swd - SVN word diff =================== This tiny set of scripts helps you set up SVN to use wdiff (word diff), which is like diff but shows removed and added text on a word-by-word basis instead of a line-by-line basis. This is really helpful for editing documents, because it means that reflowing a paragraph has no impact on the behaviour of svn diff. The main Awk script does two things: 1) print deleted words in red and inserted words in green; 2) trim the output of wdiff to show only the context around changed lines. It is by no means perfect, but it works 99% of the time just the way I want it to. Most people say, "Cool! I want it!" when they see it so I thought I would publish it. It falls apart when trying to parse certain symbol combinations, and a fix is certainly possible for anyone that wants to try. Instructions ============ 1) Install wdiff on your system. 2) Put this directory (swd) on your PATH. It contains the following files: README # you're reading it svn # generic svn wrapper that calls svn-wdiff given `svn wdiff' unwrap # finds the real svn binary svn-wdiff # tells svn to use wdiff-svn instead of diff wdiff-svn # calls wdiff-colours wdiff-colours # calls wdiff-colours.awk wdiff-colours.awk # actually processes the wdiff output Additionally a cache file called svn.help gets generated. 3) Edit a document under version control, deleting and adding words. 4) Now type svn wdiff instead of svn diff and bask in the cathode rays! (Can you have LCD rays?) 5) The following alias in your .bashrc or .profile is good: alias swd='svn wdiff' If you want things to be faster, use: alias swd='svn diff --diff-cmd wdiff-svn' 6) Since typing svn diff is so common, I also added the following: alias sdi='svn diff' to my list of bash aliases. Have fun! Chris Public domain, but do send improvements to: chris dot pickett at mail dot mcgill dot ca The repository is located at: https://svn.sable.mcgill.ca/sable/research/phd/cpicke/public/swd/ My website: http://www.sable.mcgill.ca/~cpicke/ Thanks ====== Daniel Shahaf for the generic svn wrapper suggestions. Roland Schwarzkopf and Thomas Knauth and Elias Assmann for bugfixes.