diff options
| author | Stefan Monnier | 2009-11-26 14:50:28 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2009-11-26 14:50:28 +0000 |
| commit | 62ccc42c60626e4816da02f1e1db89fa0fad156d (patch) | |
| tree | f19260339b88103609bcffe0f3a7eefc56768b4c | |
| parent | 6a7ce3a2b0724db339481cc7d496d36d3eeaf11a (diff) | |
| download | emacs-62ccc42c60626e4816da02f1e1db89fa0fad156d.tar.gz emacs-62ccc42c60626e4816da02f1e1db89fa0fad156d.zip | |
(vc-bzr-annotate-command): Make operation asynchronous.
| -rw-r--r-- | lisp/ChangeLog | 15 | ||||
| -rw-r--r-- | lisp/vc-bzr.el | 39 |
2 files changed, 33 insertions, 21 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 81b22ead068..c437b242389 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2009-11-26 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * vc-bzr.el (vc-bzr-annotate-command): Make operation asynchronous. | ||
| 4 | |||
| 1 | 2009-11-26 Dan Nicolaescu <dann@ics.uci.edu> | 5 | 2009-11-26 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 6 | ||
| 3 | * finder.el (finder-mode-map): Add a menu. | 7 | * finder.el (finder-mode-map): Add a menu. |
| @@ -13,17 +17,18 @@ | |||
| 13 | 2009-11-26 Wilson Snyder <wsnyder@wsnyder.org> | 17 | 2009-11-26 Wilson Snyder <wsnyder@wsnyder.org> |
| 14 | 18 | ||
| 15 | * verilog-mode.el (verilog-auto-insert-lisp, verilog-delete-auto) | 19 | * verilog-mode.el (verilog-auto-insert-lisp, verilog-delete-auto) |
| 16 | (verilog-delete-empty-auto-pair, verilog-library-filenames): Fix | 20 | (verilog-delete-empty-auto-pair, verilog-library-filenames): |
| 17 | AUTOINSERTLISP to support insert-file. Reported by Clay Douglass. | 21 | Fix AUTOINSERTLISP to support insert-file. Reported by Clay Douglass. |
| 18 | 22 | ||
| 19 | (verilog-auto-inst, verilog-auto-star-safe) | 23 | (verilog-auto-inst, verilog-auto-star-safe) |
| 20 | (verilog-delete-auto-star-implicit, verilog-read-sub-decls): Fix | 24 | (verilog-delete-auto-star-implicit, verilog-read-sub-decls): |
| 21 | removing "// Interfaces" when saving .* expansions. Reported by | 25 | Fix removing "// Interfaces" when saving .* expansions. Reported by |
| 22 | Pierre-David Pfister. | 26 | Pierre-David Pfister. |
| 23 | 27 | ||
| 24 | 2009-11-26 Glenn Morris <rgm@gnu.org> | 28 | 2009-11-26 Glenn Morris <rgm@gnu.org> |
| 25 | 29 | ||
| 26 | * eshell/em-dirs.el (eshell/cd): Don't throw to a tag outside the scope. | 30 | * eshell/em-dirs.el (eshell/cd): Don't throw to a tag outside |
| 31 | the scope. | ||
| 27 | 32 | ||
| 28 | 2009-11-25 Johan Bockgård <bojohan@gnu.org> | 33 | 2009-11-25 Johan Bockgård <bojohan@gnu.org> |
| 29 | 34 | ||
diff --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el index a40aad73597..84153a29eb0 100644 --- a/lisp/vc-bzr.el +++ b/lisp/vc-bzr.el | |||
| @@ -551,27 +551,34 @@ REV non-nil gets an error." | |||
| 551 | "Prepare BUFFER for `vc-annotate' on FILE. | 551 | "Prepare BUFFER for `vc-annotate' on FILE. |
| 552 | Each line is tagged with the revision number, which has a `help-echo' | 552 | Each line is tagged with the revision number, which has a `help-echo' |
| 553 | property containing author and date information." | 553 | property containing author and date information." |
| 554 | (apply #'vc-bzr-command "annotate" buffer 0 file "--long" "--all" | 554 | (apply #'vc-bzr-command "annotate" buffer 'async file "--long" "--all" |
| 555 | (if revision (list "-r" revision))) | 555 | (if revision (list "-r" revision))) |
| 556 | (with-current-buffer buffer | 556 | (lexical-let ((table (make-hash-table :test 'equal))) |
| 557 | ;; Store the tags for the annotated source lines in a hash table | 557 | (set-process-filter |
| 558 | ;; to allow saving space by sharing the text properties. | 558 | (get-buffer-process buffer) |
| 559 | (setq vc-bzr-annotation-table (make-hash-table :test 'equal)) | 559 | (lambda (proc string) |
| 560 | (goto-char (point-min)) | 560 | (when (process-buffer proc) |
| 561 | (while (re-search-forward "^\\( *[0-9.]+ *\\) \\([^\n ]+\\) +\\([0-9]\\{8\\}\\) |" | 561 | (with-current-buffer (process-buffer proc) |
| 562 | nil t) | 562 | (setq string (concat (process-get proc :vc-left-over) string)) |
| 563 | (let* ((rev (match-string 1)) | 563 | (while (string-match "^\\( *[0-9.]+ *\\) \\([^\n ]+\\) +\\([0-9]\\{8\\}\\)\\( |.*\n\\)" string) |
| 564 | (author (match-string 2)) | 564 | (let* ((rev (match-string 1 string)) |
| 565 | (date (match-string 3)) | 565 | (author (match-string 2 string)) |
| 566 | (key (match-string 0)) | 566 | (date (match-string 3 string)) |
| 567 | (tag (gethash key vc-bzr-annotation-table))) | 567 | (key (substring string (match-beginning 0) |
| 568 | (match-beginning 4))) | ||
| 569 | (line (match-string 4 string)) | ||
| 570 | (tag (gethash key table)) | ||
| 571 | (inhibit-read-only t)) | ||
| 572 | (setq string (substring string (match-end 0))) | ||
| 568 | (unless tag | 573 | (unless tag |
| 569 | (setq tag (propertize rev 'help-echo (concat "Author: " author | 574 | (setq tag (propertize rev 'help-echo (concat "Author: " author |
| 570 | ", date: " date) | 575 | ", date: " date) |
| 571 | 'mouse-face 'highlight)) | 576 | 'mouse-face 'highlight)) |
| 572 | (puthash key tag vc-bzr-annotation-table)) | 577 | (puthash key tag table)) |
| 573 | (replace-match "") | 578 | (goto-char (process-mark proc)) |
| 574 | (insert tag " |"))))) | 579 | (insert tag line) |
| 580 | (move-marker (process-mark proc) (point)))) | ||
| 581 | (process-put proc :vc-left-over string))))))) | ||
| 575 | 582 | ||
| 576 | (declare-function vc-annotate-convert-time "vc-annotate" (time)) | 583 | (declare-function vc-annotate-convert-time "vc-annotate" (time)) |
| 577 | 584 | ||