How to delete a pending changelist in Perforce from an old workspace and offline machine (by admin access)

perforce

Note: I want to delete the changelist only not the client.
The answers in the following link doesn't work when the pending changelist is from an old workspace which is in an offline machine Perforce: How can I delete a changelist that p4v refuses to delete?

Tried the following command p4 -u <user> -c <client> -H <host> revert -k <file(s)>
But I'm not allowed to do as the workspace owner is different.

Best Answer

First get the USER and CLIENT:

p4 describe CHANGE

With a 2015.1+ server at this point you can just do:

p4 revert -c CHANGE -C CLIENT //...
p4 change -df CHANGE

With an older server it's a few more steps.

First get the HOST so you can bypass the hostname check:

p4 client -o CLIENT

Now login, revert the files, and delete the change:

p4 login USER
p4 -u USER -c CLIENT -H HOST revert -k -c CHANGE //...
p4 change -df CHANGE
Related Topic