zsh-workers
 help / color / mirror / code / Atom feed
* Use HGPLAIN instead of HGRCPATH in VCS_INFO_get_data_hg
@ 2017-10-24 18:14 Alexey Sokolov
  2017-10-24 21:39 ` Frank Terbeck
  0 siblings, 1 reply; 6+ messages in thread
From: Alexey Sokolov @ 2017-10-24 18:14 UTC (permalink / raw)
  To: zsh-workers


[-- Attachment #1.1: Type: text/plain, Size: 1169 bytes --]

    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
    the current state of the repo is.

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

[-- Attachment #1.2: Type: text/html, Size: 1503 bytes --]

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4845 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-10-25  8:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-24 18:14 Use HGPLAIN instead of HGRCPATH in VCS_INFO_get_data_hg Alexey Sokolov
2017-10-24 21:39 ` Frank Terbeck
2017-10-24 22:36   ` Alexey Sokolov
2017-10-25  8:37     ` Frank Terbeck
2017-10-25  8:47       ` Peter Stephenson
2017-10-25  8:58       ` Alexey Sokolov

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