For configuration of streams in Perforce, there exist five access types (according to documentation, in order more-to-less-inclusive): share
, isolate
, import
/import+
, exclude
. They are placed in the configuration line-by-line, like so:
share folder1/...
isolate folder2/...
Is it possible to override the access to a subfolder? Like so:
share folder/...
isolate folder/subfolder1/...
In the way that, folder/subfolder1/...
will be isolate
-d, but folder/subfolder2/...
and all others will be share
-d? It seems like a lot of manual work to include all separate subfolders otherwise, especially if they are added as development progresses.
If this works, what are the rules? Do later lines override earlier lines?
Or do more restrictive access lines override less restrictive ones (i.e. can share
parent folder, isolate
child folder, but not other way around)? E.g. is something like
exclude folder/...
share folder/subfolder1/...
also possible?
Let's try it out. If I change my stream Paths to:
here's what I get when I try to merge a path that's inside the isolated folder and outside it:
which tells me that, indeed,
subfolder1
isisolate
d correctly. The "no target files in branch view" error tells me that the path is excluded from the branch view (which is the function ofisolate
), whereas "no such file(s)" lets me know that the only reason there's nothing to merge is that I didn't bother to actually add any files there.Let's try the other example and see how that works. After changing my Paths to:
I can do a similar experiment with
p4 sync
:and that also works as I'd expect (basically the same way classic client views work) -- the later and more specific line overrides the earlier and more general line, so
subfolder1
isshare
d whilesubfolder2
isexclude
d.