From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6213 invoked by alias); 24 May 2010 18:30:25 -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: 27971 Received: (qmail 14483 invoked from network); 24 May 2010 18:30:23 -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: Re: PATCH: =?utf-8?b?dmNzX2luZm8=?= Mercurial backend branch name display Date: Mon, 24 May 2010 18:30:05 +0000 (UTC) Message-ID: References: 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) Greg Klanderman klanderman.net> writes: > Looks like you have a spurious 'if' there.. 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