comparison hgmerge @ 303:15a9e55e7ea5

Check if $DISPLAY is set before using tkdiff or kdiff3.
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 10 Jun 2005 07:50:20 +0100
parents a69c3b2957d1
children 38fb7d23b78d
comparison
equal deleted inserted replaced
299:7c239fad0f27 303:15a9e55e7ea5
27 exit 0 27 exit 0
28 fi 28 fi
29 cp $LOCAL.orig $LOCAL 29 cp $LOCAL.orig $LOCAL
30 fi 30 fi
31 31
32 # try using kdiff3, which is fairly nice 32 if [ -n "$DISPLAY" ]; then
33 if which kdiff3 > /dev/null ; then 33 # try using kdiff3, which is fairly nice
34 if kdiff3 --auto $BASE $LOCAL $OTHER -o $LOCAL ; then 34 if which kdiff3 > /dev/null ; then
35 exit 0 35 if kdiff3 --auto $BASE $LOCAL $OTHER -o $LOCAL ; then
36 else 36 exit 0
37 exit 1 37 else
38 exit 1
39 fi
38 fi 40 fi
39 fi
40 41
41 # try using tkdiff, which is a bit less sophisticated 42 # try using tkdiff, which is a bit less sophisticated
42 if which tkdiff > /dev/null ; then 43 if which tkdiff > /dev/null ; then
43 if tkdiff $LOCAL $OTHER -a $BASE -o $LOCAL ; then 44 if tkdiff $LOCAL $OTHER -a $BASE -o $LOCAL ; then
44 exit 0 45 exit 0
45 else 46 else
46 exit 1 47 exit 1
48 fi
47 fi 49 fi
48 fi 50 fi
49 51
50 # Attempt to do a merge with $EDITOR 52 # Attempt to do a merge with $EDITOR
51 if which merge > /dev/null ; then 53 if which merge > /dev/null ; then