if sudo test -d "/home/otheruser/svn"; then
You need to run it under a subshell. Example:
if sudo bash -c '[[ -d "/home/otheruser/svn" ]]'then echo "SVN exists"else echo "SVN does not exist"fi