diff options
author | Frej Drejhammar <frej.drejhammar@gmail.com> | 2013-09-08 14:32:08 +0200 |
---|---|---|
committer | Andrey Rahmatullin <wrar@wrar.name> | 2014-02-06 23:13:37 +0600 |
commit | 013ade050f661e53241af694d0b19483a39e3de6 (patch) | |
tree | 047a25b2b272e9503913a5b0a5b9e29792f69637 | |
parent | 3cd8c08f14497208f56da2e5918d1e2de0f24dff (diff) | |
download | hg-fast-export-013ade050f661e53241af694d0b19483a39e3de6.tar.gz |
Give a proper error message when the hg repo is not known
hg-fast-export.sh always passes the --repo flag to hg-fast-export.py.
If, for some reason, we have a state file where the repo-url is an
empty string the checks in hg-fast-export.py will not work and the
user will be confused. Therefore we check that the url is specified
before calling hg-fast-export.py.
-rwxr-xr-x | hg-fast-export.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hg-fast-export.sh b/hg-fast-export.sh index cc720f3..7dd918c 100755 --- a/hg-fast-export.sh +++ b/hg-fast-export.sh @@ -70,6 +70,11 @@ if [ x"$REPO" = x -a -f "$GIT_DIR/$PFX-$SFX_STATE" ] ; then echo "Using last hg repository \"$REPO\"" fi +if [ -z "$REPO" ]; then + echo "no repo given, use -r flag" + exit 1 +fi + # make sure we have a marks cache if [ ! -f "$GIT_DIR/$PFX-$SFX_MARKS" ] ; then touch "$GIT_DIR/$PFX-$SFX_MARKS" |