Question

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?

Was it helpful?

Solution 2

Solved.

A bit weird but this is what I did. I got the details of the default changelist that contained the file. It had the workspace name which was the name of a machine. I logged into the machine and then into perforce as the user. At this point I could see the pending changelist and revert the file. Now I can delete the user.

How did this happen?

I think what must of happened was a confusion of clients. A while back I changed the owner of quite a few clients on that machine (its the build server) and some of these clients must have had open files for the old user. This is the only explanation I can come up with.

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top