diff options
| author | Miles Bader | 2008-05-18 22:43:24 +0000 |
|---|---|---|
| committer | Miles Bader | 2008-05-18 22:43:24 +0000 |
| commit | 4787a496a05fdc03241850b45911dd283d4b06b8 (patch) | |
| tree | b10e73b3e2792e1070070626bb3863deba9ec6a7 | |
| parent | 03c673c9f4e65bacf224c3010c4c36997fb0a9f0 (diff) | |
| parent | 4064ff25b6d02f0b1d4c511352c5e94533e0adbe (diff) | |
| download | emacs-4787a496a05fdc03241850b45911dd283d4b06b8.tar.gz emacs-4787a496a05fdc03241850b45911dd283d4b06b8.zip | |
Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1169
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/vc-hg.el | 12 |
2 files changed, 13 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1743afcf7df..911b7cf8704 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 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 | (vc-hg-annotate-command): Allow white space before version number. | ||
| 5 | |||
| 1 | 2008-05-18 Jay Belanger <jay.p.belanger@gmail.com> | 6 | 2008-05-18 Jay Belanger <jay.p.belanger@gmail.com> |
| 2 | 7 | ||
| 3 | * calc/calc-yank.el (calc-register-alist): New variable. | 8 | * calc/calc-yank.el (calc-register-alist): New variable. |
diff --git a/lisp/vc-hg.el b/lisp/vc-hg.el index 6b025c8cfa7..eb392291653 100644 --- a/lisp/vc-hg.el +++ b/lisp/vc-hg.el | |||
| @@ -288,14 +288,18 @@ Optional arg REVISION is a revision to annotate from." | |||
| 288 | (when revision (concat "-r" revision))) | 288 | (when revision (concat "-r" revision))) |
| 289 | (with-current-buffer buffer | 289 | (with-current-buffer buffer |
| 290 | (goto-char (point-min)) | 290 | (goto-char (point-min)) |
| 291 | (re-search-forward "^[0-9]") | 291 | (re-search-forward "^[ \t]*[0-9]") |
| 292 | (delete-region (point-min) (1- (point))))) | 292 | (delete-region (point-min) (match-beginning 0)))) |
| 293 | 293 | ||
| 294 | 294 | ||
| 295 | ;; The format for one line output by "hg annotate -d -n" looks like this: | 295 | ;; The format for one line output by "hg annotate -d -n" looks like this: |
| 296 | ;;215 Wed Jun 20 21:22:58 2007 -0700: CONTENTS | 296 | ;;215 Wed Jun 20 21:22:58 2007 -0700: CONTENTS |
| 297 | ;; i.e: VERSION_NUMBER DATE: CONTENTS | 297 | ;; i.e: VERSION_NUMBER DATE: CONTENTS |
| 298 | (defconst vc-hg-annotate-re "^[ \t]*\\([0-9]+\\) \\(.\\{30\\}\\): ") | 298 | ;; If the user has set the "--follow" option, the output looks like: |
| 299 | ;;215 Wed Jun 20 21:22:58 2007 -0700 foo.c: CONTENTS | ||
| 300 | ;; i.e. VERSION_NUMBER DATE FILENAME: CONTENTS | ||
| 301 | (defconst vc-hg-annotate-re | ||
| 302 | "^[ \t]*\\([0-9]+\\) \\(.\\{30\\}\\)[^:\n]*\\(:[^ \n][^:\n]*\\)*: ") | ||
| 299 | 303 | ||
| 300 | (defun vc-hg-annotate-time () | 304 | (defun vc-hg-annotate-time () |
| 301 | (when (looking-at vc-hg-annotate-re) | 305 | (when (looking-at vc-hg-annotate-re) |
| @@ -306,7 +310,7 @@ Optional arg REVISION is a revision to annotate from." | |||
| 306 | (defun vc-hg-annotate-extract-revision-at-line () | 310 | (defun vc-hg-annotate-extract-revision-at-line () |
| 307 | (save-excursion | 311 | (save-excursion |
| 308 | (beginning-of-line) | 312 | (beginning-of-line) |
| 309 | (if (looking-at vc-hg-annotate-re) (match-string-no-properties 1)))) | 313 | (when (looking-at vc-hg-annotate-re) (match-string-no-properties 1)))) |
| 310 | 314 | ||
| 311 | (defun vc-hg-previous-revision (file rev) | 315 | (defun vc-hg-previous-revision (file rev) |
| 312 | (let ((newrev (1- (string-to-number rev)))) | 316 | (let ((newrev (1- (string-to-number rev)))) |