[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: graphical diff'ing script

From: Timothee Besset <ttimo_at_idsoftware.com>
Date: 2002-12-09 11:24:20 CET

Awesome!

This doesn't quite work with xxdiff here though.
$ svndiff neo/sys/linux/ChangeLog
xxdiff: invalid option -- g
xxdiff (cmdline.cpp:616):
Argument error.
Use 'xxdiff --help' for more information.

(regular xxdiff on a Debian Sid box)

But .. I got it working with meld (needed to remove the -geometry part as
well) http://meld.sf.net/

Again, great work..

TTimo

On Mon, 09 Dec 2002 03:43:47 -0600
kbrannen@gte.net wrote:

> Here's a quick script I put together to help with graphical diff'ing. It
> doesn't handle "-r" kind of stuff, but I rarely need that; and it probably
> wouldn't be that hard to add. I'll toss it to the list in case others may
> find it useful. I call it "svndiff"; it's a shell script you should put
> somewhere in your PATH. Just put a filename after the command and enjoy. :-)
>
> A big thanks to Vladimir for the "svn cat" code!
>
> Kevin
>
> -----
>
> #!/bin/bash
> # also works with ksh
> #
> # usage: svndiff file
> # graphically show the diff between our file and that last thing
> # in the repository
> # uses the program in the env.var. $DIFF, or "xxdiff" by default
> # tested with: xxdiff, mgdiff, tkdiff
>
> ###################################### start configurable stuff
> # default graphical diff program
> dif=${DIFF:-xxdiff}
> # default geometry, works for the average X program
> geometry="-geometry 1000x400+0+0"
> # handle tkdiff not liking geometries
> [[ $dif = tkdiff ]] && geometry=""
> ###################################### end configurable stuff
>
> if [[ ! -d .svn ]]
> then
> echo ERROR: You are not in a SVN working copy directory.
> exit 1
> fi
> file=$1
> last=${file}_LasT
>
> trap "rm -f $last" 2 3 15
>
> svn cat $file > $last 2>/dev/null
> ${DIFF:-xxdiff} $geometry $last $file
> rm -f $last
>
> #end
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Dec 9 11:25:25 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.