aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndré Spiegel2001-10-21 12:21:29 +0000
committerAndré Spiegel2001-10-21 12:21:29 +0000
commit5e0fdc5a86ca32d437be51e94e8902ed489f3b57 (patch)
tree7320553b47047cf650672ba1f33c8d5e0c7fc4e8
parent2c87edc17b3f7326aff24abe8393bfbfc842c3ba (diff)
downloademacs-5e0fdc5a86ca32d437be51e94e8902ed489f3b57.tar.gz
emacs-5e0fdc5a86ca32d437be51e94e8902ed489f3b57.zip
(vc-cvs-diff-tree): New function.
-rw-r--r--lisp/vc-cvs.el26
1 files changed, 25 insertions, 1 deletions
diff --git a/lisp/vc-cvs.el b/lisp/vc-cvs.el
index 4a6ae5275b1..0ebade2c675 100644
--- a/lisp/vc-cvs.el
+++ b/lisp/vc-cvs.el
@@ -5,7 +5,7 @@
5;; Author: FSF (see vc.el for full credits) 5;; Author: FSF (see vc.el for full credits)
6;; Maintainer: Andre Spiegel <spiegel@gnu.org> 6;; Maintainer: Andre Spiegel <spiegel@gnu.org>
7 7
8;; $Id: vc-cvs.el,v 1.23 2001/07/04 15:51:18 monnier Exp $ 8;; $Id: vc-cvs.el,v 1.24 2001/08/28 17:06:36 spiegel Exp $
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
11 11
@@ -523,6 +523,30 @@ The changes are between FIRST-VERSION and SECOND-VERSION."
523 1 ;; async diff, pessimistic assumption 523 1 ;; async diff, pessimistic assumption
524 status)))) 524 status))))
525 525
526(defun vc-cvs-diff-tree (dir &optional rev1 rev2)
527 "Diff all files at and below DIR."
528 (with-current-buffer "*vc-diff*"
529 (setq default-directory dir)
530 (if (vc-cvs-stay-local-p dir)
531 ;; local diff: do it filewise, and only for files that are modified
532 (vc-file-tree-walk
533 dir
534 (lambda (f)
535 (vc-exec-after
536 `(let ((coding-system-for-read (vc-coding-system-for-diff ',f)))
537 ;; possible optimization: fetch the state of all files
538 ;; in the tree via vc-cvs-dir-state-heuristic
539 (unless (vc-up-to-date-p ',f)
540 (message "Looking at %s" ',f)
541 (vc-diff-internal ',f ',rel1 ',rel2))))))
542 ;; cvs diff: use a single call for the entire tree
543 (let ((coding-system-for-read
544 (or coding-system-for-read 'undecided)))
545 (apply 'vc-do-command "*vc-diff*" 1 "cvs" nil "diff"
546 (and rel1 (concat "-r" rel1))
547 (and rel2 (concat "-r" rel2))
548 (vc-diff-switches-list cvs))))))
549
526(defun vc-cvs-annotate-command (file buffer &optional version) 550(defun vc-cvs-annotate-command (file buffer &optional version)
527 "Execute \"cvs annotate\" on FILE, inserting the contents in BUFFER. 551 "Execute \"cvs annotate\" on FILE, inserting the contents in BUFFER.
528Optional arg VERSION is a version to annotate from." 552Optional arg VERSION is a version to annotate from."