change method that tell if cwd is a working copy

tell if cwd is a working copy according to 'svn status', not to '.svn'
This commit is contained in:
handsomecheung 2013-01-16 14:49:11 +08:00
commit 0220b028f9

View file

@ -13,9 +13,10 @@ $ZSH_THEME_REPO_NAME_COLOR$_DISPLAY$ZSH_PROMPT_BASE_COLOR$ZSH_THEME_SVN_PROMPT_S
fi
}
function in_svn() {
if [[ -d .svn ]]; then
is_svn=0
svn status 2>&1 1>/dev/null | grep -c '.*' | read is_svn
if [ "x$is_svn" = "x0" ]; then
echo 1
fi
}