aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Nicolaescu2010-04-06 21:14:56 -0700
committerDan Nicolaescu2010-04-06 21:14:56 -0700
commit7ec69e2b1ababe37e14a3fd941133c0f05818f38 (patch)
treebde2fe78399c17c876f4e89af759e7db6efb6620
parentfd9ea9d32bce4744006ed045576a15bc9da7685e (diff)
downloademacs-7ec69e2b1ababe37e14a3fd941133c0f05818f38.tar.gz
emacs-7ec69e2b1ababe37e14a3fd941133c0f05818f38.zip
Fix default-directory for vc-root-diff.
* vc.el (vc-root-diff): Bind default-directory to the root directory for the diff command.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/vc.el11
2 files changed, 14 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5f50546468b..1fda3acf555 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12010-04-07 Dan Nicolaescu <dann@ics.uci.edu>
2
3 Fix default-directory for vc-root-diff.
4 * vc.el (vc-root-diff): Bind default-directory to the root
5 directory for the diff command.
6
12010-04-07 Michael McNamara <mac@mail.brushroad.com> 72010-04-07 Michael McNamara <mac@mail.brushroad.com>
2 8
3 * verilog-mode.el (verilog-forward-sexp, verilog-calc-1): Support 9 * verilog-mode.el (verilog-forward-sexp, verilog-calc-1): Support
diff --git a/lisp/vc.el b/lisp/vc.el
index 142a1508162..aef5fad12e1 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -1642,9 +1642,14 @@ saving the buffer."
1642 (error "Buffer is not version controlled")) 1642 (error "Buffer is not version controlled"))
1643 (setq rootdir (vc-call-backend backend 'root default-directory)) 1643 (setq rootdir (vc-call-backend backend 'root default-directory))
1644 (setq working-revision (vc-working-revision rootdir)) 1644 (setq working-revision (vc-working-revision rootdir))
1645 (vc-diff-internal 1645 ;; VC diff for the root directory produces output that is
1646 t (list backend (list rootdir) working-revision) nil nil 1646 ;; relative to it. Bind default-directory to the root directory
1647 (called-interactively-p 'interactive))))) 1647 ;; here, this way the *vc-diff* buffer is setup correctly, so
1648 ;; relative file names work.
1649 (let ((default-directory rootdir))
1650 (vc-diff-internal
1651 t (list backend (list rootdir) working-revision) nil nil
1652 (called-interactively-p 'interactive))))))
1648 1653
1649;;;###autoload 1654;;;###autoload
1650(defun vc-revision-other-window (rev) 1655(defun vc-revision-other-window (rev)