[issue817] hgmerge: --help option gives a message that ends strangely

Giorgos Keramidas keramida at ceid.upatras.gr
Sat Nov 3 11:56:54 CDT 2007


On 2007-11-02 19:51, Vincent Danjean <mercurial-bugs at selenic.com> wrote:
> 
> New submission from Vincent Danjean <vdanjean.ml at free.fr>:

> fix bug #443428
> Index: mercurial-0.9.5/hgmerge
> ===================================================================
> --- mercurial-0.9.5.orig/hgmerge        2007-10-28 21:29:23.000000000 +0100
> +++ mercurial-0.9.5/hgmerge     2007-10-28 21:31:47.000000000 +0100
> @@ -13,6 +13,11 @@
>  
>  set -e # bail out quickly on failure
>  
> +if [ $# != 3 ]; then
> +  echo "Invalid usage of hgmerge. Check manpage" 1>&2
> +  exit 1
> +fi
> +

In my local hg-merge(1) wrapper for gdiff(3), I use something very
similar, which may be of use too:

	if test $# -ne 3 ; then
	    echo >&2 "usage: `basename $0` LOCAL BASE OTHER"
	    exit 1
	fi



More information about the Mercurial-devel mailing list