Add client argument to ‘vc-p4-delete’

This commit is contained in:
Tom Willemse 2021-01-23 10:34:05 -08:00
parent a9bf4c10ad
commit 7af739cc7d
2 changed files with 5 additions and 3 deletions

View file

@ -384,10 +384,12 @@ Returns nil or raises an error on failure."
;; file which already exists in the repository. ;; file which already exists in the repository.
(p4-lowlevel-command-or-error args))) (p4-lowlevel-command-or-error args)))
(defun p4-lowlevel-delete (file) (cl-defun p4-lowlevel-delete (file &key client)
"Tell Perforce to delet FILE from the repository. "Tell Perforce to delet FILE from the repository.
Returns nil or raises an error on failure." Returns nil or raises an error on failure."
(p4-lowlevel-command-or-error (list "delete" file))) (let* ((client-args (if client (list "-c" client)))
(args (append client-args (list "delete" file))))
(p4-lowlevel-command-or-error args)))
;; Here's what we need to support from the "p4 change" command, at least for the ;; Here's what we need to support from the "p4 change" command, at least for the
;; time being: ;; time being:

View file

@ -1015,7 +1015,7 @@ The difference to vc-do-command is that this function always invokes `p4'."
(defun vc-p4-delete-file (file) (defun vc-p4-delete-file (file)
"Tell perforce to delete FILE from the repository." "Tell perforce to delete FILE from the repository."
(p4-lowlevel-delete file)) (p4-lowlevel-delete file :client vc-p4-client))
(defun vc-p4-switch-client (client) (defun vc-p4-switch-client (client)
(interactive (interactive