You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Cassie <do...@apache.org> on 2008/01/19 02:41:33 UTC
a better svn diff
It took me a while to figure out how to get svn to diff better so I thought
I would share what I found with you guys. The general idea is that svn diff
takes in a --diff-cmd param where you can pass in another tool to do the
diffing, however the interface expected is very odd. A simple solution is
this:
1. Make a wrapper file like this:
#!/bin/sh
# Configure your favorite diff program here. (I'm just using tkdiff)
DIFF="/usr/local/bin/my-diff-tool"
# Subversion provides the paths we need as the sixth and seventh
# parameters.
LEFT=${6}
RIGHT=${7}
# Call the diff command (change the following line to make sense for
# your merge program).
DIFF $LEFT $RIGHT
# Return an errorcode of 0 if no differences were detected, 1 if some were.
# Any other errorcode will be treated as fatal.
2. then run
svn diff --diff-cmd mywrapper.sh
I'm sure someone on this list probably has more sophisticated things as
well...
- Cassie