Mercurial > hg > easyhg
annotate easyhg-merge.sh @ 540:fc2df97920e8 fswatcher
Introduce FsWatcher into main window (though it isn't fully rigged up yet)
author | Chris Cannam |
---|---|
date | Mon, 13 Feb 2012 17:29:06 +0000 |
parents | 5f04fa848f34 |
children |
rev | line source |
---|---|
Chris@215 | 1 #!/bin/bash |
Chris@269 | 2 p=`dirname $0` |
Chris@215 | 3 echo Args are: $@ 1>&2 |
Chris@215 | 4 if [ "$#" -lt 3 ]; then |
Chris@215 | 5 echo Insufficient arguments: $@ |
Chris@215 | 6 exit 2 |
Chris@215 | 7 fi |
Chris@215 | 8 while [ "$#" -gt 3 ]; do |
Chris@215 | 9 shift |
Chris@215 | 10 done |
Chris@269 | 11 out="$1" |
Chris@269 | 12 left="$1" |
Chris@269 | 13 ancestor="$2" |
Chris@269 | 14 right="$3" |
Chris@469 | 15 for d in easyhg-kdiff3 easyhg-kdiff3.exe kdiff3 kdiff3.exe; do |
Chris@379 | 16 exe="$p/$d" |
Chris@379 | 17 if [ ! -x "$exe" ]; then |
Chris@379 | 18 exe="$(type -path $d)" |
Chris@379 | 19 if [ ! -x "$exe" ]; then |
Chris@379 | 20 exe="" |
Chris@379 | 21 fi |
Chris@379 | 22 fi |
Chris@379 | 23 if [ -n "$exe" ]; then |
Chris@536 | 24 exec "$exe" --auto "$ancestor" "$left" "$right" --output "$out" --auto -L1 "`basename $left` (Common ancestor)" -L2 "$left (Your current version)" -L3 "`basename $left` (Version being merged)" |
Chris@269 | 25 fi |
Chris@269 | 26 done |
Chris@328 | 27 fm=/Developer/Applications/Utilities/FileMerge.app/Contents/MacOS/FileMerge |
Chris@328 | 28 if [ -x "$fm" ]; then |
Chris@328 | 29 exec "$fm" -left "$left" -merge "$out" -ancestor "$ancestor" -right "$right" |
Chris@269 | 30 fi |
Chris@328 | 31 exit 1 |