diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | Functions/VCS_Info/Backends/VCS_INFO_get_data_hg | 5 |
2 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog index c08063ab1..81d896e76 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 $ ***************************************************** 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 |