vcs_info
Check-in [3861bf82b4]
Not logged in
Public Repositories
mwm's Repositories

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Version to be bundled with zsh.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3861bf82b4a4f5d5441e87f11d441b98984e1137
User & Date: mwm 2011-03-21 17:01:46.151
Context
2011-03-21
17:04
Update the wiki to reflect the new version. Leaf check-in: 3fe534d8e0 user: mwm tags: trunk
17:01
Version to be bundled with zsh. check-in: 3861bf82b4 user: mwm tags: trunk
2011-02-24
07:56
Some whitespace changes for readability check-in: 253b2550d0 user: mwm tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to VCS_INFO_get_data_fossil.
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
## perforce support by: Phil Pennock
## Distributed under the same BSD-ish license as zsh itself.

# XXX: This soooo needs to be cached
setopt localoptions extendedglob
local a b
local change changed
local action merging
local -A fsinfo
local -xA hook_com

${vcs_comm[cmd]} status | while IFS=: read a b; do fsinfo[${a//-/_}]="${b## #}"; done




fshash=${fsinfo[checkout]%% *}

changed=${(Mk)fsinfo:#(ADDED|EDITED|DELETED|UPDATED)*}
merging=${(Mk)fsinfo:#*_BY_MERGE*}
if [ -n "$merging" ]; then
   action="merging"
fi

# Build the revision display
zstyle -s ":vcs_info:${vcs}:${usercontext}:${rrn}" fsrevformat revformat || revformat="%.10h"

hook_com=( "hash" "${fshash}" )

if VCS_INFO_hook 'set-fsrev-format' "${revformat}"; then
    zformat -f fsrev "${revformat}" "h:${hook_com[hash]}"
else
    fsrev=${hook_com[rev-replace]}
fi

hook_com=()

# Now build the branch display
zstyle -s ":vcs_info:${vcs}:${usercontext}:${rrn}" branchformat fsbranch || fsbranch="%b:%r"

hook_com=( branch "${fsinfo[tags]%%, *}" revision "${fsrev}" )

if VCS_INFO_hook 'set-branch-format' "${fsbranch}"; then
    zformat -f fsbranch "${fsbranch}" "b:${hook_com[branch]}" "r:${hook_com[revision]}"
else
    fsbranch=${hook_com[branch-replace]}
fi

hook_com=()

VCS_INFO_formats "$action" "${fsbranch}" "${fsinfo[local_root]}" '' "$changed" "${fsrev}" "${fsinfo[repository]}"
return 0

|





<
<

|

|
>
>
>
>

>






<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|

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
## vim:ft=zsh
## fossil support by: Mike Meyer (mwm@mired.org)
## Distributed under the same BSD-ish license as zsh itself.

# XXX: This soooo needs to be cached
setopt localoptions extendedglob
local a b


local -A fsinfo
local fshash fsbranch changed merging action 

${vcs_comm[cmd]} status |
   while IFS=: read a b; do
      fsinfo[${a//-/_}]="${b## #}"
   done

fshash=${fsinfo[checkout]%% *}
fsbranch=${fsinfo[tags]%%, *}
changed=${(Mk)fsinfo:#(ADDED|EDITED|DELETED|UPDATED)*}
merging=${(Mk)fsinfo:#*_BY_MERGE*}
if [ -n "$merging" ]; then
   action="merging"
fi



























VCS_INFO_formats "$action" "${fsbranch}" "${fsinfo[local_root]}" '' "$changed" "${fshash}" "${fsinfo[repository]}"
return 0