Page 1/2 of VSS Software Configuration Management Version Control

Source: Internet
Author: User

2. Why is configuration management required?
Without Software Configuration Management, the biggest trouble is that work results cannot be traced back. As work progresses Program Covering the old program, what should I do when I suddenly find that the new program has a problem and the old program is correct? You can only rewrite the old program to overwrite the new one. After a while, I found that there was a problem with the old program, and the solution was in the new program ...... Are you going crazy.
To avoid overwriting the results, many people, including myself, used the manual version management method in the early days. For example, when a new version was generated, the folder was named by the date at that time, then copy the changes to the copied folder and save the previous version. Different versions will not be overwritten. Although this method can solve the version tracing problem to some extent, its shortcomings are obvious: First, if the result is retained too frequently, this will lead to a large number of folders with duplicate content, a large physical space, and difficult to manage. If the old version is retained for a long time, some useful old programs may not be traceable. Taking the program I recently developed for example, the program only has dozens of megabytes. After one year of development, each version has accumulated to 1 GB. Second, it is easy to generate version chaos. If it is a team that develops software, this simple method is more difficult to solve the essence of the problem.
3. Human problems
The configuration management method is mature, and the corresponding software tools are also mature. Basically, there is no problem that cannot be understood or used. What is the effect of Configuration Management. The main problem that hinders configuration management is that people are too troublesome and lucky.
Running version control seems a little troublesome without any issue. Get latest version is always required for each modification, check out, check in again after modification, and perform three steps. In fact, these three steps add up to more than 10 seconds, and there is no need to worry about it. It's just that my personal experience is uncomfortable. If you do not execute version control, it will be too much trouble if your work results are overwritten or lost.
4. Software Configuration Management specifications
The software development and management process produces a lot of work results, such as documents, procedures and data, which should be kept properly for access and modification. It is very troublesome to use all files in a computer.
All work results included in the scope of configuration management are collectively referred to as configuration items in two main categories: one is part of the product, such as the requirement documents, design documents, Source code And test cases. The other is the documents generated during the management process, such as various plans and reports.
The main attributes of each configuration item include name, identifier, File status, version, author, date, and so on. Configuration items and historical records reflect the software evolution process.
A baseline consists of a set of configuration items that constitute a relatively stable logical entity. After the configuration items in the baseline are frozen, they cannot be changed at will by anyone. Baselines usually correspond to milestones in the development process. Generally, the baseline delivered to this customer is called a release, and the baseline used for internal development is called a build.
The purpose of version control is to save all versions of a configuration item according to certain rules to avoid version loss or confusion. There are three statuses for configuration items: "draft", "officially released", and "modifying"
The version number of a configuration item is closely related to the status of the configuration item:
(1) the version number of a configuration item in the draft state is in the format of 0.yz.
(2) the version number of a configuration item in the "officially released" status is in the format of x.y.
Generally, the value of X changes only when the value of Y reaches a certain range.
(3) the version number of a configuration item in the "modifying" status is in the format of X. YZ.
Generally, only the Z value is increased. When the configuration item is modified and the status changes to "official release", the Z value is changed to 0 and the x.y value is increased.
5. Common Configuration Management Software
A) since the late 1980s s, we have developed and improved "incremental storage" Algorithm "Configuration management tools started in spring. Currently, the common configuration management tools in China include sourcesafe, CVS, and clearcase.
Sourcesafe is a configuration management tool launched by Micrsoft that supports collaborative development by teams. It is one of the kits of Visual Studio. Because it is short and concise, and inherits the consistent style of Microsoft integrated sales, users can get the price relative to the free price, the number of users is definitely the first.
Sourcesafe is easy to use. When people use the configuration management tool, only add, check in, check out and other functions are used for 80% of the time.

Main limitations of sourcesafe: Only Windows does not support configuration management in heterogeneous environments, and the Internet is not fully supported.

B) First, let's give a brief overview of sourcesafe's basic mechanism. Sourcesafe operates on servers and local machines. It deems that all files to be operated exist in the server version file and local machine version file, whether your sourcesafe architecture is in the form of a server client or a standalone, this is the same mechanism. All the modifications used by the user are completed on the local machine. After the modifications are completed, they are uploaded to the server. This is also true for the standalone version. We must clarify the two versions before analyzing them.

A server version file is absolutely restricted by configuration management software. You can modify it only through the permissions and operation methods specified by sourcesafe because it is not yours, it is yours. A local file is basically unrestricted. You can operate it like a local file.

Sourcesafe consists of visual sourcesafe 6.0 admin, Microsoft Visual sourcesafe 6.0, analyze VSS dB, and analyze & fix VSS dB.

C) analyze VSS dB and analyze & fix VSS dB are not very common tools. The former is used to check the integrity of sourcesafe database files, and the latter is mainly used to correct errors in sourcesafe database files.

D) Visual sourcesafe 6.0 admin features similar to Win2k User Manager, which is used by Software Configuration Management Personnel to assign users and set corresponding permissions.

Administrator management operations are generally concentrated in visual sourcesafe 6.0 Admin. In the system, only one system administrator admin can log on to this program for management, generally, the password of this user is blank by default in the just-installed system. In addition, the system reserves all rights for the admin user and cannot be changed.

The database creation operation must be performed on the server, because the database creation operation through the client is only performed on the client machine. This database can only be used on a single machine. Note that VSS shares controlled version files on the server through windows network sharing. Therefore, the databases on the VSS server must be built into a fully shared directory on the server. Otherwise, the client will not be able to obtain files in the database.

Backup and recovery of the database. Back up the database or a project. Click Tools-archive projects... In the dialog box that appears, perform backup step by step as prompted. A backup file with the extension *. SSA is generated.

If you want to restore the file data in the VSS database from the file, click the tools-Restore projects menu to complete data recovery step by step as prompted. During the restoration process, you can choose to recover to the original project or change to another project directory.

E) Microsoft Visual sourcesafe 6.0 is the main platform used by sourcesafe. It looks like a Windows File Manager. The path displayed by it is the relative path of the root node with the '$' symbol, here we will introduce the main usage of this platform.

(1) Add a project

You can add a project under the root node by: file-add file. After the Add file dialog box appears, select the relevant file and press add.

You can use file-Create project to create a project under the root directory and then add files under this project node.

After the file is added, the attribute of the added source file automatically becomes read-only, and a vssver file is generated in the folder of the added file, in the future, operations on the file are basically irrelevant to the original file.

(2) Browse files in source safe Server

In visual sourcesafe certificate e, double-click the file to be opened. A dialog box is displayed. Click OK. At this time, sourcesafe certificate e will copy the file to the temporary folder on the local machine (the Temporary Folder path is set under tools-options-General), because the original file has changed to read-only, therefore, temporary files are read-only, and the file name is automatically changed by the system.

(3) set a jobCompositionClip

The sourcesafe folder must specify a "working folder" on the local computer ". When "check out", the corresponding file will be downloaded to this local working folder. Modify the file in the local file, and then "check in" the modified file is returned to the source safe of the server.

We can use the "set working folder" command to establish the correspondence between the source safe folder and the local "working folder. Method: In the file directory tree of source safe, select the folder for which you want to establish the corresponding link-right-click-select "set working folder.

(4) download the latest file to the local machine.

The "Get latest version" command can copy the latest version of a file, a group of files, or the entire folder from source safe to a local computer and save it as read-only. The method is as follows:

In the left-side file tree, right-click the corresponding folder and select "Get latest version"

A dialog box is displayed, which includes three check boxes: when the three check boxes are empty, only the files in the root directory of the source safe folder are copied to the local computer, just like the Copy command in DOS; when the recursive option is selected, all the folders and files in the source safe folder will be copied to the local computer, like diskcopy in DOS, make writable selected, copying to a local file is writable.

If we click the "advance" button, more options will appear. The first of the four options in "set file" is as follows: current is the current time when the copy operation occurred; modification is the last modification time of the file; check in is the last check in time of the file; default is the same as current.

The four options in replace writable are used to set how the system performs copy operations when the local machine has a file with the same name as the file to be downloaded and the file on the local machine is writable with the same name: ask system prompts whether to overwrite local files with the same name; replace automatically overwrites local files with the same name; Skip does not overwrite local files with the same name; merge merges the two files.

Make sure you get latest version first. OtherwiseCode, VC will prompt you for version differences and ask if you want to overwrite, integrate, retain, etc. If you choose wrong, someone else's code will be canceled, so be careful.

(5) download an object to a local device

When we want to modify a file, we first need to copy the file from source safe to "working folder" and save it as Writable. The command for this series of actions is check out. The usage is as follows: select the file to be downloaded to the local machine, right-click it, and select Check out. A dialog box is displayed. By default, the "don't get local copy" option is not selected, which means that if you do not choose to keep the default state, when the local file with the same name is read-only, the system first updates the local file with the source safe file, and the local file becomes writable. When the local file is writable, the option leave this file in another prompt box will appear: the local file is in the current state, and the files in source safe are also in the current state, in this way, two files may be inconsistent. Option replace your local file with this version from source safe: update the local file with the file in source safe. If you select the don't get local copy option, the source safe file is not copied to the local device.

After the file check is successful, you can see that the file is marked in red. In this case, your local file is writable and you can modify the file. The above options may make you confused. to simplify the operation, we recommend a check out method:

When the local file is more secure than the file content in source, select the don't get local copy option. Check in to synchronize the content of the Local Machine and the server;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.