diff --git a/p4-lowlevel.el b/p4-lowlevel.el index 68e5b31..74d46b0 100644 --- a/p4-lowlevel.el +++ b/p4-lowlevel.el @@ -384,10 +384,12 @@ Returns nil or raises an error on failure." ;; file which already exists in the repository. (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. 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 ;; time being: diff --git a/vc-p4.el b/vc-p4.el index 83eef69..4ea6d09 100644 --- a/vc-p4.el +++ b/vc-p4.el @@ -1015,7 +1015,7 @@ The difference to vc-do-command is that this function always invokes `p4'." (defun vc-p4-delete-file (file) "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) (interactive