Integrating Visual FoxPro 8.
0 and Surround SCM 1
Integrating Visual FoxPro 8.0 and Surround SCM
Most Surround SCM commands can be accessed from Microsoft ® Visual FoxPro 8 ®.
Tip: The Surround SCM User Guide includes more detailed information about Surround SCM
and its features.
Installing the Visual FoxPro plug-in
The Visual FoxPro plug-in is installed by default as part of the standard Surround SCM installation
process.
Note: Make sure you stop Visual FoxPro before you install the plug-in.
1 Run the Surround SCM installation program.
2 Select Make Surround SCM my default SCM provider when you are prompted to select Surround SCM
integration options.
3 Finish the installation.
You are now ready to begin using Visual FoxPro with Surround SCM.
2 Enabling source control
Enabling source control
After you install the Surround SCM plug-in you need to set it as the active source control provider.
1 Choose Tools > Options.
The Options dialog box opens.
2 Click the Projects tab.
3 In the Source control options area, select Surround SCM SCCI from the Active source control provider list.
You can also set default SCC options. Refer to the Visual FoxPro documentation for information.
4 Click OK to save the settings.
Putting projects under Surround SCM control
You need to add projects to Surround SCM before you can access source control commands.
1 Open the Visual FoxPro project.
2 Choose Project > Add Project to Source Control.
The Surround SCM Login dialog box opens.
Adding files to source control 3
3 Select a server, enter your username and password, and click Connect.
The Surround SCM Repository Browser opens.
4 Select the Branch and Repository you want to point the project to.
Click Create Repository to create a new repository for the project.
5 Click OK.
You may be prompted to set the working directory for the selected repository. Click OK to save the
working directory. If you click Cancel the Surround SCM integration may not work correctly.
Adding files to source control
You can add files to Surround SCM through Visual FoxPro.
1 Open the FoxPro project that contains the files you want to add.
2 Choose Project > Source Control > Add Files to Source Control.
The Add Files to Source Control dialog box opens.
4 Getting the latest file version
3 Clear the check box if you do not want to add a file to source control.
4 Click Advanced to select additional add options.
The Advanced Add Options dialog box opens.
5 Select any advanced options and click OK.
Select Get files after add to create a read-only copy of the files in your working directory.
Select Make files writable to get the files in read-write mode.
Select Exclusive check out to prevent other users from checking out the files.
Select Restore file if found removed to overwrite removed files.
Select a File type.
6 Click OK to add the files.
Getting the latest file version
You can automatically get the latest revision of selected files.
1 In the Project Manager, select the files you want to get.
2 Choose Project > Source Control > Get Latest Version.
The Get Latest Version of Files dialog box opens.
Checking out files 5
3 Click Advanced to select additional get options.
The Advanced Get Options dialog box opens.
4 Select any advanced options and click OK.
Select Make files writable to get the files in read-write mode.
Select Force file retrieval from the server to get the server copy of the files.
Select a File timestamp option. This is the timestamp used when files are retrieved from the server.
Select a Writable files option. This option specifies what happens if a writable file is found.
5 Click OK to get the files.
Checking out files
Check out files when you want to modify the files.
1 In the Project Manager, select the files you want to check out.
2 Choose Project > Source Control > Check Out.
The Check Out Files dialog box opens.
6 Undoing check out
3 Click Advanced to select additional check out options.
The Advanced Check Out Options dialog box opens.
4 Select any advanced options and click OK.
Select Exclusive check out to prevent other users from checking out the files or repository.
Select Force file retrieval from server to check out the server copy of the files.
Select a File timestamp option. This is the timestamp used when files are retrieved from the server.
Select a Writable files option. This option specifies what to do if a writable file is found.
5 Click OK to check out the files.
Undoing check out
If you check out and modify a file then decide you do not want to save the changes, you can undo the
check out. This discards any changes made to the file and checks it back into the server.
1 In the Project Manager, select the files you want to undo the check out for.
2 Choose Project > Source Control > Undo Check Out.
The Undo Checkout dialog box opens.
3 Click Advanced to select advanced undo options.
The Advanced Undo Check Out Options dialog box opens.
Checking in files 7
4 Select any advanced options and click OK.
Select a File overwrite option to specify what happens if a writable file exists in the working directory.
5 Click OK to undo the check out.
Checking in files
Check in files when you finish making changes.
1 In the Project Manager, select the files you want to check in.
2 Choose Project > Source Control > Check In.
The Check In Files dialog box opens.
3 Click Advanced to select advanced check in options.
The Advanced Check in Options dialog box opens.
4 Select any advanced options and click OK.
Select Get file after check in to get a copy of the file after it is checked in.
Select Make files writable to leave a read-write copy of the file in the working directory.
Select Prompt for TestTrack integration to link the file with a TestTrack Pro defect.
Select Force check in without merge to check in a file without merging changes. The file becomes the
new version even if another user made changes and checked in the file after you checked it out.
8 Refreshing file status
Select Allow check in if no changes made to allow files that were not modified to be checked in.The
version number increments by one.
Enter an optional Label. Labels provide a way to mark a specific version of a file or repository.
5 Click OK to check in the files.
Refreshing file status
You can query the server to get the latest status of each file. For example, if you check out a file from the
Surround SCM client it will not be marked as checked out in Visual FoxPro until you refresh the status.
1 In the Project Manager, select the files you want to refresh.
2 Choose Project > Source Control > Refresh.
The file status is refreshed.
Viewing file differences
You can view differences between the server copy and the working directory copy of a file.
1 In the Project Manager, select the file you want to view differences for.
2 Choose Project > Source Control > Differences.
The differences utility launches if differences are detected.
Viewing file history
File history provides a way to view a source file’s history and work with a historical file version.
1 In the Project Manager, select the file you want to view the history for.
2 Choose Project > Source Control > Show History.
The History dialog box opens. This dialog box includes a summary of historic version information.
Note: You can also view the history for an entire project. Choose Project > Source Control
> Show Project List History.
Viewing file properties 9
Viewing file properties
File properties include general and check out information about the selected file.
1 In the Project Manager, select the file you want to view the history for.
2 Choose Project > Source Control > Source Control Properties.
The Properties dialog box opens.
Note: You can also view the history for an entire project. Choose Project > Source Control
> Project Properties.
Updating the project list
Make sure you update the project list after you add files to make the files available to other developers.
1 Choose Project > Source Control > Update Project List.
You are prompted to get the latest versions of all files.
2 Follow the instructions to continue updating the project list.
Note: All team members must update their project list to have access to the files you add.
Detaching a project from source control
Detach a project from source control if you do not need to control the files. The files are not removed
from the project, allowing other team members to continue working with them.
1 Check in all files in the project you want to detach.
2 Choose Project > Detach Project from Source Control.
The project is detached and no longer under source control.
Removing files
You can remove files from a source-controlled project.
1 In the Project Manager, select the file you want to remove.
10 Removing files
2 Choose Project > Source Control > Remove Files from Source Control.
The Remove Files from Source Control dialog box opens.
3 Click OK.
The file is removed from source control
Note: Click Advanced if you want to destroy the file and remove it from Surround SCM.
When a file is destroyed, any record of its existence is also deleted.
Troubleshooting Visual FoxPro and Surround SCM 11
integration
Troubleshooting Visual FoxPro and Surround SCM integration
This section can help you troubleshoot more common integration problems.
Surround SCM is not displayed as an active SCM provider
If Surround SCM is not available from the Source Control menu it is not configured as the active SCM
provider. Please check the following for possible causes and resolutions.
The Surround SCM plug-in is not installed
For more information see Installing the Visual FoxPro plug-in, page 1.
Surround SCM is not configured as the active SCM provider
Open a registry editor utility such as regedit.
Go to HKEY_LOCAL_MACHINE/SOFTWARE/SourceCodeControlProvider key. Note the value of the
ProviderRegKey string. For example, Software\Seapine Software\Surround SCM\Scci.
Go to HKEY_LOCAL_MACHINE/<value of ProviderRegKey string>.
Verify the value of the SCCServerName is Surround SCM.
Verify the value of the SCCServerPath is C:\Program Files\Seapine\Surround SCM\Surround
SCM SCCI.dll for default installation. If you installed Surround SCM in another directory, make
sure the correct path is entered.
Surround SCM files are not displayed correctly in Visual FoxPro
You added files to Surround SCM but the Surround SCM menu items are not enabled when the files are
viewed from Visual FoxPro. Please check the following for possible causes and resolutions.
The Visual FoxPro project is configured incorrectly
You need to reconfigure the branch/repository associations. Detach the project from source control
then re-add it to Surround SCM. See Detaching a project from source control, page 9 and Putting projects
under Surround SCM control, page 2 for more information.
The Branch/Repository points to an invalid working directory
Make sure the working directory for the repository associated with the project points to the same
local directory as the project. You may experience integration problems if you set up the working
directory to point to a different location.
12 Troubleshooting Visual FoxPro and Surround
SCM integration
The local .MySCMServerInfo file is out of sync
Visual FoxPro cannot determine where Surround SCM files are located if the .MySCMServerInfo file
is out of sync. Go to the directory where the Surround SCM files are located and open the
.MySCMServerInfo file with Notepad. Make sure it points to the correct branch/repository. If it does
not, delete the file and refresh it from Visual FoxPro to regenerate it with the proper data.
Files cannot be added to Surround SCM from Visual FoxPro
You cannot add files to Surround SCM from Visual FoxPro. Please check the following for possible
causes and resolutions.
Check the SCM output to view error messages
The Command window displays messages as Surround SCM actions are performed. Check this
window for error messages that occur when you try to add files.
The Visual FoxPro project is configured incorrectly
Make sure the project points to a Surround SCM Branch/Repository that exists on the Surround SCM
server you are connecting to. To check this information, open the Visual FoxPro source control file,
MSSCCPRJ.SCC, in Notepad and check the “SCC_Project_Name” and “SCC_Aux_Path” values. The
format for ProjectName is <branch>:<repository>. The format for AuxPath is <server
ip>:<server port>.
The Visual FoxPro project points to the wrong Surround SCM branch
This can occur if you maintain the Visual FoxPro source control file (MSSCCPRJ.SCC)in Surround
SCM then branch the repository that contains the files. After the repository is branched the local
.MySCMServerInfo file still points to the old branch, which is where the files are being added. You
need to re-configure Visual FoxPro to point to the correct branch then add the files to Surround SCM.
To make these changes open the Visual FoxPro source control file, MSSCCPRJ.SCC, in Notepad and
check the “SCC_Project_Name” and “SCC_Aux_Path” values. The format for ProjectName is
<branch>:<repository>. The format for AuxPath is <server ip>:<server port>.