# HG changeset patch # User Dan Nicolaescu # Date 1211095345 0 # Node ID 8c0cc53e82349a854135a690ba67d88b001bce2e # Parent 770802ff7ac37d32e574f6f89114ed1ed54ae2ea (vc-hg-annotate-re): Recognize the output of --follow. diff -r 770802ff7ac3 -r 8c0cc53e8234 lisp/ChangeLog --- a/lisp/ChangeLog Sun May 18 04:17:11 2008 +0000 +++ b/lisp/ChangeLog Sun May 18 07:22:25 2008 +0000 @@ -1,3 +1,7 @@ +2008-05-18 David Hull (tiny change) + + * vc-hg.el (vc-hg-annotate-re): Recognize the output of --follow. + 2008-05-18 mohrmarc (tiny change) * progmodes/fortran.el (fortran-font-lock-keywords-2): Add keywords for diff -r 770802ff7ac3 -r 8c0cc53e8234 lisp/vc-hg.el --- a/lisp/vc-hg.el Sun May 18 04:17:11 2008 +0000 +++ b/lisp/vc-hg.el Sun May 18 07:22:25 2008 +0000 @@ -318,7 +318,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 "--follow" option, the output looks like: +;;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\\}\\)[^:\n]*\\(:[^ \n][^:\n]*\\)*: ") (defun vc-hg-annotate-time () (when (looking-at vc-hg-annotate-re) @@ -329,7 +333,7 @@ (defun vc-hg-annotate-extract-revision-at-line () (save-excursion (beginning-of-line) - (if (looking-at vc-hg-annotate-re) (match-string-no-properties 1)))) + (when (looking-at vc-hg-annotate-re) (match-string-no-properties 1)))) (defun vc-hg-previous-version (file rev) (let ((newrev (1- (string-to-number rev))))