Commit fe1919ab authored by Dan Nicolaescu's avatar Dan Nicolaescu
Browse files

* 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.
parent 1adf362d
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
......
......@@ -395,7 +395,7 @@ Return non-nil if FILE is unchanged."
(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
......
......@@ -503,7 +503,7 @@ The changes are between FIRST-REVISION and SECOND-REVISION."
"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 ()
......@@ -514,8 +514,7 @@ The changes are between FIRST-REVISION and SECOND-REVISION."
(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"
......@@ -563,7 +562,7 @@ The changes are between FIRST-REVISION and SECOND-REVISION."
"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)))
......
......@@ -443,14 +443,13 @@ The changes are between FIRST-REVISION and SECOND-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)))
......@@ -468,7 +467,7 @@ The changes are between FIRST-REVISION and SECOND-REVISION."
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))
......
......@@ -391,7 +391,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION."
(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
......@@ -422,8 +422,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION."
(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"
......
......@@ -1931,6 +1931,10 @@ returns t if the buffer had changes, nil otherwise."
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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment