VSS is used as source code backup all the time. Today, the VSS-server on the server is accidentally damaged, causing the server to be unable to get up. It is really anxious. The source code of 8 GB cannot be seen. once lost, I still don't know what the consequences will be. First, I backed up the original data and re-installed the client. I found that the data was actually very fragile, I wonder whether there is a good source code backup tool. I can see the code structure directly in the background. I will repost an article to explain VSS.
After having a comprehensive understanding of the working principle, functions, and new features of VSS 6.0, we start to enter this section, that is, how to use VSS 6.0 to solve version management and control problems in software development projects, and how to effectively construct a system solution.
First, let's take a look at the actual situation of our development team. The most common situation is that the whole project uses a microcomputer environment, each developer uses Microsoft Vc, VB, and vj to develop sub-projects or sub-modules under their respective Windows computers, generally, this group is part of a LAN or a relatively independent subnet, and may be equipped with dedicated servers. Such a development environment is very advantageous and intuitive for implementing version control and management using VSS 6.0, because VSS 6.0 also requires this network environment.
Secondly, for the project itself, after a project is analyzed and designed, it is generally divided into several sub-projects, and several development teams are responsible for coding and debugging respectively, however, the actual situation of software development determines that different groups are not completely independent. In many cases, they need to coordinate interaction and information feedback, each step in the development process may lead to correction of the previous phase of work, because software development is a spiral process to a large extent, not to mention mutual communication within the group. In this process of continuous interaction changes, we can imagine the number of stages, versions, and complete versions of the project that may be formed, in the past, the Common Manual version management method was no longer competent. In addition, a very important aspect cannot be ignored, which is especially evident in the development of system software, that is, the software hierarchy. The general practice is to develop applications for multiple applications on top of common system software. In contrast, project development groups are generally divided into system development groups and application development groups, during the development and use of application software, numerous problems of the application itself and system software will be reported. If you only modify and update the system software version for each application, this will inevitably lead to the inconsistency of multiple system versions, which makes it impossible to truly solve the problems existing in the system. VSS 6.0 is suitable for the development architecture of such software. It can create its own projects for each group, and these projects belong to a general project, all modifications will be summarized to form a unified latest version.
For the most common software development environment and organizational structure, it is very effective and costly to use VSS 6.0 for version control management:
Install the VSS 98/95 server software on a Windows NT Server or a relatively independent Windows 6.0 PC, and create a database for storing the entire project, then, create various projects and sub-projects in the database, and the VSS administrator creates an account and their permissions for each member of the group.
Install the VSS client software on the PC of other members of the development team and create their own working directory. In this way, during the software development process, they only need to log on to the VSS server through the client software and checkout the project or file currently to work, if any modification is made, submit the checkin to the VSS server at the end of the work for unified updates.
Solution 1.
Figure 1
Install the VSS 6.0 server
After providing the entire solution, let's take a look at how to install the VSS server. VSS 6.0 is a member of Microsoft Visual Studio 6.0 suite. This version is used as an example.
Step 1, place CD1 of Visual Studio 6.0 in the CD-ROM, automatically enter the installer, and select the second item "server applications and tools (add only)", 2;
Figure 2
Step 2: In "server setups", select "visual source safe server" in "server components", click "Install", and add "CD2" as prompted, as shown in 3;
Figure 3
Step 3: Follow the prompts in Installation Wizard to continue the installation process. Select the installation path and click the button in the upper-left corner of Figure 4 to continue the installation, wait until you are prompted to restart to make the newly installed program take effect and restart the computer.
Figure 4
The installation of the VSS 6.0 server is relatively simple. It can be either installed in Windows NT or Windows 9X.
Install the VSS 6.0 Client
After the VSS 6.0 server is installed, you can install the client software under the guidance of the VSS administrator. Because we are in a Windows environment subnet, each PC client can access the VSS server through a network neighbor. After the VSS administrator instructs the user about the location of the vssclient software installer “netsetup.exe, the user can find the program in the network neighbor through the resource manager "Explorer" and double-click it to run it, as shown in Figure 5.
Figure 5
After netsetup.exe is started, install the VSS client. In the following prompt box, enter the user name and workgroup name, as shown in figure 6.
Figure 6
Select the installation path of VSS and click the installation icon in Figure 7 to go to the actual installation step. The system will automatically complete the subsequent work.
Figure 7
When the system prompts you that VSS has been successfully installed, all the installation work has been completed.
Vss6.0 server configuration and management
After the VSS 6.0 server is installed, you can configure and manage the VSS server for the development project, which must be completed by the VSS administrator.
First, create a VSS database for the entire project (when the VSS server is installed, the system has created a default database common ), start visual sourcesafe 6.0 admin (start/programs/Microsoft Visual Studio 6.0/Microsoft Visual sourcesafe/visual sourcesafe 6.0 admin). In the displayed window, click Create Database in tools... menu item. In the displayed window, select the path of the new database, for example, create a MyApp database, and click OK. The system will complete the creation.
Figure 8
Figure 9
Step 2: create a user for the newly created database (such as MyApp). First, open the database and click users/Open sourcesafe database in the drop-down menu ..., select the database MyApp and open it, as shown in figure 10. Select the menu item Add User... and enter the user name and password, as shown in Figure 11. Create other users in sequence.
Figure 10
Figure 11
Step 3: Create a project in the new database. Start Microsoft Visual sourcesafe 6.0 (start/programs/Microsoft Visual Studio 6.0/Microsoft Visual sourcesafe 6.0), and a window of 12 appears, click Open sourcesafe database... in the drop-down menu file ..., in the dialog box 13, select a database (for example, MyApp), double-click it, or press the OPEN button to open the database. A project is a set of related documents or a collection of files, VSS allows you to store and organize your projects in any hierarchy. In the VSS database, you can create one or more projects. Click the Create Project command in the File menu ..., create a project, for example, myproject, 14. After creating a project myproject, you need to add a file to myproject. Click the add files command in file. In the displayed dialog box, select a file or directory, click Add to add them to myproject, as shown in Figure 15.
Figure 12
Figure 13
Figure 14
Figure 15
The configuration of the VSS server has basically been completed. Databases and projects have been created and corresponding users have been created for them, in this way, you can directly log on to the VSS server in the integrated development environment such as the client VC for development under the VSS Control Management.
Use source code control in the client VC
When the installation and configuration of the VSS server are complete and the VSS installation is completed on the client, you can enable VSS to manage and control the source code and document version management of the entire development team. In this section, we take the widely used VC ++ 6.0 as an example to illustrate how to use VSS on the client to achieve that all development work is under the effective control and management of VSS.
Start Microsoft Visual C ++ 6.0. In the integrated development environment of VC, click the open workspace command in the File menu, as shown in dialog 16, there is a significant difference from VC that does not install the VSS client software: an "open a project from source code control source control" item is added at the bottom of the dialog box ".
Figure 16
Click the source control button. The logon dialog box 17 is displayed. Enter your username and password and click the Browse... button to select the database you want to log on. Select a project and enter its local working directory in the development area. The VSS server copies the source code under the working directory for development, debugging, and modification, as shown in Figure 18. Similar to local development, move the mouse to the border of the VC window, right-click and select Source Control. The source control toolbar appears, as shown in Figure 19. Select the corresponding button in the source control toolbar to obtain the latest version of a project file, add a new file to the VSS database, and submit the modified file checkin to the VSS database, view the historical information of a project file, compare files of different versions and projects, and share a project or file. Is this easy ?!
Figure 17
Figure 18
Figure 19