Mercurial > hg
changeset 828:7a6acd56cd5a
Hide error message of type command.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Thu, 04 Aug 2005 16:56:44 +0100 |
parents | eef752151556 |
children | 764b0350acb8 |
files | hgmerge |
diffstat | 1 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- 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