Subversion: fix branch/tag extraction
That was broken for a long long long... time. Should close #117, #237 and is an alternative to patch proposed by @anthonygelibert in #264.
This commit is contained in:
parent
89a71c1c7d
commit
c98f16d52f
12
liquidprompt
12
liquidprompt
@ -917,12 +917,14 @@ _lp_svn_branch()
|
|||||||
url="${url:${#root}}"
|
url="${url:${#root}}"
|
||||||
if [[ "$url" == */trunk* ]] ; then
|
if [[ "$url" == */trunk* ]] ; then
|
||||||
echo -n trunk
|
echo -n trunk
|
||||||
elif [[ "$url" == */branches* ]] ; then
|
elif [[ "$url" == */branches/?* ]] ; then
|
||||||
_lp_escape "$(expr "$url" : '.*/branches/\([^/]*\)' || expr "$url" : '/\([^/]*\)' || basename "$root")"
|
url="${url##*/branches/}"
|
||||||
elif [[ "$url" == */tags* ]] ; then
|
_lp_escape "${url%/*}"
|
||||||
_lp_escape "$(expr "$url" : '.*/tags/\([^/]*\)' || expr "$url" : '/\([^/]*\)' || basename "$root")"
|
elif [[ "$url" == */tags/?* ]] ; then
|
||||||
|
url="${url##*/tags/}"
|
||||||
|
_lp_escape "${url%/*}"
|
||||||
else
|
else
|
||||||
_lp_escape "$(basename "$root")"
|
_lp_escape "${root##*/}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user