aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMasatake YAMATO <[email protected]>2007-06-15 19:40:47 +0000
committerMasatake YAMATO <[email protected]>2007-06-15 19:40:47 +0000
commitb32ce4c33acdac8d1fef85f9cd5ec4de3aa4e0fe (patch)
tree2729a0c02cba5c7f3f26bc8f322fc9764a8f5603
parent1bd8df7efa018cdf5342ca6a0a478a14ebf8e773 (diff)
* vc-bzr.el (vc-bzr-root): Cache the output of shell command execution.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/vc-bzr.el8
2 files changed, 10 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b67b406c60..c93f195d08 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,6 +1,9 @@
2007-06-15 Masatake YAMATO <[email protected]>
- * 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 <[email protected]>
diff --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el
index 0ff1668cf8..e5481b5f40 100644
--- a/lisp/vc-bzr.el
+++ b/lisp/vc-bzr.el
@@ -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