Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: vcs_info Mercurial backend branch name display
- X-seq: zsh-workers 27971
- From: Seth House <seth@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: PATCH: vcs_info Mercurial backend branch name display
- Date: Mon, 24 May 2010 18:30:05 +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
- References: <loom.20100524T173939-572@xxxxxxxxxxxxxx> <m3iq6d2qqz.fsf@xxxxxxxxxxxxxx>
Greg Klanderman <gak <at> klanderman.net> writes:
> Looks like you have a spurious 'if' there..
<facepalm>
It took me ten minutes and an email from Bart (thanks Bart!) to see the mistake.
Here's the fixed patch and now I'm gonna grab more coffee...
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
+[[ -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