Mercurial > hg > easyhg
view easyhg-merge.sh @ 305:7708149d252a
Avoid exception when incremental log is called for in a situation where the heads have not actually been determined yet -- we could end up adding all existing history as an incremental update and getting a duplicate changeset error
| author | Chris Cannam |
|---|---|
| date | Sat, 26 Feb 2011 23:04:05 +0000 |
| parents | a1c8630a0057 |
| children | ea62eb083ed4 |
line wrap: on
line source
#!/bin/bash p=`dirname $0` echo Args are: $@ 1>&2 if [ "$#" -lt 3 ]; then echo Insufficient arguments: $@ exit 2 fi while [ "$#" -gt 3 ]; do shift done out="$1" left="$1" ancestor="$2" right="$3" found="" for d in kdiff3 kdiff3.exe; do if [ -x "$p/$d" ]; then found=true "$p/$d" "$ancestor" "$left" "$right" -o "$out" break elif [ -x "$(type -path $d)" ]; then found=true "$d" "$ancestor" "$left" "$right" -o "$out" break; fi done if [ -z "$found" ]; then fm=/Developer/Applications/Utilities/FileMerge.app/Contents/MacOS/FileMerge if [ -x "$fm" ]; then found=true "$fm" -left "$left" -merge "$out" -ancestor "$ancestor" -right "$right" fi fi [ -n "$found" ]
