From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8283 invoked by alias); 24 May 2010 15:55:18 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 27967 Received: (qmail 18733 invoked from network); 24 May 2010 15:55:15 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at m.gmane.org designates 80.91.229.12 as permitted sender) X-Injected-Via-Gmane: http://gmane.org/ To: zsh-workers@zsh.org connect(): No such file or directory From: Seth House Subject: PATCH: =?utf-8?b?dmNzX2luZm8=?= Mercurial backend branch name display Date: Mon, 24 May 2010 15:48:47 +0000 (UTC) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 65.44.116.164 (Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/533.5 (KHTML, like Gecko) Chrome/5.0.377.0 Safari/533.5) 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