2013-10-08

Perforce: Delete a client/workspace even if it does not exist anymore

So the user formatted/lost/whatever their computer and maybe even had opened files there?
Grab your admin account:

  1. p4 client WORKSPACE
    Delete the line starting with "Host:", to remove host restriction from that client workspace.
  2. p4 -u USER -c WORKSPACE revert -k -a
    Reverts all (no file glob specified) unchanged (-a) open files in that workspace (-c), and doesn't sync anything (-k).
  3. p4 client -f -d WORKSPACE
    Deletes (-d) the workspace, forced (-f).
Extras:
    • List user's client workspaces:
      p4 clients -u USER
    • Remove all managed files (just files! directory is just metadata in perforce) from the current workspace:
      p4 sync //...#none
      Then delete the directories manually -_-
    • Explicitly set a server:
      p4 -p perforce-otherone:1666 clients -u USER
    • (Moar to come)

    No comments :

    Post a Comment