Mercurial > hg > easyhg
view easyhg-merge.sh @ 421:653e9694a694 ignore
Use regexes for anchored filenames (i.e. "this file only" and directory); report outcome of ignore to user
author | Chris Cannam |
---|---|
date | Fri, 17 Jun 2011 11:07:30 +0100 |
parents | d2e4bf428cfc |
children | d63711ff6740 |
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" for d in kdiff3 kdiff3.exe; do exe="$p/$d" if [ ! -x "$exe" ]; then exe="$(type -path $d)" if [ ! -x "$exe" ]; then exe="" fi fi if [ -n "$exe" ]; then exec "$exe" "$ancestor" "$left" "$right" --output "$out" --auto -L1 "`basename $left` (Common ancestor)" -L2 "$left (Your current version)" -L3 "`basename $left` (Version being merged)" fi done fm=/Developer/Applications/Utilities/FileMerge.app/Contents/MacOS/FileMerge if [ -x "$fm" ]; then exec "$fm" -left "$left" -merge "$out" -ancestor "$ancestor" -right "$right" fi exit 1