# HG changeset patch # User Thomas Arendsen Hein # Date 1123171004 -3600 # Node ID 7a6acd56cd5a1e128a7db0c099bebb00e0c1820b # Parent eef752151556d45783128473e937b52378e7903b Hide error message of type command. diff -r eef752151556 -r 7a6acd56cd5a hgmerge --- a/hgmerge Mon Aug 01 23:34:23 2005 -0800 +++ b/hgmerge Thu Aug 04 16:56:44 2005 +0100 @@ -19,13 +19,13 @@ cp "$LOCAL" "$LOCAL.orig" # Attempt to do a non-interactive merge -if type merge > /dev/null ; then +if type merge > /dev/null 2>&1; then if merge "$LOCAL" "$BASE" "$OTHER" 2> /dev/null; then # success! exit 0 fi cp "$LOCAL.orig" "$LOCAL" -elif type diff3 > /dev/null ; then +elif type diff3 > /dev/null 2>&1; then if diff3 -m "$LOCAL.orig" "$BASE" "$OTHER" > "$LOCAL" ; then # success exit 0 @@ -35,7 +35,7 @@ if [ -n "$DISPLAY" ]; then # try using kdiff3, which is fairly nice - if type kdiff3 > /dev/null ; then + if type kdiff3 > /dev/null 2>&1; then if kdiff3 --auto "$BASE" "$LOCAL" "$OTHER" -o "$LOCAL" ; then exit 0 else @@ -44,7 +44,7 @@ fi # try using tkdiff, which is a bit less sophisticated - if type tkdiff > /dev/null ; then + if type tkdiff > /dev/null 2>&1; then if tkdiff "$LOCAL" "$OTHER" -a "$BASE" -o "$LOCAL" ; then exit 0 else @@ -54,13 +54,13 @@ fi # Attempt to do a merge with $EDITOR -if type merge > /dev/null ; then +if type merge > /dev/null 2>&1; then echo "conflicts detected in $LOCAL" merge "$LOCAL" "$BASE" "$OTHER" 2>/dev/null || $EDITOR "$LOCAL" exit 0 fi -if type diff3 > /dev/null ; then +if type diff3 > /dev/null 2>&1; then echo "conflicts detected in $LOCAL" diff3 -m "$LOCAL.orig" "$BASE" "$OTHER" > "$LOCAL" || $EDITOR "$LOCAL" exit 0 @@ -73,8 +73,8 @@ } # attempt to manually merge with diff and patch -if type diff > /dev/null ; then - if type patch > /dev/null ; then +if type diff > /dev/null 2>&1; then + if type patch > /dev/null 2>&1; then # Remove temporary files even if we get interrupted trap "cleanup_exit 1" TERM KILL INT QUIT ABRT