[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#14216: 24.2; vc-annotate for hg mistreats lines with ": " as partial
From: |
Stefan Monnier |
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 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> 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@iro.umontreal.ca>
+
+ * vc/vc-hg.el (vc-hg-annotate-re): Disallow ": " in file names
+ (bug#14216).
+
2013-04-17 Jean-Philippe Gravel <jpgravel@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)