Search code examples
perforcep4api.netp4api

How can I perform a Perforce UNDO operation using p4Api in c#


If I was calling this from the command line, I would call (for example):

p4 undo //depot/myfile.txt#2

How can I accomplish the same thing using the perforce API? There appears to be no api for UNDO.


Solution

  • Looks like you can use RunCommand to run an arbitrary server command in the absence of an API wrapper:

    https://www.perforce.com/manuals/p4api.net/p4api.net_reference/html/M_Perforce_P4_P4Server_RunCommand.htm