+2007-11-10 Dan Nicolaescu <dann@ics.uci.edu>
+
+ * vc.el (vc-diff-internal): Make the *vc-diff* buffer read only.
+
+ * vc-svn.el (vc-svn-print-log, vc-svn-diff):
+ * vc-mcvs.el (vc-mcvs-print-log, vc-mcvs-annotate-command):
+ * vc-cvs.el (vc-cvs-print-log, vc-cvs-diff)
+ (vc-cvs-annotate-command):
+ * vc-arch.el (vc-arch-diff): Remove test to check if start-process
+ is bound, it always is.
+
2007-11-10 Jason Rumney <jasonr@gnu.org>
* term/w32-win.el (w32-initialize-window-system): Move SJIS font
(setq newvers nil))
(if newvers
(error "Diffing specific revisions not implemented")
- (let* ((async (and (not vc-disable-async-diff) (fboundp 'start-process)))
+ (let* ((async (not vc-disable-async-diff))
;; Run the command from the root dir.
(default-directory (vc-arch-root file))
(status
"Get change log associated with FILE."
(vc-cvs-command
buffer
- (if (and (vc-stay-local-p files) (fboundp 'start-process)) 'async 0)
+ (if (vc-stay-local-p files) 'async 0)
files "log"))
(defun vc-cvs-wash-log ()
(defun vc-cvs-diff (files &optional oldvers newvers buffer)
"Get a difference report using CVS between two revisions of FILE."
(let* ((async (and (not vc-disable-async-diff)
- (vc-stay-local-p files)
- (fboundp 'start-process)))
+ (vc-stay-local-p files)))
(status (apply 'vc-cvs-command (or buffer "*vc-diff*")
(if async 'async 1)
files "diff"
"Execute \"cvs annotate\" on FILE, inserting the contents in BUFFER.
Optional arg REVISION is a revision to annotate from."
(vc-cvs-command buffer
- (if (and (vc-stay-local-p file) (fboundp 'start-process))
+ (if (vc-stay-local-p file)
'async 0)
file "annotate"
(if revision (concat "-r" revision)))
;; valid relative names.
(vc-mcvs-command
buffer
- (if (and (vc-stay-local-p files) (fboundp 'start-process)) 'async 0)
+ (if (vc-stay-local-p files) 'async 0)
files "log")))
(defun vc-mcvs-diff (files &optional oldvers newvers buffer)
"Get a difference report using Meta-CVS between two revisions of FILES."
(let* ((async (and (not vc-disable-async-diff)
- (vc-stay-local-p files)
- (fboundp 'start-process)))
+ (vc-stay-local-p files)))
;; Run the command from the root dir so that `mcvs filt' returns
;; valid relative names.
(default-directory (vc-mcvs-root (car files)))
Optional arg REVISION is a revision to annotate from."
(vc-mcvs-command
buffer
- (if (and (vc-stay-local-p file) (fboundp 'start-process)) 'async 0)
+ (if (vc-stay-local-p file) 'async 0)
file "annotate" (if revision (concat "-r" revision)))
(with-current-buffer buffer
(goto-char (point-min))
(vc-delistify (mapcar 'file-relative-name files)) "\n"))
(vc-svn-command
buffer
- (if (and (= (length files) 1) (vc-stay-local-p (car files)) (fboundp 'start-process)) 'async 0)
+ (if (and (= (length files) 1) (vc-stay-local-p (car files))) 'async 0)
files "log"
;; By default Subversion only shows the log upto the working revision,
;; whereas we also want the log of the subsequent commits. At least
(list "-x" (mapconcat 'identity (vc-switches nil 'diff) " "))))
(async (and (not vc-disable-async-diff)
(vc-stay-local-p files)
- (or oldvers newvers) ; Svn diffs those locally.
- (fboundp 'start-process))))
+ (or oldvers newvers)))) ; Svn diffs those locally.
(apply 'vc-svn-command buffer
(if async 'async 0)
files "diff"
nil)
(pop-to-buffer (current-buffer))
(diff-mode)
+ ;; Make the *vc-diff* buffer read only, the diff-mode key
+ ;; bindings are nicer for read only buffers. pcl-cvs does the
+ ;; same thing.
+ (setq buffer-read-only t)
(vc-exec-after `(vc-diff-sentinel ,verbose ,rev1-name ,rev2-name))
;; In the async case, we return t even if there are no differences
;; because we don't know that yet.