summaryrefslogtreecommitdiff
path: root/Functions/VCS_Info
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2018-04-07 15:12:57 +0200
committerAxel Beckert <abe@deuxchevaux.org>2018-04-07 15:12:57 +0200
commit6e1ab9aa550695ee7e3d467b4173c0b83ba7f759 (patch)
tree8fb7faa4364a7cbf1cba48296a5f537e13f2a8d9 /Functions/VCS_Info
parent5ad56a41f1ee2e61abca079f5ea8909f895ac2dd (diff)
parentf027f1d6e876708bc75d4217e1ca26898658d8d3 (diff)
downloadzsh-6e1ab9aa550695ee7e3d467b4173c0b83ba7f759.tar.gz
zsh-6e1ab9aa550695ee7e3d467b4173c0b83ba7f759.zip
Merge tag 'zsh-5.4.2-test-2' / 'upstream' branch into 'debian' branch
Test version 2 prior to zsh 5.5.
Diffstat (limited to 'Functions/VCS_Info')
-rw-r--r--Functions/VCS_Info/Backends/VCS_INFO_get_data_hg4
-rw-r--r--Functions/VCS_Info/VCS_INFO_formats7
-rw-r--r--Functions/VCS_Info/VCS_INFO_set2
3 files changed, 10 insertions, 3 deletions
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg b/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
index d4030125c..cd5ef321d 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
@@ -55,8 +55,8 @@ if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" get-revision ; then
zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" \
"check-for-changes" || hgid_args+=( -r. )
- local HGRCPATH
- HGRCPATH="/dev/null" ${vcs_comm[cmd]} ${(z)hgid_args} 2> /dev/null \
+ local HGPLAIN
+ HGPLAIN=1 ${vcs_comm[cmd]} ${(z)hgid_args} 2> /dev/null \
| read -r r_csetid r_lrev r_branch
fi
fi
diff --git a/Functions/VCS_Info/VCS_INFO_formats b/Functions/VCS_Info/VCS_INFO_formats
index 4d0dd75c2..e0e1dc738 100644
--- a/Functions/VCS_Info/VCS_INFO_formats
+++ b/Functions/VCS_Info/VCS_INFO_formats
@@ -34,7 +34,7 @@ hook_com[subdir_orig]="${hook_com[subdir]}"
VCS_INFO_hook 'post-backend'
-## description:
+## description (for backend authors):
# action: a string that signals a certain non-default condition in the
# repository (like 'rebase-i' in git). If this in non-empty,
# the actionformats will be used, too.
@@ -49,6 +49,11 @@ VCS_INFO_hook 'post-backend'
# should be provided. eg:
# VCS_INFO_formats '' "${foobranch}" "${foobase}" '' '' '' "${foomisc}"
+## description (vcs_info internals):
+# This function is called by the backend with information about the repository,
+# and (after some manipulations) populates the ${msgs} variable in preparation
+# for calling VCS_INFO_set.
+
if [[ -n ${hook_com[action]} ]] ; then
zstyle -a ":vcs_info:${vcs}:${usercontext}:${rrn}" actionformats msgs
(( ${#msgs} < 1 )) && msgs[1]=' (%s)-[%b|%a]%u%c-'
diff --git a/Functions/VCS_Info/VCS_INFO_set b/Functions/VCS_Info/VCS_INFO_set
index e3f62ceef..0e5849147 100644
--- a/Functions/VCS_Info/VCS_INFO_set
+++ b/Functions/VCS_Info/VCS_INFO_set
@@ -2,6 +2,8 @@
## Written by Frank Terbeck <ft@bewatermyfriend.org>
## Distributed under the same BSD-ish license as zsh itself.
+# This function sets ${vcs_info_msg_<N>_} from ${msgs}.
+
setopt localoptions noksharrays NO_shwordsplit unset
local -i i j