zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: vcs_info Mercurial backend branch name display
@ 2010-05-24 15:48 Seth House
  2010-05-24 16:45 ` PATCH: =?utf-8?b?dmNzX2luZm8=?= " Greg Klanderman
  0 siblings, 1 reply; 4+ messages in thread
From: Seth House @ 2010-05-24 15:48 UTC (permalink / raw)
  To: zsh-workers

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-05-24 18:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-24 15:48 PATCH: vcs_info Mercurial backend branch name display Seth House
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

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).