Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Revert File not in a workspace in perforce

I am trying to delete an old user from our perforce installation. A previous admin had deleted all their active workspaces / clients so we should be able to now delete the user, however when i run

p4 user -f -d auser
User auser has file(s) open on 1 client(s) and can't be deleted.

However auser no longer has any associated clients, and if I filter the pending changelist view in P4V it shows the user as having one file checked out in the default changelist but no client is specified. Even if I log in as the user I dont seem to be able to revert or do anything with the file. Any hints how I might solve this?

like image 992
Toby Allen Avatar asked May 26 '09 14:05

Toby Allen


1 Answers

While both of these commands returned nothing:

$ p4 clients -u <USER>

$ p4 changes -s pending -u <USER>

This command showed me which file was open:

$ p4 opened -u <USER>
//depot/path/to/file#1 - edit default change (text) by <USER>@<CLIENT>

This command doesn't work:

$ p4 -u <USER> -H <CLIENT> revert -k //depot/path/to/file
//depot/path/to/file#1 - belongs to user <USER>, not reverted

Deleting the client does:

$ p4 client -o <CLIENT> > <CLIENT>.txt
$ p4 client -d -f <CLIENT>
$ p4 opened -u <USER>
File(s) not opened anywhere.

FTW! \o/

If you need to, you can then recreate the client with:

$ p4 client

Then read in the <CLIENT>.txt file you created with the output of p4 client -o <CLIENT> and save it.

More here: http://answers.perforce.com/articles/KB_Article/Reverting-Another-User-s-Files

like image 156
JohnGH Avatar answered Oct 08 '22 04:10

JohnGH