Mercurial > hg > buildtools
changeset 4:f27514832835
Test for existence of repository.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 09 May 2008 14:33:35 +0300 |
parents | 407ddf6cd676 |
children | cdd7f7b6d4b0 |
files | hg2cl svn2cl |
diffstat | 2 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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