Perforce Public Knowledge Base - Cannot delete user because files are opened
× PRODUCTS SOLUTIONS CUSTOMERS LEARN SUPPORT
Downloads Company Partners Careers Contact Free Trials
Menu Search
Perforce
Reset Search
 

 

Article

Cannot delete user because files are opened

« Go Back

Information

 
Problem

Perforce cannot delete a user because files are open in a client workspace.  However, when attempting to delete a client workspace, you may find a conflict where a file is opened in one command like "p4 opened -a" but the corresponding client workspace either does not exist or does not have this file opened.

Solution

Check "p4 opened -a" against "p4 opened"

A list of all files opened on this server can be seen by running
 

p4 opened -a


A subset of these files should be seen by the "p4 opened" command
 

p4 opened

 

or

p4 opened -C clientname

This output shows all files associated with client clientname.

Check if there is a discrepancy where a file appears in "p4 opened -a" but the "p4 opened" message is

File(s) not opened on this client.

If so, run the steps below.


Run p4d -xf 925

To fix this, first log into the Perforce server and run
 
p4d -r . -xf 925
Deleted 3 extra and synthesized 1 missing lock record
s.

If the output shows non-zero records, then this may have fixed the problem.  Retry the original command that was not working such as deleting the client workspace.
 

Rebuild havemap

If the above does not work force an update of the "have-map" of the client.

Fixing one client workspace 
  1. Edit the client workspace.
  2. Modify the client view with a bogus line under "View" -- For example, for the client "client_name":

//depot/bogusname/... //client_name/bogusname/...

  1. Save the client workspace.
Note: At this point the issue is fixed. You can confirm this by checking the p4 opened output again.
  1. Edit the client workspace.
  2. Remove the bogus view line.
  3. Save the client workspace again.
In P4V, go to View, Workspaces, double-click the workspace, Edit, then add in:
 

View:

     //depot/bogus/...  //clientworkspace/bogus/...

 

Save this client workspace. Remove this View line you just added and re-save the client workspace. This should fix the problem for this client workspace.

Fixing all client workspaces

To fix all client workspaces, use the "p4d -xU BuildHaveMaps" command to rebuild have-maps on the Perforce server during off-hours.
  1. Stop the Perforce server
  2. p4d -r server_root -xU BuildHaveMaps
  3. Restart the server
 

Run p4d -xx

If you continue to have issues with files opened against a client workspace after re-building the have-map, preferably with Perforce down (to avoid temporary discrepancies in progress), run
 
p4d -r . -xx

This command will look for discrepancies but will not make changes to the Perforce database.  Send the file to contact Perforce Support for evaluation.
Related Links

Feedback

 

Was this article helpful?


   

Feedback

Please tell us how we can make this article more useful.

Characters Remaining: 255