Version Manager VisualSourceSafe6.0 Practical Guide
(2002-11-15 17:47:51)
I. Necessity of version management If the software crisis in the 1970s has led to the birth and theoretical system of software engineering ideas, the rapid development of software industry in the 1980s and 1990s has led to another new idea. And implementation, this is the version management of the software. As long as you participate in the software development, it is clear that the current software project is completely unimaginable and impossible, usually there is a R & D team to analyze, design, encode, and maintain, and have special tests The panel fully tests the software that has completed the encoded debugging. In this huge and complicated process in software development, people involving all aspects, information exchange feedback is more than just between members of the R & D team and each R & D team, but also between customers and R & D. All of these AC feedback information may result in modifications to software, small may be just a change in definition of a variable in a source file, which may even have a change in demand analysis. In this project, due to the intrinsic features inherent, many software versions may be formed, and we cannot guarantee that there is no error, but such a difficult situation is very realistic in the project development manager. In front of him / how can she effectively solve these problems, specifically, as follows: 1. How to manage R & D projects; 2. How to coordinate between members of the project development team; 3. How to manage the unified management of subprojects that are responsible for team members; 4. How to uniform summary of the revisions made by members of the R & D team; 5. How to retain the modified trajectory to cancel the wrong change; 6. To develop The various versions of the software formed in the process are identified, managed, and differential identity, and so on. A very direct reaction, we must introduce a management mechanism, a version management mechanism, and is a broad version of management, which not only requires the source version of the source, but also to manage the entire project. The conventional type is known as a good programming style, such as the reasons for the revision, modifying people and dates, modifying people, and dates, if multiple members have made modifications, then need to perform timely artificial Difference comparisons and synthesize to form a unified new version. This approach has become more and more space in the development of large software, it can be said to be a small workshop in the form of a small workshop, and it is impossible to do it. In fact, the idea of version management has long been in the minds of software developers, but the past awareness is not as urgent in the past. UNIX's program development system provides a tool that can be managed in the development group, and now Linux is a powerful cross-platform version manager, and foreign companies' Windows-based version managers have also been With more mature products, domestic research units, such as Peking University Computer, Case Lab, is also committed to this work. In numerous mature products and test products, this will only have a relatively wide range of use, with large user prospects, and more easily obtained VisualSourcesafe6.0 of Microsoft, which is a detailed introduction to the ordinary R & D team. Solution, and concrete implementation. Second, VisualsourceSafe6.0 (VSS6.0) Introduction VSS6.0 is now a member of the developed product family as MicrosoftVisualstudio6.0, like Visualc 6.0 and VisualJ 6.0. 1. Simple working principle of VSS Microsoft's VSS6.0 solves the long-term version management problem facing the software development team, which may effectively help the project development group managed to manage the project procedures, and put all project source files (including Various file types are stored in the database in a unique manner.
The member of the development group cannot be directly modified to files in the database, but by copying the source program of the item or sub-project origin to each member's own work directory for debugging and modification, The modified project file is then submitted to the VSS, which is integrated by it. VSS also supports fast and efficient sharing of files between multiple projects. When a member adds a file to the VSS, the file will be backed up to the database so that all members can share the file. And each member of each member will be recorded in the database, making the recovery and revocation of modified events possible at any time. The team members may get the latest version of the project, modify it, and save a new version. The VSS project organization management makes the development team's coordination easier and intuitive. When a group, a group of files are issued to another member, a group, a web site, or any other address, VSS ensures true sharing between them and Safety of different versions of the selected set of files. Now, more and more developers can access the VSS functionality through their development environment. Moreover, VSS can easily integrate Microsoft, VisualBasic, Visualc , VisualFoxPro, and other development tools. Once VSS integrate into the development environment, you can use the control of the control, which can reflect the ease of use of VSS and Powerful function. 2. Several important concepts in VSS For better understanding of VSS, it is necessary to give an explanation of some of the following concepts. The first is the concept of the project, the so-called project is a set of files in the VSS (any type), which can be added, deleted, edited, and shared between items or 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 primary backup file in the VSS (except for special cases such as check and version comparison) but VSS provides one for each member in their respective working directories. Copy 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. VSS can maintain multiple versions of a file, including a record from different versions. Version control includes the following aspects: Coordination within the group - Make sure that only one member is modified at any time, which prevents files from being modified by other members. Update. Of course, VSS administrators can change this default settings to allow multiple Checkout for single files, and still prohibit the coverage of others. Version Tracking - archives and tracks the old version of the source code and other files, and these versions can be reacted to perform bug tracking or other purposes. Cross-platform development - supports the same code to control the version of multiple developments. Reusal or object-oriented code - Track which programs use which code can be reused modules. The meaning of version control will be further discussed in the later chapter. We already know that VSS provides version control and historical services to ensure that each version of a file is recoverable. When the VSS date / timestamp is used to record the file by Checkout or when it is modified, it mainly has three ways to track the version of the file and project: Version number: This is the internal Digital, the user is There is no control. Each version of each file and project has a version number, which is always an integer and increment. Tags: These are a string of a version of a version of a project or file that can be a string of no more than 31 characters in any format. 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.
The working directory is where the user really debugs the project file. When the user Checkout is extracted, the VSS copies the item to the user's working directory, when the user modifies the file and uses it when Checkin or submits, VSS Then come back 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. Some new features and feature archives and recovery of VSS6.0 - these two operations in VSS6.0 are in a user interface friendly VSS admin Wizard, and in the previous version, they only Can be implemented by the command line. Moving files - When a user moves a file, VSS6.0 automatically shares the file into a new project and deletes it in the original project. In a new project, the properties of the file are shared. Differences between multiple items comparison - This feature allows users to compare differences between different items. Expand of a single file - In the previous version, VSS can only expand a directory (folder), in VSS6.0, can also expand a file. Quick extraction - Due to the improvement of VSS6.0 in performance, the current file extraction speed is twice as fast as the VSS version in the past. Historical Information Filtering - VSS6.0 Supports View the history of those who do not have labels and projects. Clear the temporary folder option - the new feature allows the user to easily clear the temporary folder. Check the external superconnection - In the earliest version of VSS, only internal super-connected and jumps in the project are checked, and VSS6.0 allows users to check the over-connection and jump outside of the project. Create shortcuts to open the VSS database - Users can create a desktop shortcut to open a particular VSS database using the new feature in VSSExplorer. HTML format Help - VSS's previous version is used by WinHelp format. Third, VSS6.0 solutions have a more comprehensive understanding of the working principle, function and new features of VSS6.0, we begin to enter this section, that is, how to use VSS6.0 to actually solve software development projects The version management and control issues are effective in effectively architectural solutions. First look at the actual situation of our development team, the most general situation is that the entire project is the microcomputer environment, and each developer uses Microsoft's VC, VB, VJ, etc. to develop projects in their respective Windows microcomputers. Each sub-project or sub-module, usually this team is part of a local area network or a more independent subnet, which may have a dedicated server. Such a development environment is very advantageous for implementing version of VSS6.0, which is very intuitive, because VSS6.0 also requires this network environment. Secondly, for the project itself, a project will generally be divided into several sub-projects after analyzing the design, and the actual situation of software development determines that all groups are not completely independent, they Under many cases, we need to coordinate interaction and information feedback. Each step in the development process may lead to amendment to the previous phase, because software development is largely a spiral process, not to say groups. The interior exchanges. In this process of constantly interacting, the number of phases, some versions, and full versions of the project may be imagined, and the conventional version of the usual version of the artificial management is unable to win. And there is also a very important aspect that is not negligible, which is especially obvious to the development of system software, ie software hierarchy.
The general approach is to develop corresponding applications for multiple applications above the general system software. It is also generally divided into system development groups and various application development groups, application software development and use. The problem that will be reflected back to countless applications themselves and system software. If you only modify the update system software separately for each application, this inevitably causes the inconsistency of multiple system versions, so that there is a problem that the system exists. It is not your strength. The VSS6.0 is suitable for this software development architecture, which can create their own projects for each group, and these projects are from a general project, all modifications will be summarized to form a unified version. . In response to this most common software development environment and organizational structure, the VSS6.0 is used to use VSS6.0's very effective and small cost solutions: on a WindowsNT server or a more independent Windows98 / 95PC installed. VSS6.0 server-side software creates a database that is set to the entire project, then create individual items and sub-projects in the database, and create an account and their respective permissions for each member of the VSS administrator; Install the VSS client software on the PC of the development team, and create its own work directory, which in the software development process, as long as they log in to the VSS server via this client software, Checkout is currently working. Or files, if there is a modified modification, it is uniformly updated to the VSS server at the end of the work. The solution is shown in Figure 1. Fourth, the installation of the VSS6.0 server After we give the entire solution, look at how to install the VSS server. VSS6.0 is a member of the MicrosoftVisualstudio6.0 suite, and we will explain this version as an example. In the first step, put the CD1 of VisualStudio6.0 into the CD-ROM, automatically enter the installer, select Second "ServerApplicationsandTools (Addonly", as shown in Figure 2; Step 2, then "ServerComponents" in "ServerSetups" "Select" VisualSourceSafeServer ", press the" Install "button, put it in CD2 according to the prompt, as shown in Figure 3; third step, according to the INSTALLATIONWIZARD prompt, continue the installation process, select the installation path, press the button in the upper left corner of Figure 4 The system continues to install until you prompt you to restart to make the newly installed program take effect, restart your computer. The VSS6.0 server is installed is relatively simple, which can be installed under WindowsNT or installed under Windows 9X. V. 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, the user can find the program directly through the resource manager "Explorer" in the network neighbor, and double-click to run it, as shown in Figure 5 Indicated. NetSetup.exe enters the installation of the VSS client after startup, enter the username and workgroup name in the following prompts, as shown in Figure 6. After selecting the installation path of the VSS, click the installation icon in Figure 7, enter the actual installation step, and the future work will be automatically complete by the system. When the system prompts you, VSS has been successfully installed, and all installed works have been completed.
6. The configuration and management of the VSS6.0 server After the VSS6.0 server is installed, it is possible to perform the configuration and management of the VSS server for the development project, which must be completed by the VSS administrator. First, create a VSS database throughout the project (when the VSS server is installed, the system has created a default database Common), launching VisualSourceSafe6.0Admin (Start / Programs / MicrosoftVisualstudio6.0 / MicrosoftVisualsafe / VisualsourceSafe6.0Admin), jump out 8 The window, click the CreateDatabase ... menu item in the drop-down menu Tools, the window as shown in Figure 9, select the path to the new database, such as creating a MyApp database, then click the OK button, and the system will complete the creation work. In the second step, create a user for the newly created database (such as myApp), first need to open the database, click the drop-down menu Users / OpenSourceSaFedatabase ..., then select Database MyApp, open it, as shown in Figure 10. Select Menu Item AddUser ..., enter your username and password, as shown in Figure 11. Then create another user in turn. The third step is created in the newly built database. Start MicrosoftVisualSourceSafe6.0 (Start / Programs / MicrosoftVisualStudio6.0 / MicrosoftVisualSourceSafe / MicrosoftVisualSourceSafe6.0), a window appears in Figure 12, click the File drop-down menu in OpenSourceSafeDatabase ..., jump out of the dialog box shown in Figure 13, select a database (for example, Myapp), double-click it or press the OPEN button to open the database; a project Project is a set of related documents or a collection 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, as shown in Figure 14; you need to add a file to myProject, click on the addFiles command to MYPROJECT, click the addFiles command to the file, select the corresponding dialog box. File or directory, click the Add button to add them to myProject, as shown in Figure 15. The configuration of the VSS server is basically completed, creates a database and project, and establishes the corresponding user so that the user can log in directly to the VSS server in the client's VC and other development environments, perform in VSS Development work under control management. 7. Using SourceCodecontrol in the client's VC When the installation configuration of the VSS server is completed, the VSS installation is completed in the client, so that VSS can be enabled to manage the source code and documentation of the entire development team. In this section, we use a wide range of VC 6.0 as an example to explain how to sit on the client to use VSS to implement all development efforts under VSS valid control management.