GNU bug report logs - #14216
24.2; vc-annotate for hg mistreats lines with ": " as partially bmeing part of the revision specification (with patch)

Previous Next

Package: emacs;

Reported by: arne_bab <at> web.de

Date: Tue, 16 Apr 2013 17:28:01 UTC

Severity: normal

Tags: patch

Found in version 24.2

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Arne Babenhauserheide <arne_bab <at> web.de>
Cc: 14216 <at> debbugs.gnu.org
Subject: bug#14216: 24.2; vc-annotate for hg mistreats lines with ": " as partially bmeing part of the revision specification (with patch)
Date: Tue, 16 Apr 2013 20:51:42 -0400
> It long irked me that when I run vc-annotate in a Mercurial
> repository, some lines get treated as part of the revision
> spec. Example:
> # try this: <- that is part of the revision specification

I installed the patch below which should still allow colon in names,
except when followed by a space.


        Stefan


=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog	2013-04-17 00:35:22 +0000
+++ lisp/ChangeLog	2013-04-17 00:49:44 +0000
@@ -1,3 +1,8 @@
+2013-04-17  Stefan Monnier  <monnier <at> iro.umontreal.ca>
+
+	* vc/vc-hg.el (vc-hg-annotate-re): Disallow ": " in file names
+	(bug#14216).
+
 2013-04-17  Jean-Philippe Gravel  <jpgravel <at> gmail.com>
 
 	* progmodes/gdb-mi.el (gdbmi-bnf-incomplete-record-result):

=== modified file 'lisp/vc/vc-hg.el'
--- lisp/vc/vc-hg.el	2013-02-01 17:19:24 +0000
+++ lisp/vc/vc-hg.el	2013-04-17 00:44:50 +0000
@@ -357,7 +357,7 @@
 ;;215 Wed Jun 20 21:22:58 2007 -0700 foo.c: CONTENTS
 ;; i.e. VERSION_NUMBER DATE FILENAME: CONTENTS
 (defconst vc-hg-annotate-re
-  "^[ \t]*\\([0-9]+\\) \\(.\\{30\\}\\)\\(?:\\(: \\)\\|\\(?: +\\(.+\\): \\)\\)")
+  "^[ \t]*\\([0-9]+\\) \\(.\\{30\\}\\)\\(?:\\(: \\)\\|\\(?: +\\([^:\n]+\\(?::\\(?:[^: \n][^:\n]*\\)?\\)*\\): \\)\\)")
 
 (defun vc-hg-annotate-time ()
   (when (looking-at vc-hg-annotate-re)






This bug report was last modified 12 years and 119 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.