Function: cvs-mode-idiff-other

cvs-mode-idiff-other is an interactive and byte-compiled function defined in pcvs.el.gz.

Signature

(cvs-mode-idiff-other)

Documentation

Diff interactively current file to revisions.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/vc/pcvs.el.gz
(defun-cvs-mode (cvs-mode-idiff-other . NOARGS) ()
  "Diff interactively current file to revisions."
  (interactive)
  (let* ((rev1 (cvs-prefix-get 'cvs-branch-prefix))
	 (rev2 (and rev1 (cvs-prefix-get 'cvs-secondary-branch-prefix)))
	 (fis (cvs-mode-marked 'diff "idiff" :file t)))
    (when (> (length fis) 2)
      (error "idiff-other cannot be applied to more than 2 files at a time"))
    (let* ((fi1 (car fis))
	   (rev1-buf (if rev1 (cvs-retrieve-revision fi1 rev1)
		       (find-file-noselect (cvs-fileinfo->full-name fi1))))
	   rev2-buf)
      (if (cdr fis)
	  (let ((fi2 (nth 1 fis)))
	    (setq rev2-buf
		  (if rev2 (cvs-retrieve-revision fi2 rev2)
		    (find-file-noselect (cvs-fileinfo->full-name fi2)))))
	(error "idiff-other doesn't know what other file/buffer to use"))
      (let* (;; this binding is used by cvs-ediff-startup-hook
	     (cvs-transient-buffers (list rev1-buf rev2-buf)))
	(funcall (car cvs-idiff-imerge-handlers)
		 rev1-buf rev2-buf)))))