zsh-workers
 help / color / mirror / code / Atom feed
From: Alexey Sokolov <sokolov@google.com>
To: zsh-workers@zsh.org
Subject: Use HGPLAIN instead of HGRCPATH in VCS_INFO_get_data_hg
Date: Tue, 24 Oct 2017 19:14:01 +0100	[thread overview]
Message-ID: <CAL-Thktaa5NJBn4m1rqX-8yuWAO8VsMV8bZLJFcLSaB8e0SH2w@mail.gmail.com> (raw)


[-- 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 --]

             reply	other threads:[~2017-10-24 18:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-24 18:14 Alexey Sokolov [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAL-Thktaa5NJBn4m1rqX-8yuWAO8VsMV8bZLJFcLSaB8e0SH2w@mail.gmail.com \
    --to=sokolov@google.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).