This commit is contained in:
nojhan 2012-09-09 22:32:32 +02:00
commit 23f31f952e

View File

@ -340,7 +340,11 @@ lcl)
fi fi
;; ;;
ssh) ssh)
LP_HOST="${NO_COL}@${LP_COLOR_SSH}${_LP_HOST_SYMBOL}${NO_COL}" if [ -r /etc/debian_chroot ] ; then
_LP_HOST_CHROOT=$(cat /etc/debian_chroot)
_LP_HOST_CHROOT="($_LP_HOST_CHROOT)"
fi
LP_HOST="${NO_COL}@${LP_COLOR_SSH}${_LP_HOST_CHROOT}${_LP_HOST_SYMBOL}${NO_COL}"
;; ;;
tel) tel)
LP_HOST="${NO_COL}@${LP_COLOR_TELNET}${_LP_HOST_SYMBOL}${NO_COL}" LP_HOST="${NO_COL}@${LP_COLOR_TELNET}${_LP_HOST_SYMBOL}${NO_COL}"
@ -666,13 +670,15 @@ _lp_svn_branch()
[[ "$LP_ENABLE_SVN" != 1 ]] && return [[ "$LP_ENABLE_SVN" != 1 ]] && return
local root local root
local url local url
local result
eval $(LANG=C LC_ALL=C svn info 2>/dev/null | sed -n 's/^URL: \(.*\)/url="\1"/p;s/^Repository Root: \(.*\)/root="\1"/p' ) eval $(LANG=C LC_ALL=C svn info 2>/dev/null | sed -n 's/^URL: \(.*\)/url="\1"/p;s/^Repository Root: \(.*\)/root="\1"/p' )
# Make url relative to root # Make url relative to root
url="${url:${#root}}" url="${url:${#root}}"
if [[ "$url" == */trunk* ]] ; then if [[ "$url" == */trunk* ]] ; then
echo trunk echo trunk
else else
expr "$url" : '.*/branches/\([^/]*\)' || expr "$url" : '/\([^/]*\)' || basename "$root" result=$(expr "$url" : '.*/branches/\([^/]*\)' || expr "$url" : '/\([^/]*\)' || basename "$root")
echo $result
fi fi
} }