Source code version control mechanism is one of the necessary management mechanisms in modern software development, usually with version control software
Source Code Management (SCM) Systems
or
Version Control Systems
to fulfill. The importance of version control in software development is as follows:
1) As the code warehouse valid management software development, the source code and documentation of each of the different versions of each of the spaces, which takes up small space and facilitates the acquisition of each version code and documentation.
2) Effective coordination of access to source code in the development team (different version control software takes different coordination strategies).
Common version of the control software has ClearCase, CVS, PVCS, and Microsoft's Visual SourceSafe (VSS). The following is a brief introduction to the most common Visual SourceSafe 6.0 developed by the Windows platform.
Operating environment
A typical environment developed by VSS developers under the Windows platform is based on C / S architectures, that is, each developer of the development team uses development tools (such as VC) development projects in their respective Windows platforms, which is equipped with specialized Server centralized the documentation and code during development. Servers and developers' clients are equipped with VSS server and client programs, respectively.
installation
VSS6.0 server installation
The first step, put the CD1 of Visual Studio6.0 into the CD-ROM, automatically enter the installer, select the second "Server Applications and Tools (Add Only);
Step 2, then select "Visua L Source Safe Server" in "Server Components", press the "install" button, put it in CD2 according to the prompt;
In the third step, according to the INSTALLATION WIZARD prompt, continue the installation process, select the installation path until you prompt you to restart to make the newly installed program take effect, restart your computer.
VSS6.0 client installation
After the VSS6.0 server is installed, you can install the client's software under the guidance of the VSS administrator. Since we are in a subnet of a Windows environment, each PC client can access the VSS server through an online neighbor. After the VSS administrator specifies the location of the installer "NetSetup.exe" of the VSS client software (within the VSS server installation directory), the user can find the program directly through the resource manager "Explorer" online neighbor, and double click Run it. NetSetup.exe entered the installation of the VSS client after startup, enter the username and workgroup name in the prompt box, select the VSS installation path, click the installation icon, enter the actual installation step, will be automatically completed by the system.
Instructions for use
The Lock-Modify-UNLOCK process is not a copy-modify-merge process (such as CVS), which will first modify the source code and document from the VSS server master backup file to Checkout. The source code and document on the lock server (except Multi - Checkout), after the modification is completed, checkout to simultaneously release the lock on the server on the server on the server. The server centrally controls all source programs and documents.
Concept involved in VSS
1) Project, the so-called project is a set of files in VSS (any type), which can be added, deleted, edited, and shared between the project or between items. A project has a lot of similarities with the folder of the operating system, but it better supports file merge, history and version control. All files exist in a VSS database project, the development group member cannot work on the server master backup file in the VSS (except for special cases such as check and version alignment) but VSS for each member in their respective work directories (Workfolder A copy is provided for work. Although a file can also be viewed without a working directory, if you want to work under VSS management, you must create a work directory. 2) Workfolder is where the user really debugs the project file. When the user checkout file, the VSS will copy the file to the user's working directory, when the user modifies the file and checks it, VSS will retrore it from the user's work directory to the VSS database. When the user make Checkout, VSS will automatically manage his work directory, such as creating the necessary subdirectory. And the working directory can be created or modified at any time.
3) Version tracking. VSS provides version control and historical services, and the old version programs and documents can be re-acquired to perform bug tracking or other purposes. The VSS is used to record the file when the file is CHECKOUT or when it is modified, it mainly has three ways to track files and project versions:
Version number: This is the internal digital data maintained by VSS, and the user has no control over it. Each version of each file and project has a version number, which is always an integer and increment.
Label: These are a string of a versions assigned to a project or file, which can be a string that does not exceed 31 characters in any format. Recommended Use.
Date / Timestamp: It gives a file that is finally modified, or when a file is checkin. VSS supports 12 hours and 24 hours of time format.
VSS6.0 server configuration and management
After the VSS6.0 server is installed, you can perform configuration and management of the VSS server for the development project, which must be done by the VSS administrator.
The first step is to create a VSS database throughout the project (when the VSS server is installed, a default database Common is created, launching Visual SourceSafe6.0 Admin (Start / Programs / Microsoft Visual Studio6.0 / Microsoft Visual SourceSafe / Visual Sou rrenceafe6.0 admin Create a job.
Step 2, create a user for the newly created database (such as myApp), first need to open the database, click the drop-down menu UserS / Open SourceSafe Database ..., then select the database myApp and open. Select Menu Item Add User ..., enter your username and password. Then create another user in turn. There are two ways to set different access rights for different user folders for different users: 1) Use the functions provided by VSS. Select the ENABLE Project Security checkbox of the Porject Security property page in the Tools / Options ... dialog and select Tools / Rights by Project ... or Tools / Rights Assignments for User ... for settings; 2) Use the Windows operating system's CACLS command. The third step is created in the newly built database. Start Microsoft Visual SourceSafe6.0 (Start / Programs / Microsoft Visual Studio6.0 / Microsoft Visual SourceSafe / Microsoft Visual SourceSafe6.0), a dialog window appears, click on the File drop-down menu in the Open SourceSafe Database ..., out of the dialog box, select a Database (e.g., myApp), double-click it or press the OPEN button to open the database; a project Project is a set of related documents or a set of files, and VSS allows you to store and organize your project in any hierarchy. In the VSS database, you can create one or more items. Create a project, such as MyProject; after you create a project MyProject; create a file in MyProject, click the add files command, you will jump out of the dialog box, select the corresponding file or directory, Click the Add button to add them to myProject.
The configuration of this VSS server is basically completed, creates a database and project, and has established a corresponding user so that the user can log in directly to the VSS server directly to the VSS control management. jobs.
Note: The directory structure of the server main backup file should be determined before the project development and the consent of all developers. In the actual use, if the server master backup file directory structure is unreasonable or requires temporary increase to delete some files, the VSS administrator has a responsible set in handling.
VSS6.0 client use
The VSS client use steps will be described below with specific examples of laboratory data warehouse projects.
The first step is logged in to the VSS server. Start Microsoft Visual SourceSafe6.0 Client (Start / Program / Microsoft Visual Studio6.0 / Microsoft Visual SourceSafe / Microsoft Visual SourceSafe6.0), the following login window appears;
Click the Browse ... button and the following dialog box appears;
Click the Browse ... button, select the directory shown below (shared directory on the DBGroup server, such as prompting to enter the DBGROUP server account password, fill in VSS / VSS, respectively;
Click Open button and click OK and Open on the two dialogs that will appear;
Return to the login dialog;
Enter the username and password specified by the administrator, log in to the VSS server. Note: Different users and password settings have different access rights to different directories (Project).
Step 2, if you are logged in to the VSS server for the first time, you need to set the working directory first, otherwise the Checkout operation cannot be performed.
The settings of the working directory are shown below, select the folder of your own related modules, click Right-click, select SET WORKING FOLDER ...
Select your own work directory and click OK in the pop-up dialog box;
Note: After the working directory setting is complete, the file Checkout on the server is placed in the working directory, so the working directory on the local machine should receive the protection that cannot be removed casually.
In the third step, checkout files are in the local working directory. Select the relevant folder, right click and select Check Out ...
The system pops up the Checkout dialog box as follows, click OK after all files and subfolders, checkout to the local working directory, while the files on the server are locked red, other users can no checkout (the server setting is not allowed) Multicheckout).
Note: Be sure to select the Recursive checkbox to ensure that all subfolders are checkout.
The fourth step is to modify the files in the local working directory.
Step 5, the files in the working directory will checkin. If the modified file Checkin is not reflected in the primary backup of the file on the server in the fourth step, it is very likely that the local file is overwritten by the old version of the file after the next Checkout. In the VSS client window, you want to checkin folder check to check in ..., pop up the checkin dialog box, click the file in the OK check in the local working directory Checkin to the server on the server to unlock the lock (black) .
Note: Be sure to select the Recursive checkbox to ensure that all subfolders are checkedin.
Recommendation 1
During actual use, developers or administrators are responsible for performing corresponding Label for source programs and documents on the server, to facilitate the management of the source program and document history. VSS can easily get various historical versions according to Label (with other ways to get historical version, this paper recommends using the label method).
Add Label. Select the directory where you want to add a Label, click Right-click Label ...
Set the Label name and related Comment in the Label dialog, as shown below;
If you want to get a historical version, select the appropriate directory (Project) and select Show History ..., select the appropriate check box as shown below and click OK;
The VSS pops up the following dialog box, which lists the Label made by all administrators, select the corresponding Label, and then click the Get button to do the corresponding version of Label will checkout to the local working directory. See the use of other buttons;
Recommendation 2
Developers do not pay freely to change the Directory structure on the VSS server, do not add files in the directory (Project), don't just access others directory (Project) and files. If the server on the server (Project) structure does require changes, please contact the administrator.
Recommendation 3