Mercurial > hg > easyhg
annotate easyhg-merge.sh @ 361:4cd753e083cc feature_91b
Add Rename and Copy to right-button menu on file status widget.
(This is the real feature 91 -- I bungled the feature number with the earlier feature_91 branch, which actually addressed feature 106.)
author | Chris Cannam |
---|---|
date | Thu, 17 Mar 2011 17:34:23 +0000 |
parents | ea62eb083ed4 |
children | d2e4bf428cfc |
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@269 | 15 for d in kdiff3 kdiff3.exe; do |
Chris@269 | 16 if [ -x "$p/$d" ]; then |
Chris@328 | 17 exec "$p/$d" "$ancestor" "$left" "$right" -o "$out" |
Chris@274 | 18 elif [ -x "$(type -path $d)" ]; then |
Chris@328 | 19 exec "$d" "$ancestor" "$left" "$right" -o "$out" |
Chris@269 | 20 fi |
Chris@269 | 21 done |
Chris@328 | 22 fm=/Developer/Applications/Utilities/FileMerge.app/Contents/MacOS/FileMerge |
Chris@328 | 23 if [ -x "$fm" ]; then |
Chris@328 | 24 exec "$fm" -left "$left" -merge "$out" -ancestor "$ancestor" -right "$right" |
Chris@269 | 25 fi |
Chris@328 | 26 exit 1 |