summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Sokolov <sokolov@google.com>2017-10-24 18:08:50 +0100
committerFrank Terbeck <ft@bewatermyfriend.org>2017-10-25 10:34:34 +0200
commit1a5d8a6916667819ba09a247c90b1ced5e186464 (patch)
tree956a6edf39654e61cfdbd528447e2e662f696f77
parent373538442b8fa5992bb2269c9972cee5b49ecd3d (diff)
downloadzsh-1a5d8a6916667819ba09a247c90b1ced5e186464.tar.gz
zsh-1a5d8a6916667819ba09a247c90b1ced5e186464.zip
41952: Use HGPLAIN instead of HGRCPATH in VCS_INFO_get_data_hg
Fixes prompt indicator in case if the repository requires a non-default feature. With HGRCPATH, it results in: abort: repository requires features unknown to this Mercurial: ... (see https://mercurial-scm.org/wiki/MissingRequirement for more information) Which, in turn, results in "default" getting reported regardless of what is the current state of the repo.
-rw-r--r--ChangeLog5
-rw-r--r--Functions/VCS_Info/Backends/VCS_INFO_get_data_hg4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 4b58d3b7f..81fa562dc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-10-25 Alexey Sokolov <sokolov@google.com>
+
+ * 41952: Functions/VCS_Info/Backends/VCS_INFO_get_data_hg: Use
+ HGPLAIN instead of HGRCPATH in VCS_INFO_get_data_hg
+
2017-10-20 Christian Brabandt <cb@256bit.org>
* 41943: Completion/Unix/Command/_vim: Completion: add --clean for
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