From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: nickrob@snap.net.nz (Nick Roberts) Newsgroups: gmane.emacs.devel Subject: Re: incorrect working revision for the mercurial VC backend Date: Wed, 30 Dec 2009 16:42:46 +1300 Message-ID: <19258.52278.890330.878259@totara.tehura.co.nz> References: <19258.47991.673928.374725@totara.tehura.co.nz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1262144597 22258 80.91.229.12 (30 Dec 2009 03:43:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Dec 2009 03:43:17 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alex Harsanyi Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 30 04:43:09 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NPpSl-00032U-Na for ged-emacs-devel@m.gmane.org; Wed, 30 Dec 2009 04:43:07 +0100 Original-Received: from localhost ([127.0.0.1]:60318 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NPpSe-0006vw-Lb for ged-emacs-devel@m.gmane.org; Tue, 29 Dec 2009 22:43:00 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NPpSa-0006vj-DR for emacs-devel@gnu.org; Tue, 29 Dec 2009 22:42:56 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NPpSV-0006vH-1H for emacs-devel@gnu.org; Tue, 29 Dec 2009 22:42:55 -0500 Original-Received: from [199.232.76.173] (port=42469 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NPpSU-0006vE-Ro for emacs-devel@gnu.org; Tue, 29 Dec 2009 22:42:50 -0500 Original-Received: from mail10.snap.net.nz ([202.37.101.41]:49624 helo=viper.snap.net.nz) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NPpSU-0000mp-9t for emacs-devel@gnu.org; Tue, 29 Dec 2009 22:42:50 -0500 Original-Received: from totara (175.29.255.123.dynamic.snap.net.nz [123.255.29.175]) by viper.snap.net.nz (Postfix) with ESMTP id 3EA932F428B; Wed, 30 Dec 2009 16:42:48 +1300 (NZDT) Original-Received: by totara (Postfix, from userid 1000) id E736DC167; Wed, 30 Dec 2009 16:42:46 +1300 (NZDT) In-Reply-To: X-Mailer: VM 7.19 under Emacs 22.2.1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:119009 Archived-At: [please cc the mailing list] > I haven't switched yet to bzr, so I cannot pull the change, however > the patch corresponds to my local fix, except that the last line > reads: But you could apply the patch to your working copy. > (if (eq 0 status) out "0") > > This corresponds to the previous behavior of returning a string as the > revision and returning "0" if there is a problem with running the hg > command. Does that really correspond to the previous behavior? ... (when (eq 0 status) (if (string-match "changeset: *\\([0-9]*\\)" out) (match-string 1 out) "0")))) It returns "0" when there is no match but nil if status doesn't equal 0: when is a Lisp macro in `subr.el'. (when COND BODY...) If COND yields non-nil, do BODY, else return nil. Also, iget a quoted string, e.g. "\"290\"", which is why I used read. -- Nick http://users.snap.net.nz/~nickrob