Update vc-p4-checkout for modern vc
The argument list for the ‘vc-*-checkout’ function doesn’t include destfile or editable anymore.
This commit is contained in:
parent
47eb5350df
commit
600e9e2f71
1 changed files with 7 additions and 15 deletions
18
vc-p4.el
18
vc-p4.el
|
@ -319,28 +319,20 @@ comment COMMENT."
|
||||||
(vc-p4-state file nil t)))))
|
(vc-p4-state file nil t)))))
|
||||||
|
|
||||||
;;; FIXME: this should not have a DESTFILE argument
|
;;; FIXME: this should not have a DESTFILE argument
|
||||||
(defun vc-p4-checkout (file &optional editable rev destfile)
|
(defun vc-p4-checkout (file &optional rev)
|
||||||
(if (and editable destfile (not (string= file destfile)))
|
|
||||||
(error "Can't lock a Perforce file in an alternate location."))
|
|
||||||
(if (string= file destfile)
|
|
||||||
(setq destfile nil))
|
|
||||||
(let ((default-directory (file-name-directory file))
|
(let ((default-directory (file-name-directory file))
|
||||||
buffer)
|
buffer)
|
||||||
; Make sure we've got all the current state of the file
|
;; Make sure we've got all the current state of the file
|
||||||
(vc-p4-state file)
|
(vc-p4-state file)
|
||||||
(cond
|
(cond
|
||||||
((not rev)
|
((not rev)
|
||||||
(setq rev (vc-file-getprop file 'vc-workfile-version)))
|
(setq rev (vc-file-getprop file 'vc-workfile-version)))
|
||||||
((string= rev "")
|
((or (string= rev "")
|
||||||
|
(eq rev t))
|
||||||
(setq rev (vc-file-getprop file 'vc-latest-version))))
|
(setq rev (vc-file-getprop file 'vc-latest-version))))
|
||||||
(if destfile
|
|
||||||
(progn (setq buffer (p4-lowlevel-print file rev 'buffer t))
|
|
||||||
(set-buffer buffer)
|
|
||||||
(write-file destfile))
|
|
||||||
(if (not (string= rev (vc-file-getprop file 'vc-workfile-version)))
|
(if (not (string= rev (vc-file-getprop file 'vc-workfile-version)))
|
||||||
(p4-lowlevel-sync file rev))
|
(p4-lowlevel-sync file rev))
|
||||||
(if editable
|
(p4-lowlevel-edit file))
|
||||||
(p4-lowlevel-edit file))))
|
|
||||||
(vc-p4-state file nil t))
|
(vc-p4-state file nil t))
|
||||||
|
|
||||||
(defun vc-p4-revert (file contents-done)
|
(defun vc-p4-revert (file contents-done)
|
||||||
|
|
Loading…
Reference in a new issue