Toolboxcategory cloud |
ViewsPersonal toolsVisual C++ 6 IntegrationFrom Seapine Labs
[edit] BackgroundThis example starts with a project that is not associated with a source code control application and has not been added to Surround SCM yet. Figure 1 shows the sample project in the project/workspace explorer in File View mode. As shown in the Figure 2, the project is saved in the \WorkDir\CPAPP\ folder. The D:\WorkDir\ directory is the root for all the working directories for this computer. It is not a working directory for a repository, as shown in Figure 3. [edit] Adding an Existing Project to Surround SCMTo add the project to Surround SCM, choose Project > Source Control > Add to Source Control. Surround SCM cannot establish an association because the project files have not been added to Surround SCM and the directory where the project is running from in Visual C++ (D:\WorkDir\CPAPP) is not set as a working directory in Surround SCM. You are prompted to establish this association, as shown in Figure 5. To establish an association between the project and Surround SCM, click the Fix button to create a repository for the project. The Repository Browser dialog box opens after you click the Fix button. Select the branch and repository you want to create the new repository in. In this example, shown in Figure 7, the repository for the project will be created on the mainline branch under the top-level repository. Click the Create Repository button after the branch and repository are selected. The Create Repository dialog box opens. By default, Surround SCM uses the project name for the repository and the directory that the project is running from as the working directory. Because this directory is not a child directory of the working directory for the parent repository (i.e., D:\WorkDir is not the working directory for the CremerSoft repository), the Inherit working directory from parent option is not selected. Next, Visual C++ prompts you to add files to Surround SCM. You should add all files to Surround SCM, unless there are specific files that should not be controlled via Surround SCM. At this point, the integration set up is pretty much finished. Surround SCM actions are available from the Project > Source Control menu and from the shortcut menu for each file. Figure 10 shows the Surround SCM actions available from both menus. Figure 10 also shows the status icons added to the files to reflect the status of the file in Surround SCM. The files now have a check mark next to them to reflect their checked out status. [edit] Accessing Surround SCM Actions from Visual C++ 6.0Most Surround SCM commands are available from the Project > Source Control menu and from each file’s shortcut menu. The main difference is that a command selected from a file’s shortcut menu performs the command on that file only. Selecting a command from the Project > Source Control menu performs the command on multiple files. The following instructions use commands selected from the Project > Source Control menu. If you use the shortcut menu, the dialog boxes may differ slightly. [edit] Adding files to Surround SCMWhen a new file is added to the project, it can also be added to the Surround SCM repository from the Visual C++ interface. Save the file in the working directory that corresponds to the repository where the file is to be added. The following instructions show how to set Visual C++ to automatically prompt the user to add a file to source control every time a file is added. To add files to Surround SCM through C++, select the file. Choose Project > Source Control > Add to Source Control. The Add Files to Surround SCM dialog box opens. Click the Advanced button to access additional add options.
[edit] Getting the latest file version(Note: The recursive check box is unavailable because it does not apply to check outs from the Visual C++ IDE.) To get the latest version of files, choose Project > Source Control > Get Latest Version. The Get Files from Surround SCM dialog box opens. Click the Advanced button to access the following options:
[edit] Checking out filesCheck files out from Visual C++ when they need to be modified. To check out files, select one or more files then choose Project > Source Control > Check Out. Click the Advanced button to access the following options: (Note: The recursive check box is unavailable because it does not apply to check outs from the Visual C++ IDE.)
[edit] Undoing check outIf a file is checked out and modified, but then a decision is made to not save the changes, the check out can be undone. To undo a check out, select the file then choose Project > Source Control > Undo Check Out. Like the other dialog boxes discussed in this article, the undo checkout dialog box includes advanced options.
[edit] Checking in filesChanges that are made to files need to be checked in to the Surround SCM Server periodically. Simply saving the files does not automatically check in the files. Checking in the files creates a new version of the files and gives other users access to the changes. To check in files from the Visual C++ IDE, select the files then choose Project > Source Control > Check In. Click the Advanced button to access the following options:
[edit] Refreshing file statusA query to the server to get the latest status of each file can be requested. For example, a file that is checked out from Surround SCM will not be marked as checked out in Visual C ++ until you refresh the status. To refresh the file status select the file, and choose Project > Source Control > Refresh Status. [edit] Viewing file differencesDifferences between the server copy and the working directory copy of a file can be viewed with the integrated diff/merge utility. To view the differences, select the file then choose Project > Source Control > Show Differences. The differences utility starts if differences are found between the two file versions. For information about the utility refer to the application’s documentation. [edit] Viewing file historyFile history provides a way to view a source file’s history and work with a historical file version. To view the history, select the file then choose Project > Source Control > Show History. The History dialog box includes a summary of historic version information. Please refer to the Surround SCM User Guide for more information. [edit] Possible IssuesThe following information is provided to help you troubleshoot common issues. [edit] Surround SCM in not available from the Source Control menuThere are several reasons why Surround SCM is not available from the Visual C++ Source Control menu.
[edit] Visual C++ is unable to establish an association with an unrelated branchWhen trying to add the project to source control, instead of getting the prompt to associate with a repository (Figure 5 above), you get a status message from Visual C++ that it was unable to establish an association between the directory where the project is running from and some other branch/repository. This can be confusing, especially if this branch or repository has no association with this project. This can occur if a .MySCMServerInfo file exists in the directory tree and it references this unrelated branch or repository. For example, in the project above, a .MySCMServerInfo file existed in the D:\WorkDir folder and referenced a different Surround SCM Server. After the .MySCMServerInfo file was deleted, the integration worked as expected. [edit] Guiffy Cannot be Loaded when Trying to View DifferencesWhen you view file differences from the Visual C++ IDE, an error message similar to the one in Figure 22 may open. To fix this, you need to edit the registry to allow for Guiffy to run as a separate process. The following key needs to be modified: HKEY_CURRENT_USER\Software\Seapine Software\Surround SCM\SCM Client The RunGuiffyAsSeparateProcess value must be set to true as shown in the Figure 23. [edit] Surround SCM files are not displayed correctly in Visual C++Files have been added to Surround SCM but the Surround SCM menu items are not enabled when the files are viewed from Visual C++. Check the following for possible causes and resolutions.
[edit] Files cannot be added to Surround SCM from Visual C++If files cannot be added to Surround SCM from Visual C++, check the following for possible causes and resolutions.
|
|


