From: Masatake YAMATO Date: Fri, 15 Jun 2007 19:40:47 +0000 (+0000) Subject: * vc-bzr.el (vc-bzr-root): Cache the output of shell command execution. X-Git-Tag: emacs-pretest-23.0.90~12245 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b32ce4c33acdac8d1fef85f9cd5ec4de3aa4e0fe;p=emacs.git * vc-bzr.el (vc-bzr-root): Cache the output of shell command execution. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b67b406c600..c93f195d087 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,9 @@ 2007-06-15 Masatake YAMATO - * 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 diff --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el index 0ff1668cf80..e5481b5f405 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