Check that an svn repository url does not exist

Instead of checking for return strings I would just check for the return code:

both

svn ls REPOSITORY/PATH

and

svn info REPOSITORY/PATH

return 0 if all went fine, and 1 if things went wrong; you can quickly check it out:

echo $?

so in a bash script just do something like:

error=$?
if [ $error -ne 0 ]; then
      YOUR ERROR HANDLING
fi

works like a treat!

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)