Mercurial > hg > easyhg
annotate easyhg-extdiff.sh @ 691:5b3bcb2d0943
Update handling of auth extension load failures on Windows: hg itself is returning a successful error code, so we must check the output in the extension test phase. Also fix a failure & crash when trying to use fallback auth mechanism
| author | Chris Cannam | 
|---|---|
| date | Mon, 10 Dec 2018 12:03:04 +0000 | 
| parents | d63711ff6740 | 
| children | 
| rev | line source | 
|---|---|
| Chris@274 | 1 #!/bin/bash -x | 
| Chris@269 | 2 p=`dirname $0` | 
| Chris@210 | 3 if [ $# -lt 2 ]; then | 
| Chris@210 | 4 echo Insufficient arguments: $@ | 
| Chris@210 | 5 exit 2 | 
| Chris@210 | 6 fi | 
| Chris@210 | 7 while [ $# -gt 2 ]; do | 
| Chris@210 | 8 shift | 
| Chris@210 | 9 done | 
| Chris@469 | 10 for d in easyhg-kdiff3 easyhg-kdiff3.exe kdiff3 kdiff3.exe; do | 
| Chris@269 | 11 if [ -x "$p/$d" ]; then | 
| Chris@328 | 12 exec "$p/$d" "$1" "$2" | 
| Chris@274 | 13 elif [ -x "$(type -path $d)" ]; then | 
| Chris@328 | 14 exec "$d" "$1" "$2" | 
| Chris@269 | 15 fi | 
| Chris@269 | 16 done | 
| Chris@328 | 17 od=/usr/bin/opendiff | 
| Chris@328 | 18 if [ -x "$od" ]; then | 
| Chris@328 | 19 "$od" "$1" "$2" | cat | 
| Chris@328 | 20 exit 0 | 
| Chris@269 | 21 fi | 
| Chris@328 | 22 exit 1 | 
| Chris@274 | 23 | 
