Function: vc-root-diff
vc-root-diff is an autoloaded, interactive and byte-compiled function
defined in vc.el.gz.
Signature
(vc-root-diff HISTORIC &optional NOT-URGENT)
Documentation
Display diffs between VC-controlled whole tree revisions.
Normally, this compares the tree corresponding to the current fileset with the working revision. With a prefix argument HISTORIC, prompt for two revision designators specifying which revisions to compare.
The optional argument NOT-URGENT non-nil means it is ok to say no to saving the buffer.
Probably introduced at or before Emacs version 23.2.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/vc/vc.el.gz
;;;###autoload
(defun vc-root-diff (historic &optional not-urgent)
"Display diffs between VC-controlled whole tree revisions.
Normally, this compares the tree corresponding to the current
fileset with the working revision.
With a prefix argument HISTORIC, prompt for two revision
designators specifying which revisions to compare.
The optional argument NOT-URGENT non-nil means it is ok to say no to
saving the buffer."
(interactive (list current-prefix-arg t))
(if historic
;; We want the diff for the VC root dir.
(call-interactively 'vc-root-version-diff)
(vc-maybe-buffer-sync not-urgent)
(let ((backend (vc-deduce-backend))
(default-directory default-directory)
rootdir)
(if backend
(setq rootdir (vc-call-backend backend 'root default-directory))
(setq rootdir (read-directory-name "Directory for VC root-diff: "))
(setq backend (vc-responsible-backend rootdir))
(if backend
(setq default-directory rootdir)
(error "Directory is not version controlled")))
;; VC diff for the root directory produces output that is
;; relative to it. Bind default-directory to the root directory
;; here, this way the *vc-diff* buffer is setup correctly, so
;; relative file names work.
(let ((default-directory rootdir))
(vc-diff-internal
t (list backend (list rootdir)) nil nil
(called-interactively-p 'interactive))))))