]> git.eshelyaron.com Git - emacs.git/commitdiff
(vc-bzr-print-log, vc-bzr-diff): Do it asynchronously.
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 24 Mar 2008 19:52:29 +0000 (19:52 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 24 Mar 2008 19:52:29 +0000 (19:52 +0000)
lisp/ChangeLog
lisp/vc-bzr.el

index 72ca41f9a03b2324baef9bb2eb949855f8078ee3..d300ae50324f1700eed8ffcdf9d328aba7c358a7 100644 (file)
@@ -1,3 +1,7 @@
+2008-03-24  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * vc-bzr.el (vc-bzr-print-log, vc-bzr-diff): Do it asynchronously.
+
 2008-03-22  Drew Adams  <drew.adams@oracle.com>
 
        * finder.el (finder-mode-syntax-table, finder-font-lock-keywords):
index 9fbf7b86dec31f6746d3016f2fddc1a767ef4c16..5fff3d8e544f65f02c285cb9152599e65342e2af 100644 (file)
@@ -396,22 +396,19 @@ EDITABLE is ignored."
   (vc-setup-buffer buffer)
   ;; If the buffer exists from a previous invocation it might be
   ;; read-only.
-  (let ((inhibit-read-only t))
     ;; FIXME: `vc-bzr-command' runs `bzr log' with `LC_MESSAGES=C', so
     ;; the log display may not what the user wants - but I see no other
     ;; way of getting the above regexps working.
     (dolist (file files)
+    (vc-exec-after
+     `(let ((inhibit-read-only t))
       (with-current-buffer buffer
        ;; Insert the file name so that log-view.el can find it.
-       (insert "Working file: " file "\n")) ;; Like RCS/CVS.
-      (apply 'vc-bzr-command "log" buffer 0 file
-            (if (stringp vc-bzr-log-switches)
+          (insert "Working file: " ',file "\n")) ;; Like RCS/CVS.
+        (apply 'vc-bzr-command "log" ',buffer 'async ',file
+               ',(if (stringp vc-bzr-log-switches)
                 (list vc-bzr-log-switches)
-              vc-bzr-log-switches))))
-  ;; FIXME: Until Emacs-23, VC was missing a hook to sort out the mode for
-  ;; the buffer, or at least set the regexps right.
-  (unless (fboundp 'vc-default-log-view-mode)
-    (add-hook 'log-view-mode-hook 'vc-bzr-log-view-mode)))
+                   vc-bzr-log-switches))))))
 
 (defun vc-bzr-show-log-entry (revision)
   "Find entry for patch name REVISION in bzr change log buffer."
@@ -429,7 +426,7 @@ EDITABLE is ignored."
 (defun vc-bzr-diff (files &optional rev1 rev2 buffer)
   "VC bzr backend for diff."
   ;; `bzr diff' exits with code 1 if diff is non-empty.
-  (apply #'vc-bzr-command "diff" (or buffer "*vc-diff*") 1 files
+  (apply #'vc-bzr-command "diff" (or buffer "*vc-diff*") 'async files
          "--diff-options" (mapconcat 'identity 
                                      (vc-diff-switches-list bzr)
                                     " ")