zsh-workers
 help / color / mirror / code / Atom feed
f8e21a9f33d1ea8536574922da3be3508a2e25b7 blob 1253 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
 
## vim:ft=zsh
## mercurial support by: Frank Terbeck <ft@bewatermyfriend.org>
## Distributed under the same BSD-ish license as zsh itself.

setopt localoptions NO_shwordsplit
local hgbranch hgbranch_name hgbase hghash hglrev r_branch r_info

hgbase=${vcs_comm[basedir]}
rrn=${hgbase:t}
hgbranch_name=$(< ${hgbase}/.hg/branch)

hghash=''
hglrev=''
if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" get-revision ; then
    # Calling the 'hg' program is quite a bit too slow for prompts.
    # If there's a way around that, I'd be interested.
    # Disabled by default anyway, so no harm done.

    HGRCPATH="/dev/null" ${vcs_comm[cmd]} branches \
    | while read -r r_branch r_info ; do
        if [[ ${r_branch} == ${hgbranch_name} ]] ; then
            match=()
            : ${r_info/(#b)([^:]##):(*)}
            hglrev=${match[1]}
            hghash=${match[2]}
            break
        fi
    done

    if [[ -n ${hglrev} ]] ; then
        zstyle -s ":vcs_info:${vcs}:${usercontext}:${rrn}" branchformat hgbranch || hgbranch="%b:%r"
        zformat -f hgbranch "${hgbranch}" "b:${hgbranch_name}" "r:${hglrev}"
    fi
else
    hgbranch="${hgbranch_name}"
fi

VCS_INFO_formats '' "${hgbranch}" "${hgbase}" '' '' "${hglrev}" "${hghash}"
return 0
debug log:

solving f8e21a9 ...
found f8e21a9 in https://inbox.vuxu.org/zsh-workers/1245422198-5180-2-git-send-email-ft@bewatermyfriend.org/ ||
	https://inbox.vuxu.org/zsh-workers/1239039938-20782-4-git-send-email-ft@bewatermyfriend.org/
found d70e03c in https://git.vuxu.org/mirror/zsh/
preparing index
index prepared:
100644 d70e03c00adc8ac09cce108f2f468a4c0acf1f3c	Functions/VCS_Info/Backends/VCS_INFO_get_data_hg

applying [1/2] https://inbox.vuxu.org/zsh-workers/1245422198-5180-2-git-send-email-ft@bewatermyfriend.org/
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg b/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
index d70e03c..f8e21a9 100644

Checking patch Functions/VCS_Info/Backends/VCS_INFO_get_data_hg...
Applied patch Functions/VCS_Info/Backends/VCS_INFO_get_data_hg cleanly.

skipping https://inbox.vuxu.org/zsh-workers/1239039938-20782-4-git-send-email-ft@bewatermyfriend.org/ for f8e21a9
index at:
100644 f8e21a9f33d1ea8536574922da3be3508a2e25b7	Functions/VCS_Info/Backends/VCS_INFO_get_data_hg

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).