Consider the following scenario:
A company creates two baseline branches for separate web applications in their mainline branch. There are three baseline branches, which correspond with production, testing, and development, under each baseline branch. In addition, the Production, Testing, and Development baseline branches are accessible as web sites on separate web servers.
Repositories and working directories serve different purposes in Surround SCM. A repository is part of the Surround SCM database, which is managed by the Surround SCM Server. A repository often reflects the directory structure of a project. Repositories are used to organize Surround SCM by grouping together files and subrepositories. You may want to answer the following questions before you start creating repositories:
- What guidelines should be used when creating repositories?
- Should a new repository be created for each product, each component, etc?
- Who can create Surround SCM repositories?
- Who can access advanced Surround SCM repository commands such as promoting or rebasing repositories, configuring repository security, etc?
- Who is responsible for maintaining repositories?
A working directory is simply the local space on your hard drive that a repository is mapped to. The working directory generally mirrors the repository structure. A working directory must be set before you can work with files. The working directory is generally mapped to a local drive directory. It can also be mapped to a different location such as a network drive.
The default behavior for setting a working directory is to have all child repositories inherit the parent repository’s working directory. For example, your repository structure is: MyProj/src/lib/common
You set the working directory for the MyProj repository to C:\MyProj.The resulting working directory for the common repository will be C:\MyProj\src\lib\common
In this scenario, repositories and working directories both need to be created. The team lead for each product can create repositories in each baseline branch to help organize code files, while developers create working directories when they want to work with files in the repositories.