From 17b7471fbc4a129b285ab664cf40fa2e6e806f3b Mon Sep 17 00:00:00 2001 From: Frank Terbeck Date: Thu, 27 May 2010 10:06:16 +0000 Subject: Seth House: 27971: vcs_info: Fix a bug that caused the mercurial backend to always return `default' as the branch name. --- Functions/VCS_Info/Backends/VCS_INFO_get_data_hg | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Functions/VCS_Info/Backends') 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 -- cgit 1.4.1