perforcep4v

How to map depot path to a different client path?


Quick question: My Perforce depot path looks like

//depot/systems/live/myApp/src

I want to map it to my client directory as

/myApp/src

But I always get the full path as it is in the depot. Is there a way to accomplish what I'm looking for?


Solution

  • Map the depot path to where you want it to be relative to your client root:

    Client: myClientName
    Root: /myApp
    View:
        //depot/systems/live/myApp/... //myClientName/...
    

    The //myClientName part of the mapping corresponds directly to the Root of the client. If you specify the full depot path on the left side of the map, and the bare client root on the right side of the map, then everything from that specific depot folder goes directly into your root without copying the actual depot path.

    (Doing this in P4V might require using some tricky "Advanced" tab in the workspace editor -- I have never had good luck with editing my client view via P4V, because it seems to want to add stuff to the client view that I don't want, so I always use the command line. YMMV.)