1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-12-08 06:21:40 +01:00

Seth House: 27971: vcs_info: Fix a bug that caused the mercurial backend to always return `default' as the branch name.

This commit is contained in:
Frank Terbeck 2010-05-27 10:06:16 +00:00
parent 35d3418aeb
commit 17b7471fbc
2 changed files with 10 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2010-05-27 Frank Terbeck <ft@bewatermyfriend.org>
* Seth House: 27971: Functions/VCS_Info/Backends/VCS_INFO_get_data_hg:
vcs_info: Fix a bug that caused the mercurial backend to always return
`default' as the branch name.
2010-05-23 Peter Stephenson <p.w.stephenson@ntlworld.com>
* users/15078: Completion/Zsh/Function/.distfiles,
@ -13153,5 +13159,5 @@
*****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL
* $Revision: 1.4981 $
* $Revision: 1.4982 $
*****************************************************

View file

@ -58,10 +58,11 @@ fi
# If the user doesn't opt to invoke hg we can still get the current branch
if [[ -z ${r_branch} && -r ${branchfile} ]] ; then
r_branch=$(< ${branchfile})
else
r_branch="default"
fi
# If we still don't know the branch it's safe to assume default
[[ -n ${r_branch} ]] || r_branch="default"
# The working dir has uncommitted-changes if the revision ends with a +
if [[ $r_lrev[-1] == + ]] ; then
hgchanges=1