diff options
author | Frank Terbeck <bewater@users.sourceforge.net> | 2010-05-27 10:06:16 +0000 |
---|---|---|
committer | Frank Terbeck <bewater@users.sourceforge.net> | 2010-05-27 10:06:16 +0000 |
commit | 17b7471fbc4a129b285ab664cf40fa2e6e806f3b (patch) | |
tree | 709eee1a71ffb0c9f7bf98f724b884ed20d43435 /Functions/VCS_Info/Backends | |
parent | 35d3418aebfb5cc32cada19668fcbafc1b7ad162 (diff) | |
download | zsh-17b7471fbc4a129b285ab664cf40fa2e6e806f3b.tar.gz zsh-17b7471fbc4a129b285ab664cf40fa2e6e806f3b.tar.xz zsh-17b7471fbc4a129b285ab664cf40fa2e6e806f3b.zip |
Seth House: 27971: vcs_info: Fix a bug that caused the mercurial backend to always return `default' as the branch name.
Diffstat (limited to 'Functions/VCS_Info/Backends')
-rw-r--r-- | Functions/VCS_Info/Backends/VCS_INFO_get_data_hg | 5 |
1 files changed, 3 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 2324bc809..8e91d2651 100644 --- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg +++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg @@ -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 |