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

Re: Side-by-Side diff in Linux console

From: Stephane Bortzmeyer <bortzmeyer_at_nic.fr>
Date: 2005-04-18 10:32:27 CEST

On Mon, Apr 18, 2005 at 01:15:00AM -0700,
 Andrew Lee Paul <andrew_lee_paul@yahoo.com> wrote
 a message of 46 lines which said:

> svn: '/usr/bin/diff -y' returned 255
>
> What am I doing wrong here?

I *believe* (warning: we are entering an area of ignorance) that you
must use a wrapper script, Subversion probably calls exec() and not
system().

In .subversion/config:

[helpers]
diff-cmd = diff-side-by-side

In $PATH/diff-side-by-side:

#!/bin/sh

ARGS=`getopt --name mydiff --options "+uL:" -- "$@"`

eval set -- "$ARGS"

while true ; do
        case "$1" in
                -u) shift ;; # Ignore
                -L) if [ "$title1" = "" ]; then
                       title1="$2";
                    else
                       title2="$2";
                    fi;
                     shift 2 ;;
                --) shift ; break ;;
                *) echo "Internal error!" ; exit 1 ;;
        esac
done

file1=$1
file2=$2

command="diff -y $file1 $file2"
eval $command

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Apr 18 10:34:17 2005

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

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