From: Seth House <seth@eseth.com>
To: zsh-workers@zsh.org
Subject: PATCH: vcs_info Mercurial backend branch name display
Date: Mon, 24 May 2010 15:48:47 +0000 (UTC) [thread overview]
Message-ID: <loom.20100524T173939-572@post.gmane.org> (raw)
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
next reply other threads:[~2010-05-24 15:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-24 15:48 Seth House [this message]
2010-05-24 16:45 ` PATCH: =?utf-8?b?dmNzX2luZm8=?= " Greg Klanderman
2010-05-24 17:55 ` PATCH: vcs_info " Seth House
2010-05-24 18:30 ` Seth House
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20100524T173939-572@post.gmane.org \
--to=seth@eseth.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).