I’m trying to create a branch spec that only pulls down specific folders from a repository, but preserves the directory structure.
For instance, in the repo the project looks like this:
project
->1.0
->Common
->ProjectSpecific
->Project1
.Project specific files
->Project2
.Project specific files
->2.0
.
.
.
->_env
.
.
.
->c
.
.
.
->setup
.
.
.
.general project files
What I’m trying to do is create a branch for each project that pulls down all folders, except in the 1.0/Project sub directory, it should only pull down the Project folder specific to that folder. I’m guessing this isn’t possible purely with a branch spec (I’ve tried and always end up with everything in the same directory or other problems). I’ve tried creating a seperate codeline with a client view, mapping every directory under project, and beign sure to only map the Project specific folder, but it didn’t work, and I’d really like to avoid having to create a new codeline for every project.
Is their a way to do this from a branch spec? Alternatively, is there a way to blacklist folders? Then I could simply map the whole project directory and just blacklist the projects I’m not interested in. Any help would be appreciated. If I’m not being clear, let me know and I’ll add more detail.
Thanks
You can blacklist folders by adding a minus to the beginning of the line for the mapping in the branch spec.
See the Perforce documentation on Views for the gory details.