]> git.eshelyaron.com Git - emacs.git/commitdiff
* vc-bzr.el (vc-bzr-root): Cache the output of shell command execution.
authorMasatake YAMATO <jet@gyve.org>
Fri, 15 Jun 2007 19:40:47 +0000 (19:40 +0000)
committerMasatake YAMATO <jet@gyve.org>
Fri, 15 Jun 2007 19:40:47 +0000 (19:40 +0000)
lisp/ChangeLog
lisp/vc-bzr.el

index b67b406c600764b8c5531843bb35b63131393a6f..c93f195d087a86960f719afe5617c136bf390df2 100644 (file)
@@ -1,6 +1,9 @@
 2007-06-15  Masatake YAMATO  <jet@gyve.org>
 
-       * vc.el (vc-dired-hook): check the backend returned from 
+       * vc-bzr.el (vc-bzr-root): Cache the output of shell command
+       execution.
+
+       * vc.el (vc-dired-hook): Check the backend returned from 
        `vc-responsible-backend' can really handle `subdir'.
 
 2007-06-15  Chong Yidong  <cyd@stupidchicken.com>
index 0ff1668cf803d7ea564618340f548ed7e28f50ac..e5481b5f405cbdd7bfdb6175bb1754bc74bb3f74 100644 (file)
@@ -463,8 +463,12 @@ Return nil if current line isn't annotated."
 ;; if there are any symbolic links.
 (defun vc-bzr-root (dir)
   "Return the root directory of the bzr repository containing DIR."
-  (substring 
-   (shell-command-to-string (concat vc-bzr-program " root " dir)) 0 -1))
+  ;; Cache technique copied from vc-arch.el.
+  (or (vc-file-getprop dir 'bzr-root)
+      (vc-file-setprop
+       dir 'bzr-root
+       (substring 
+       (shell-command-to-string (concat vc-bzr-program " root " dir)) 0 -1))))
 
 ;; TODO: it would be nice to mark the conflicted files in  VC Dired,
 ;; and implement a command to run ediff and `bzr resolve' once the