Avoid running svn info twice, and avoid matching the "Relative URL" line in its output.

This commit is contained in:
Drarok Ithaqua 2013-09-23 10:09:56 +01:00
commit acf16c90c3

View file

@ -24,8 +24,9 @@ function in_svn() {
function svn_get_repo_name() { function svn_get_repo_name() {
if in_svn; then if in_svn; then
svn info | sed -n 's/Repository\ Root:\ .*\///p' | read SVN_ROOT SVN_INFO=$(svn info)
svn info | sed -n "s/URL:\ .*$SVN_ROOT\///p" echo $SVN_INFO | sed -n 's/Repository\ Root:\ .*\///p' | read SVN_ROOT
echo $SVN_INFO | sed -n "s/^URL:\ .*$SVN_ROOT\///p"
fi fi
} }
@ -43,7 +44,7 @@ function svn_get_branch_name() {
} \ } \
}' }'
) )
if [ "x$_DISPLAY" = "x" ]; then if [ "x$_DISPLAY" = "x" ]; then
svn_get_repo_name svn_get_repo_name
else else