From: Dan Nicolaescu Date: Sun, 18 May 2008 07:22:25 +0000 (+0000) Subject: (vc-hg-annotate-re): Recognize the output of --follow. X-Git-Tag: emacs-pretest-22.2.90~124 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4064ff25b6d02f0b1d4c511352c5e94533e0adbe;p=emacs.git (vc-hg-annotate-re): Recognize the output of --follow. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 927983e12cc..09ff5bec16c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 --git a/lisp/vc-hg.el b/lisp/vc-hg.el index 7bd54528a6e..3233b77bb44 100644 --- a/lisp/vc-hg.el +++ b/lisp/vc-hg.el @@ -318,7 +318,11 @@ Optional arg VERSION is a version to annotate from." ;; 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 @@ Optional arg VERSION is a version to annotate from." (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))))