diff options
author | Juri Linkov <juri@linkov.net> | 2019-03-19 23:52:33 +0200 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2019-03-19 23:52:33 +0200 |
commit | b2dd61ffb0b4efc0419f4b5cbe279c2700b549e8 (patch) | |
tree | d6e5e57c11b92681880ed87d7579f8667df28551 /lisp/vc | |
parent | ded3c8de802d98635dc06faa178f91f99afdac53 (diff) | |
download | emacs-b2dd61ffb0b4efc0419f4b5cbe279c2700b549e8.tar.gz |
* lisp/vc/vc.el (vc-diff-build-argument-list-internal): Add arg fileset.
(vc-root-version-diff): Set vc-diff-build-argument-list-internal's
optional arg 'fileset' to the root directory. (Bug#34532)
Diffstat (limited to 'lisp/vc')
-rw-r--r-- | lisp/vc/vc-hooks.el | 3 | ||||
-rw-r--r-- | lisp/vc/vc.el | 10 |
2 files changed, 8 insertions, 5 deletions
diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index 7dd7346fe8f..2052ace12bf 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el @@ -950,8 +950,7 @@ In the latter case, VC mode is deactivated for this buffer." (bindings--define-key map [separator2] menu-bar-separator) (bindings--define-key map [vc-insert-header] '(menu-item "Insert Header" vc-insert-headers - :help "Insert headers into a file for use with a version control system. -")) + :help "Insert headers into a file for use with a version control system.")) (bindings--define-key map [vc-revert] '(menu-item "Revert to Base Version" vc-revert :help "Revert working copies of the selected file set to their repository contents")) diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index aae21ec45a4..0a638ec7d7f 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1762,9 +1762,9 @@ Return t if the buffer had changes, nil otherwise." nil nil initial-input 'vc-revision-history default) (read-string prompt initial-input nil default)))) -(defun vc-diff-build-argument-list-internal () +(defun vc-diff-build-argument-list-internal (&optional fileset) "Build argument list for calling internal diff functions." - (let* ((vc-fileset (vc-deduce-fileset t)) ;FIXME: why t? --Stef + (let* ((vc-fileset (or fileset (vc-deduce-fileset t))) ;FIXME: why t? --Stef (files (cadr vc-fileset)) (backend (car vc-fileset)) (first (car files)) @@ -1815,7 +1815,11 @@ Return t if the buffer had changes, nil otherwise." ;;;###autoload (defun vc-root-version-diff (_files rev1 rev2) "Report diffs between REV1 and REV2 revisions of the whole tree." - (interactive (vc-diff-build-argument-list-internal)) + (interactive + (vc-diff-build-argument-list-internal + (or (ignore-errors (vc-deduce-fileset t)) + (let ((backend (or (vc-deduce-backend) (vc-responsible-backend default-directory)))) + (list backend (list (vc-call-backend backend 'root default-directory))))))) ;; This is a mix of `vc-root-diff' and `vc-version-diff' (when (and (not rev1) rev2) (error "Not a valid revision range")) |