Toolboxcategory cloud |
ViewsPersonal toolsSSCM Auto ShareFrom Seapine LabsIt is easy in Surround SCM to share a file from one branch to another, this can be done in one line command inside a trigger. It is much more difficult to create a share from one repository to another repository in the same branch. The difficulty comes in determining the share to repository location. While the repository paths are identical when sharing between two branches, they are different when sharing between two repositories in the same branch. This script auto shares files based on input that determines the ShareFrom location and the ShareTo location starting at the repository root (project root) that you want to share.
[edit] InstallationUnzip SSCMAutoShare to a directory on the Surround SCM Server side where you want to run the application. [edit] RunningIt is much easier to run SSCMAutoShare using a batch file. An example .bat is included in the binary download link. I recommend using this .bat for the trigger. In the batch file specify the location of the SSCMAutoShare.exe (full path), your Surround SCM username and password, and the Surround SCM Server address and port. The %1 and %2 input values represent the Original repository location and the Share To repository locations, which will be specified in the Surround SCM trigger description. In Surround SCM, create a trigger with the desired settings such as Branch to monitor, and actions to look for (e.g., 'when File is Created'). On the Actions tab, add a new execute action. Enter the path to the batch file, the original repository location, and the share to repository location. The path will be similar to the following example: C:\SSCMAutoShare.bat Mainline/Project1/Common /Mainline/Project2/Common This script works recursively. In the previous example, any file added to Common or any sub-directory of Common will be shared from Project1 to Project2. New repositories are automatically created. You may want to modify Logger.cs to specify an alternate location for the SCMLog.txt log file. The default log file location is in the Surround SCM installation directory. The script works well for even large number of files, including a large number of new sub-directories. You can specify any two repository locations with no restrictions on how deep of a repository you select for either the original or share to repository. [edit] Downloads[edit] Known Issues
|
|


