Skip to content

Commit

Permalink
41952: Use HGPLAIN instead of HGRCPATH in VCS_INFO_get_data_hg
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
DarthGandalf authored and ft committed Oct 25, 2017
1 parent 3735384 commit 1a5d8a6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1a5d8a6

Please sign in to comment.