2b51ea7c25fdcf8a2525d332f1567ac296b6bd66 blob 1665 bytes (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
| | ## vim:ft=zsh
## subversion support by:
## + Frank Terbeck <ft@bewatermyfriend.org>
## + Phil Pennock
## Distributed under the same BSD-ish license as zsh itself.
setopt localoptions noksharrays extendedglob NO_shwordsplit
local svnbase svnbranch a b rrn
local -A svninfo parentinfo
local -xA hook_com
svnbase=".";
svninfo=()
${vcs_comm[cmd]} info --non-interactive \
|& while IFS=: read a b; do
# SVN 1.7+ prints out stable error numbers. The one below is the "not a
# working copy" error code. With prior versions we have to hope the error
# message fits. svn1.6 should spit out something that matches the 2nd
# pattern.
if [[ "$a $b" == *E155007* ]] \
|| [[ "$a $b" == *'is not a working copy'* ]]
then
return 1
fi
svninfo[${a// /_}]="${b## #}"
done
while [[ -d "${svnbase}/../.svn" ]]; do
parentinfo=()
${vcs_comm[cmd]} info --non-interactive "${svnbase}/.." | while IFS=: read a b; do parentinfo[${a// /_}]="${b## #}"; done
[[ ${parentinfo[Repository_UUID]} != ${svninfo[Repository_UUID]} ]] && break
svninfo=(${(kv)parentinfo})
svnbase="${svnbase}/.."
done
svnbase="$(VCS_INFO_realpath ${svnbase})"
rrn=${svnbase:t}
zstyle -s ":vcs_info:${vcs}:${usercontext}:${rrn}" branchformat svnbranch || svnbranch="%b:%r"
hook_com=( branch "${svninfo[URL]##*/}" revision "${svninfo[Revision]}" )
if VCS_INFO_hook 'set-branch-format' "${svnbranch}"; then
zformat -f svnbranch "${svnbranch}" "b:${hook_com[branch]}" "r:${hook_com[revision]}"
else
svnbranch=${hook_com[branch-replace]}
fi
hook_com=()
VCS_INFO_formats '' "${svnbranch}" "${svnbase}" '' '' "${svninfo[Revision]}" ''
return 0
|
debug log:
solving 2b51ea7 ...
found 2b51ea7 in https://inbox.vuxu.org/zsh-workers/87mxb1zkcd.fsf@ft.bewatermyfriend.org/
found b1cb730 in https://git.vuxu.org/mirror/zsh/
preparing index
index prepared:
100644 b1cb7302b9106988043587a7512bef39ac1e09ad Functions/VCS_Info/Backends/VCS_INFO_get_data_svn
applying [1/1] https://inbox.vuxu.org/zsh-workers/87mxb1zkcd.fsf@ft.bewatermyfriend.org/
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_svn b/Functions/VCS_Info/Backends/VCS_INFO_get_data_svn
index b1cb730..2b51ea7 100644
Checking patch Functions/VCS_Info/Backends/VCS_INFO_get_data_svn...
Applied patch Functions/VCS_Info/Backends/VCS_INFO_get_data_svn cleanly.
index at:
100644 2b51ea7c25fdcf8a2525d332f1567ac296b6bd66 Functions/VCS_Info/Backends/VCS_INFO_get_data_svn
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).