Putting a VPME Project Under Source Control

Putting a VPM Enterprise project under source control is normally a task performed by the Visual SourceSafe Administrator using the computer on which the project was created. If you are a single developer, not working in a multi-developer environment, you would use your own computer to put the projects you create under source control.

DATA Files in Team Development

Tip: When you put a project under source control, you should not put the data files in the project's \DATA folder under source control.

However, if the project will be developed in a team environment, you do need to create one \DATA folder on a network server that is shared by all developers on the team.

When you put a VPM Enterprise project under source control in a multi-developer environment, each developer will wind up with a copy of the source-controlled project files on the developer's computer, but the developer will access data files from the shared \DATA folder. Each developer will have a copy of the project’s home folder and the folders for forms, menus, programs and reports, but not the folder for data. 

To put either (a) a new VPM Enterprise project or (b) an existing VPM Enterprise project under source control, follow the steps below.

Tip: If your VPM Enterprise project includes files located outside the project and VPM Enterprise directories, see How to Handle Project Files Outside the Project Directories before continuing with this section.

Ř To put a VPME project under source control

1.   Run VPM Enterprise.

2.   Existing Project: If putting an existing project under source control, open that project. 

Tip: If working in a team development environment, you may want to move the project’s \DATA folder to a network server so that the other developers that are going to be working on the project can easily access and share the project’s data files. Keep in mind that if the DATA folder is located on the original developer’s PC, that PC will have to be up and running for anyone else to work on the project.

Tip: You can move the \DATA folder of a project through the Directories option on the VPME Options menu.

3.   New Project: If creating a new project, simply create a new project as you would any other project in VPM Enterprise. 

Tip: You may want to create the project’s \DATA folder on a network server so that other developers that are going to be working on the project can easily access and share the project’s data files. Keep in mind that if the DATA folder is located on the original developer’s PC, that PC will have to be up and running for anyone else to work on the project.

Tip: You can specify where a new project’s DATA folder is created through the New Project Directories form that is brought up by clicking the Directories button on the VPME New Project form.

4.   Open the Visual FoxPro Project Manager from the VPME Tools menu.

5.   Select the Add Project to Source Control option on the Project menu.

6.   On the Visual SourceSafe Login dialog, enter your VSS Username, Password, and the name of the VSS database that will contain the project. Click the OK button. Visual SourceSafe displays the Add to SourceSafe Project dialog.

Tip: If working in a team development environment, the Visual SourceSafe database will be located on the Visual SourceSafe database server computer.

7.   On the Add to SourceSafe Project dialog, enter a name for the project and select where under the $/ folder you should add the project.

Tip: Extremely Important – Rule for Determining Where to Put a Project in the VSS Folder Tree: The project folder structure in the VSS folder tree must match the directory structure of the VPME project files on your computer. When you add a VPME project to source control, you must cause the project's VSS folder to be created in the same relative position to the VPME91 project folder as the project's directory bears to the VPME91 directory on your computer.

For example, the VPME Sample Application project home directory is a subdirectory of the VPME91 home directory. Therefore, if you were adding the VPME Sample Application to source control, you would select the VPME91 folder on the Add to SourceSafe Project dialog so that the VPME Sample Application VSS project would be created as a subproject of the VPME project folder.

Similarly, if you were adding a VPME project to source control whose project home directory was on the same directory level as the VPME 6 home directory – that is, directly off your computer's root directory, you would select the $/ folder on the Add to SourceSafe Project dialog so that the project's VSS project would be created on the same folder level as the VPME project folder.

8.   After you are sure that your project will be created in VSS on the correct folder level in relation to the VPME 6 folder, click the Create button to create the project. Click OK. Visual SourceSafe displays the Add Project to Microsoft Visual SourceSafe dialog.

9.   On the Add Project to Microsoft Visual SourceSafe dialog, enter a comment if desired and click OK. Visual SourceSafe displays the Add Files to Source Control dialog.

10. On the Add Files to Source Control dialog, you will see that all the files in the Project Manager are selected to be added to source control.

Tip: The table S<Prefix>FCT1 should not be put under source control, and therefore, you should unselect, or uncheck, it in the list.

Normally, all the other files in the Project Manager should be put under source control. If for some reason there are files you do not want under source control, unselect those files. Click the OK button.

Tip: Do not put the Object Builder menus located in a project's \Menus directory under source control. The Object Builder menus are the menus with names ending in "0" (zero). They are not included in the Project Manager.

11. For any files that may already be under source control, a dialog is brought up displaying the message “File <file name> is already under source control. Delete the local copy and get the latest version?” Click the Yes button for each occurrence of this dialog.

12. Click the Yes button on the dialog that displays the message “Do you want to update the project list?”.

13. On the Update Project List dialog, enter a comment if desired and click the OK button.

14. Close the Visual FoxPro Project Manager.

15. On the VPM Enterprise application toolbar, click the Source Control Kit Functionality button (the last button on the right) to turn on the ProMatrix Source Control Kit functionality for the project. When the ProMatrix Source Control Kit functionality is on, the Source Control Kit Functionality button displays a green circle.

Your project is now under source control, but to make sure that everything is set up correctly, perform the checks described in the tips below.

Tip 1 – Check Project Manager: Open the project in VPME. Open the VFP Project Manager from the VPME Tools menu. Check that the files in the Project Manager have a little padlock in front of them indicating that they are under source control. Be sure that the VPME files display the padlock.

Tip 2 – Check Read-Only File Status: If your files were put under source control successfully, the Read-only attribute should be selected when you display the file properties in Windows Explorer. Using Windows Explorer, check the Read-only attribute of some of the files you put under source control in your \VPME91, \BITMAPS and \PRGS directories and in your project directories. In Windows Explorer select a file and right click on it to display a shortcut menu. Select Properties on the shortcut menu. The attributes are at the bottom of the first page on the Properties dialog.

More:

How to Handle Project Files Outside the Project Directories