Update vc-p4-diff argument list

Newer versions of vc add in an async flag, this is not currently used
by us.
This commit is contained in:
Tom Willemse 2017-06-07 12:08:30 -07:00
parent 5596f66072
commit 94077d5136

View file

@ -61,7 +61,7 @@
(eval-and-compile (eval-and-compile
(if (not (string-match "XEmacs" emacs-version)) (if (not (string-match "XEmacs" emacs-version))
(require 'vc-annotate)) (require 'vc-annotate))
(require 'vc-hooks) (require 'vc-hooks)
(require 'vc) (require 'vc)
(require 'ediff)) (require 'ediff))
@ -110,19 +110,19 @@ Perforce has per-file revisions."
(defun vc-p4-registered (file) (defun vc-p4-registered (file)
"Return non-nil is FILE is handled by Perforce." "Return non-nil is FILE is handled by Perforce."
(if (p4-lowlevel-locate-p4) (if (p4-lowlevel-locate-p4)
(if (and vc-p4-require-p4config (if (and vc-p4-require-p4config
(getenv "P4CONFIG") (getenv "P4CONFIG")
(not (vc-p4-find-p4config (file-name-directory file)))) (not (vc-p4-find-p4config (file-name-directory file))))
nil nil
(let* ((fstat (p4-lowlevel-fstat file nil t)) (let* ((fstat (p4-lowlevel-fstat file nil t))
(action (cdr (or (assoc "action" fstat) (action (cdr (or (assoc "action" fstat)
(assoc "headAction" fstat))))) (assoc "headAction" fstat)))))
(if (or (not fstat) (if (or (not fstat)
(string= action "delete")) (string= action "delete"))
nil nil
; This sets a bunch of VC properties ; This sets a bunch of VC properties
(vc-p4-state file fstat) (vc-p4-state file fstat)
t))))) t)))))
(defun vc-p4-state (file &optional fstat-list force dont-compare-nonopened) (defun vc-p4-state (file &optional fstat-list force dont-compare-nonopened)
"Returns the current version control state of FILE in Perforce. "Returns the current version control state of FILE in Perforce.
@ -505,7 +505,7 @@ files under the default directory otherwise."
("^date: \\(.+\\)" (1 'change-log-date)) ("^date: \\(.+\\)" (1 'change-log-date))
("^summary:[ \t]+\\(.+\\)" (1 'log-view-message)))))) ("^summary:[ \t]+\\(.+\\)" (1 'log-view-message))))))
(defun vc-p4-diff (file-or-files &optional rev1 rev2 buff) (defun vc-p4-diff (file-or-files &optional rev1 rev2 buff _async)
"Do a Perforce diff." "Do a Perforce diff."
(let* ((buffer (cond (let* ((buffer (cond
((bufferp buff) buff) ((bufferp buff) buff)
@ -764,8 +764,8 @@ Optional arg VERSION is a version to annotate from."
ins-string) ins-string)
(setq ins-string (format "%d\n" ch-2)) (setq ins-string (format "%d\n" ch-2))
;; (p4-exec-p4 buffer (list "diff2" ;; (p4-exec-p4 buffer (list "diff2"
;; (format "%s@%d" file1 ch-1) ;; (format "%s@%d" file1 ch-1)
;; (format "%s@%d" file2 ch-2)) t) ;; (format "%s@%d" file2 ch-2)) t)
(with-temp-buffer (with-temp-buffer
(vc-p4-command (current-buffer) nil nil (vc-p4-command (current-buffer) nil nil
"diff2" (format "%s@%d" file1 ch-1) "diff2" (format "%s@%d" file1 ch-1)
@ -798,8 +798,8 @@ Optional arg VERSION is a version to annotate from."
(setq ra (1+ ra)))))))) (setq ra (1+ ra))))))))
(setq tmp-alst (cdr tmp-alst)))) (setq tmp-alst (cdr tmp-alst))))
;; (p4-noinput-buffer-action "print" nil t ;; (p4-noinput-buffer-action "print" nil t
;; (list (format "%s#%d" fullname head-rev)) ;; (list (format "%s#%d" fullname head-rev))
;; t) ;; t)
(vc-p4-command buffer nil nil (vc-p4-command buffer nil nil
"print" (format "%s#%d" fullname head-rev)) "print" (format "%s#%d" fullname head-rev))
(let (line cnum (old-cnum 0) change-data (let (line cnum (old-cnum 0) change-data