From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Hull Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: 23.0.60; vc-hg-annotate-re --follow enhancement Date: Fri, 16 May 2008 13:31:44 -0700 Message-ID: NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1210975577 30120 80.91.229.12 (16 May 2008 22:06:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 16 May 2008 22:06:17 +0000 (UTC) To: emacs-pretest-bug@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 17 00:06:46 2008 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 1Jx84B-0004Qo-OH for ged-emacs-devel@m.gmane.org; Sat, 17 May 2008 00:06:20 +0200 Original-Received: from localhost ([127.0.0.1]:56100 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jx83S-0004pS-9d for ged-emacs-devel@m.gmane.org; Fri, 16 May 2008 18:05:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jx6am-00087z-Ll for emacs-devel@gnu.org; Fri, 16 May 2008 16:31:52 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jx6ak-00085i-4j for emacs-devel@gnu.org; Fri, 16 May 2008 16:31:51 -0400 Original-Received: from [199.232.76.173] (port=54951 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jx6aj-00085e-QF for emacs-devel@gnu.org; Fri, 16 May 2008 16:31:49 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:58411) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jx6aj-0007hV-G1 for emacs-devel@gnu.org; Fri, 16 May 2008 16:31:49 -0400 Original-Received: from mx10.gnu.org ([199.232.76.166]:37658) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1Jx6Ze-0003C8-M5 for emacs-pretest-bug@gnu.org; Fri, 16 May 2008 16:30:42 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Jx6ag-0007gp-TT for emacs-pretest-bug@gnu.org; Fri, 16 May 2008 16:31:49 -0400 Original-Received: from mail.idealab.com ([208.76.2.4]:57765 helo=rain.mail.idealab.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Jx6ag-0007gX-6F for emacs-pretest-bug@gnu.org; Fri, 16 May 2008 16:31:46 -0400 Original-Received: from rain.mail.idealab.com (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with ESMTP id 13C416983C6; Fri, 16 May 2008 13:31:45 -0700 (PDT) Original-Received: from 10-1-2-210.dhcp.pas.lab (10-1-2-210.dhcp.pas.lab [10.1.2.210]) by rain.mail.idealab.com (Postfix) with ESMTP id DD12E698269; Fri, 16 May 2008 13:31:44 -0700 (PDT) Original-From: David Hull X-Antivirus: Scanned by F-Prot Antivirus (http://www.f-prot.com) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-Mailman-Approved-At: Fri, 16 May 2008 18:04:51 -0400 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:97296 gmane.emacs.pretest.bugs:22346 Archived-At: If I specify the "--follow" option in my .hgrc file so that "hg annotate" follows file name changes, the output includes the filename, which causes vc-hg-annotate-re to not match. The following patch causes vc-hg-annotate-re to match an optional filename after the date. --- vc-hg.el.orig 2008-05-16 12:50:17.000000000 -0700 +++ vc-hg.el 2008-05-16 12:59:27.000000000 -0700 @@ -295,7 +295,11 @@ ;; The format for one line output by "hg annotate -d -n" looks like this: ;;215 Wed Jun 20 21:22:58 2007 -0700: CONTENTS ;; i.e: VERSION_NUMBER DATE: CONTENTS -(defconst vc-hg-annotate-re "^[ \t]*\\([0-9]+\\) \\(.\\{30\\}\\): ") +;; If the user has set the "-f" option, the output looks like: +;;35 Tue May 13 17:52:17 2008 -0700 example.c: CONTENTS +;; i.e. VERSION_NUMBER DATE FILENAME: CONTENTS +(defconst vc-hg-annotate-re + "^[ \t]*\\([0-9]+\\) \\(.\\{30\\}\\)[^:\n]*\\(:[^ \n][^:\n]*\\)*: ") (defun vc-hg-annotate-time () (when (looking-at vc-hg-annotate-re) -- David Hull