diff options
| author | Dan Nicolaescu | 2008-05-18 07:22:25 +0000 |
|---|---|---|
| committer | Dan Nicolaescu | 2008-05-18 07:22:25 +0000 |
| commit | 4064ff25b6d02f0b1d4c511352c5e94533e0adbe (patch) | |
| tree | 7403c1df327c883d5ba87b71123456695eb85f10 | |
| parent | 7dcc0df26071beed5b3f6723a9f8868843d2fa63 (diff) | |
| download | emacs-4064ff25b6d02f0b1d4c511352c5e94533e0adbe.tar.gz emacs-4064ff25b6d02f0b1d4c511352c5e94533e0adbe.zip | |
(vc-hg-annotate-re): Recognize the output of --follow.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/vc-hg.el | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 927983e12cc..09ff5bec16c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2008-05-18 David Hull <david@snap.com> (tiny change) | ||
| 2 | |||
| 3 | * vc-hg.el (vc-hg-annotate-re): Recognize the output of --follow. | ||
| 4 | |||
| 1 | 2008-05-18 mohrmarc <debian@miller-mohr.de> (tiny change) | 5 | 2008-05-18 mohrmarc <debian@miller-mohr.de> (tiny change) |
| 2 | 6 | ||
| 3 | * progmodes/fortran.el (fortran-font-lock-keywords-2): Add keywords for | 7 | * 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." | |||
| 318 | ;; The format for one line output by "hg annotate -d -n" looks like this: | 318 | ;; The format for one line output by "hg annotate -d -n" looks like this: |
| 319 | ;;215 Wed Jun 20 21:22:58 2007 -0700: CONTENTS | 319 | ;;215 Wed Jun 20 21:22:58 2007 -0700: CONTENTS |
| 320 | ;; i.e: VERSION_NUMBER DATE: CONTENTS | 320 | ;; i.e: VERSION_NUMBER DATE: CONTENTS |
| 321 | (defconst vc-hg-annotate-re "^[ \t]*\\([0-9]+\\) \\(.\\{30\\}\\): ") | 321 | ;; If the user has set the "--follow" option, the output looks like: |
| 322 | ;;215 Wed Jun 20 21:22:58 2007 -0700 foo.c: CONTENTS | ||
| 323 | ;; i.e. VERSION_NUMBER DATE FILENAME: CONTENTS | ||
| 324 | (defconst vc-hg-annotate-re | ||
| 325 | "^[ \t]*\\([0-9]+\\) \\(.\\{30\\}\\)[^:\n]*\\(:[^ \n][^:\n]*\\)*: ") | ||
| 322 | 326 | ||
| 323 | (defun vc-hg-annotate-time () | 327 | (defun vc-hg-annotate-time () |
| 324 | (when (looking-at vc-hg-annotate-re) | 328 | (when (looking-at vc-hg-annotate-re) |
| @@ -329,7 +333,7 @@ Optional arg VERSION is a version to annotate from." | |||
| 329 | (defun vc-hg-annotate-extract-revision-at-line () | 333 | (defun vc-hg-annotate-extract-revision-at-line () |
| 330 | (save-excursion | 334 | (save-excursion |
| 331 | (beginning-of-line) | 335 | (beginning-of-line) |
| 332 | (if (looking-at vc-hg-annotate-re) (match-string-no-properties 1)))) | 336 | (when (looking-at vc-hg-annotate-re) (match-string-no-properties 1)))) |
| 333 | 337 | ||
| 334 | (defun vc-hg-previous-version (file rev) | 338 | (defun vc-hg-previous-version (file rev) |
| 335 | (let ((newrev (1- (string-to-number rev)))) | 339 | (let ((newrev (1- (string-to-number rev)))) |