zsh-workers
 help / color / mirror / code / Atom feed
From: Alexey Sokolov <sokolov@google.com>
To: Frank Terbeck <ft@bewatermyfriend.org>
Cc: zsh-workers@zsh.org
Subject: Re: Use HGPLAIN instead of HGRCPATH in VCS_INFO_get_data_hg
Date: Tue, 24 Oct 2017 22:36:14 +0000	[thread overview]
Message-ID: <CAL-Thku93Mu9q5o8kmaK1uy8JoEYQj7_N9F5E8LxC1ez4mVzvg@mail.gmail.com> (raw)
In-Reply-To: <8760b4tecm.fsf@ft.bewatermyfriend.org>


[-- Attachment #1.1.1: Type: text/plain, Size: 1139 bytes --]

On 24 October 2017 at 21:39, Frank Terbeck <ft@bewatermyfriend.org> wrote:

> Hey Alexey,
>
> Alexey Sokolov wrote:
> >     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.
>
> Could you maybe resend the patch attached? You MUA seems to have mangled
> it a tad. Preferably, commit locally, use "git format-patch -1" and send
> the resulting file.
>
> That makes attribution and integration as simple as possible for us.
>
> Thanks for your help as well!
>
>
Hi Frank,
No problem. I copypasted it this way because of the following in
http://zsh.sourceforge.net/Arc/git.html: "We prefer patches to be included
inline in the body of the message because it makes it easier to comment on
particular lines."

[-- Attachment #1.1.2: Type: text/html, Size: 1843 bytes --]

[-- Attachment #1.2: 0001-Use-HGPLAIN-instead-of-HGRCPATH-in-VCS_INFO_get_data.patch --]
[-- Type: application/octet-stream, Size: 1459 bytes --]

From 33eecfd91a89fe477df80fb55b3248ed38e77f32 Mon Sep 17 00:00:00 2001
From: Alexey Sokolov <sokolov@google.com>
Date: Tue, 24 Oct 2017 18:08:50 +0100
Subject: [PATCH] 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.
---
 Functions/VCS_Info/Backends/VCS_INFO_get_data_hg | 4 ++--
 1 file changed, 2 insertions(+), 2 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
-- 
2.15.0.rc0.271.g36b669edcc-goog


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

  reply	other threads:[~2017-10-24 22:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-24 18:14 Alexey Sokolov
2017-10-24 21:39 ` Frank Terbeck
2017-10-24 22:36   ` Alexey Sokolov [this message]
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-Thku93Mu9q5o8kmaK1uy8JoEYQj7_N9F5E8LxC1ez4mVzvg@mail.gmail.com \
    --to=sokolov@google.com \
    --cc=ft@bewatermyfriend.org \
    --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).