From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: incorrect working revision for the mercurial VC backend Date: Tue, 29 Dec 2009 19:29:33 -0800 (PST) Message-ID: <200912300329.nBU3TXIr006125@godzilla.ics.uci.edu> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1262143890 21058 80.91.229.12 (30 Dec 2009 03:31:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Dec 2009 03:31:30 +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:31:22 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 1NPpHO-0000ld-5z for ged-emacs-devel@m.gmane.org; Wed, 30 Dec 2009 04:31:22 +0100 Original-Received: from localhost ([127.0.0.1]:43220 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NPpHO-00033n-Ia for ged-emacs-devel@m.gmane.org; Tue, 29 Dec 2009 22:31:22 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NPpHJ-00033X-Oz for emacs-devel@gnu.org; Tue, 29 Dec 2009 22:31:17 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NPpHF-00032j-9L for emacs-devel@gnu.org; Tue, 29 Dec 2009 22:31:17 -0500 Original-Received: from [199.232.76.173] (port=49224 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NPpHF-00032g-1s for emacs-devel@gnu.org; Tue, 29 Dec 2009 22:31:13 -0500 Original-Received: from paul-mcgann-v0.ics.uci.edu ([128.195.1.147]:57994) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NPpHE-00081b-JZ for emacs-devel@gnu.org; Tue, 29 Dec 2009 22:31:12 -0500 Original-Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by paul-mcgann-v0.ics.uci.edu (8.13.8/8.13.8) with ESMTP id nBU3TYp7024417 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 29 Dec 2009 19:29:34 -0800 Original-Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id nBU3TXIr006125; Tue, 29 Dec 2009 19:29:33 -0800 (PST) In-Reply-To: (Alex Harsanyi's message of "Wed, 30 Dec 2009 09:53:54 +0800") Original-Lines: 22 X-ICS-MailScanner-Information: Please send mail to helpdesk@ics.uci.edu or more information X-ICS-MailScanner-ID: nBU3TYp7024417 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:119007 Archived-At: Alex Harsanyi writes: > It seems that `vc-hg-working-revision` is using "hg log -l1 FILE" to > obtain the working revision of the file. This only works correctly if > the file is at the most recent revision in the workspace. If you > update the workspace to a different repository revision using "hg > update -r REV", emacs will continue to think that files are at their > latest revision. As a side effect, `vc-annotate` will always annotate > the latest revision of a file regardless of what the file revision is > in the workspace. > > I believe using the "hg parent" command is more accurate in computing > the working revision: > > hg parent --template "{rev}" FILE > > Also by using the --template option, the command will return just the > revision number, making the `string-match' call unnecessary. Yes, see the recent discussion on the list, using "hg parent" is the advice I got from Matt Mackall. I'll make that change when I get a chance.