Perforce: create a project targeting different paths

Hello,

I would like to create a project, setting Perforce as a VCS. In the 'Workspace mapping' I would like to specify different paths. For instance, //depot/path1/project1 and //depot/path2/project2. I want the Upsource project to aggregate the commits of these 2 paths. Is it possible?

Thanks

3 comments
Comment actions Permalink

Hi Martin,

Here's what needs to be done **to configure an Upsource project that consists of two repositories**:

1. [Create project](creating_projects.html) for one of the repositories that are included in your multi-repository setup. Let's refer to it as _project1_.
2. Stop Upsource
3. Locate file `settings.json` in directory `<upsource_home>\data\vcs-settings\<name_of_project1>`.
4. Modify `settings.json` so that _project1_ is mounted to the root while the second repository in your configuration, _project2_, is mounted into the `/project2` path of the virtual snapshot:

   ```json
{
    "mappings" : [{
        "id" : "project1",
        "vcs" : "git",
        "url" : "git://.../project"
    }, {
        "id" : "project2",
        "vcs" : "git",
        "url" : "git://..../project2",
        "mapping" : "project2"
    },
    ......]
}
   ```
5. Start Upsource

Please let me know if it helps.

0
Comment actions Permalink

Interesting... ;\

How would such a setup handle identically-named branches in the different repositories?

0
Comment actions Permalink

Preety simple :)  For e.g. you have two repositories: repo1 and repo2, both repositories have identically-named features called Newfeature. Upsource will show you Newfeature from repo1 as "Newfeature#repo1 branch" and "Newfeature#repo2 branch" from the second.

0

Please sign in to leave a comment.