Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: vcs_info Mercurial backend branch name display
- X-seq: zsh-workers 27967
- From: Seth House <seth@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: PATCH: vcs_info Mercurial backend branch name display
- Date: Mon, 24 May 2010 15:48:47 +0000 (UTC)
- Connect(): No such file or directory
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
This patch fixes a VCS_Info bug (introduced by me) that broke the branch display
by always displaying as "default".
Sorry for the patch noise.
- Seth
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
b/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
@@ -58,10 +58,11 @@
# 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
+if [[ -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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author