(vc-svn-print-log, vc-svn-diff): Add optional BUFFER arg.
Copied from Andre Spiegel's patch of 2004-03-21.
This commit is contained in:
parent
1525ea1e3a
commit
b349012b10
2 changed files with 11 additions and 7 deletions
|
@ -1,5 +1,8 @@
|
||||||
2004-04-20 Juanma Barranquero <lektu@terra.es>
|
2004-04-20 Juanma Barranquero <lektu@terra.es>
|
||||||
|
|
||||||
|
* vc-svn.el (vc-svn-print-log, vc-svn-diff): Add optional BUFFER
|
||||||
|
arg. Copied from Andre Spiegel's patch of 2004-03-21.
|
||||||
|
|
||||||
* calendar/time-date.el (time-to-day-in-year): Fix docstring.
|
* calendar/time-date.el (time-to-day-in-year): Fix docstring.
|
||||||
|
|
||||||
2004-04-20 Kenichi Handa <handa@m17n.org>
|
2004-04-20 Kenichi Handa <handa@m17n.org>
|
||||||
|
|
|
@ -334,21 +334,22 @@ The changes are between FIRST-VERSION and SECOND-VERSION."
|
||||||
;;; History functions
|
;;; History functions
|
||||||
;;;
|
;;;
|
||||||
|
|
||||||
(defun vc-svn-print-log (file)
|
(defun vc-svn-print-log (file &optional buffer)
|
||||||
"Get change log associated with FILE."
|
"Get change log associated with FILE."
|
||||||
(save-current-buffer
|
(save-current-buffer
|
||||||
(vc-setup-buffer nil)
|
(vc-setup-buffer buffer)
|
||||||
(let ((inhibit-read-only t))
|
(let ((inhibit-read-only t))
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
;; Add a line to tell log-view-mode what file this is.
|
;; Add a line to tell log-view-mode what file this is.
|
||||||
(insert "Working file: " (file-relative-name file) "\n"))
|
(insert "Working file: " (file-relative-name file) "\n"))
|
||||||
(vc-svn-command
|
(vc-svn-command
|
||||||
t
|
buffer
|
||||||
(if (and (vc-stay-local-p file) (fboundp 'start-process)) 'async 0)
|
(if (and (vc-stay-local-p file) (fboundp 'start-process)) 'async 0)
|
||||||
file "log")))
|
file "log")))
|
||||||
|
|
||||||
(defun vc-svn-diff (file &optional oldvers newvers)
|
(defun vc-svn-diff (file &optional oldvers newvers buffer)
|
||||||
"Get a difference report using SVN between two versions of FILE."
|
"Get a difference report using SVN between two versions of FILE."
|
||||||
|
(unless buffer (setq buffer "*vc-diff*"))
|
||||||
(if (string= (vc-workfile-version file) "0")
|
(if (string= (vc-workfile-version file) "0")
|
||||||
;; This file is added but not yet committed; there is no master file.
|
;; This file is added but not yet committed; there is no master file.
|
||||||
(if (or oldvers newvers)
|
(if (or oldvers newvers)
|
||||||
|
@ -356,7 +357,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION."
|
||||||
;; We regard this as "changed".
|
;; We regard this as "changed".
|
||||||
;; Diff it against /dev/null.
|
;; Diff it against /dev/null.
|
||||||
;; Note: this is NOT a "svn diff".
|
;; Note: this is NOT a "svn diff".
|
||||||
(apply 'vc-do-command "*vc-diff*"
|
(apply 'vc-do-command buffer
|
||||||
1 "diff" file
|
1 "diff" file
|
||||||
(append (vc-switches nil 'diff) '("/dev/null")))
|
(append (vc-switches nil 'diff) '("/dev/null")))
|
||||||
;; Even if it's empty, it's locally modified.
|
;; Even if it's empty, it's locally modified.
|
||||||
|
@ -365,7 +366,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION."
|
||||||
(async (and (vc-stay-local-p file)
|
(async (and (vc-stay-local-p file)
|
||||||
(or oldvers newvers) ; Svn diffs those locally.
|
(or oldvers newvers) ; Svn diffs those locally.
|
||||||
(fboundp 'start-process))))
|
(fboundp 'start-process))))
|
||||||
(apply 'vc-svn-command "*vc-diff*"
|
(apply 'vc-svn-command buffer
|
||||||
(if async 'async 0)
|
(if async 'async 0)
|
||||||
file "diff"
|
file "diff"
|
||||||
(append
|
(append
|
||||||
|
@ -377,7 +378,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION."
|
||||||
(if async 1 ; async diff => pessimistic assumption
|
(if async 1 ; async diff => pessimistic assumption
|
||||||
;; For some reason `svn diff' does not return a useful
|
;; For some reason `svn diff' does not return a useful
|
||||||
;; status w.r.t whether the diff was empty or not.
|
;; status w.r.t whether the diff was empty or not.
|
||||||
(buffer-size (get-buffer "*vc-diff*"))))))
|
(buffer-size (get-buffer buffer))))))
|
||||||
|
|
||||||
(defun vc-svn-diff-tree (dir &optional rev1 rev2)
|
(defun vc-svn-diff-tree (dir &optional rev1 rev2)
|
||||||
"Diff all files at and below DIR."
|
"Diff all files at and below DIR."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue