Mercurial > hg > buildtools
diff hg2cl @ 4:f27514832835
Test for existence of repository.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 09 May 2008 14:33:35 +0300 |
parents | 4cf32ca7b15e |
children | 8f11993b361d |
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