goose_lake
goose_lake

Reputation: 1408

Is it possible to map a Perforce depot subpath to the workspace root folder?

In a depot with a folder structure like:

depot
    subFolder1
        subSubFolder1
        subSubFolder2
    subfolder2

Is it possible to map just //depot/subFolder1/... to the workspace root on the local filesystem, so that it will contain directly subSubFolder1 and subSubFolder2?

I am trying to specify the mapping for a virtual stream. I tried the following paths mapping, but it maps the whole depot to the root for some reason.

exclude ...
import+ ... //depot/subFolder1/...

However, a mapping like this works to map subFolder1 to a subfolder in the workspace root (not directly to the root, which is what I want):

exclude ...
import+ subFolder1/... //depot/subFolder1/...

Note: If this isn't possible with a virtual stream, but is possible in a non-stream workspace mapping, please let me now, it's also an acceptable solution.

Upvotes: 0

Views: 390

Answers (1)

Samwise
Samwise

Reputation: 71424

In theory you would be able to do this in a virtual stream (this is assuming that subFolder1 is a folder in the parent stream's Paths, not in the depot root) with a Remapped line:

Type: virtual
Paths:
    share subFolder1/...
Remapped:
    subFolder1/... ...

but there is currently a (long-standing) bug that doesn't allow Remapped to work when the target is the root; you can remap the root to a subfolder, or any subfolder to any other subfolder, but unfortunately if you try to remap a subfolder to the root as above you get the error:

View '/...' must be relative and not contain leading slashes

so this is not presently workable.

In a classic client view it's simple:

View:
    //depot/subFolder1/... //your-client/...

Upvotes: 2

Related Questions