From 749665a8ae237a24a34451eb4181f75b9a377f76 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Wed, 13 May 2020 11:07:38 -0700 Subject: [PATCH] Add support for the vc-delete command --- p4-lowlevel.el | 5 +++++ vc-p4.el | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/p4-lowlevel.el b/p4-lowlevel.el index 67e8f82..13cb9cf 100644 --- a/p4-lowlevel.el +++ b/p4-lowlevel.el @@ -373,6 +373,11 @@ Returns nil or raises an error on failure." ; an attempt to add a file which already exists in the repository. (p4-lowlevel-command-or-error (list "add" file))) +(defun p4-lowlevel-delete (file) + "Tell Perforce to delet FILE from the repository. +Returns nil or raises an error on failure." + (p4-lowlevel-command-or-error (list "delete" file))) + ; 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 d08d94e..a887efd 100644 --- a/vc-p4.el +++ b/vc-p4.el @@ -980,6 +980,10 @@ third subblock in each conflict block." The difference to vc-do-command is that this function always invokes `p4'." (apply 'vc-do-command buffer okstatus "p4" file flags)) +(defun vc-p4-delete-file (file) + "Tell perforce to delete FILE from the repository." + (p4-lowlevel-delete file)) + (defun vc-p4-switch-client (client) (interactive (list (completing-read "Client: " (p4-lowlevel-local-clients))))