I searched and didn't find, and had to figure stuff out... I hope to save you the trouble.

Thursday, April 23, 2009

Use tkdiff to view changes in subversion

To use tkdiff to view changed files in an svn repository put the following in a script called svndiff somewhere in your path, and make it executable:
#! /bin/bash
# Script to use a visual differ to view svn changes,
# supporting multiple files in one session

SVN=/usr/local/bin/svn
DIFF=tkdiff

args=""
sep=""
while read pair; do
args="$args $sep $pair"
sep=":"
done < <($SVN diff "$@" --diff-cmd echo | \
awk '/^-L/ {gsub(/\/tmp\/tmp/, "/dev/null"); print $(NF-1), $NF; next}')
$DIFF $args

No comments:

Post a Comment

Followers