# HG changeset patch # User Matti Hamalainen # Date 1210332815 -10800 # Node ID f2751483283572028d15e56f304ad892240913c4 # Parent 407ddf6cd67646138de591dbea2268be04a3bf45 Test for existence of repository. diff -r 407ddf6cd676 -r f27514832835 hg2cl --- a/hg2cl Fri May 09 14:13:37 2008 +0300 +++ b/hg2cl Fri May 09 14:33:35 2008 +0300 @@ -112,6 +112,12 @@ esac done +# test for repository +if test ! -e ".hg"; then + echo "No Mercurial repository found from this directory." + exit 2 +fi + # find the directory that this script resides in prog="$0" while test -h "$prog"; do diff -r 407ddf6cd676 -r f27514832835 svn2cl --- a/svn2cl Fri May 09 14:13:37 2008 +0300 +++ b/svn2cl Fri May 09 14:33:35 2008 +0300 @@ -110,6 +110,12 @@ esac done +# test for repository +if test ! -e ".svn"; then + echo "No Subversion repository found from this directory." + exit 2 +fi + # find the directory that this script resides in prog="$0" while test -h "$prog"; do