Introduction to VSS

Source: Internet
Author: User
1. What is software? Configuration Management

Software Configuration Management refers to implementing version control, change control procedures, and using appropriate configuration management software to ensure the integrity and traceability of all configuration items. Configuration Management is an effective protection of work results.

2. Why is configuration management required?

Without Software Configuration Management, the biggest trouble is that work results cannot be traced back. As work progressesProgramCovering 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 codeAnd 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 select the default status,When the local file with the same name is read-onlyFirst, the system uses the source safe file to update the local file,The local file becomes writable..When a local file is writableThe option leave this file in another prompt box appears: the local file is retained to the current state, and the files in source safe are retained to the current state. This may cause two files to 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;

When files in source safe are compared with files on the local machine, select the file in source safe, Get latest version command, and check out according to the default options;

When the content is the same, follow the default options.

Note: The file lock concept is used in source safe. When a file is checked out by others, others cannot check out the file. If the file lock is invalid, you can check whether the visual sourcesafe 6.0 admin-tools-General-Allow multiple chechouts option is selected. Check in is required only after the check out file is modified to ensure the latest file in source safe.

Remember that checking out will make the code writable to yourself and read-only to others. Check out only the part you need to modify. Otherwise, you can only rest with the group members when you work.

(6) upload files to the server

We must use the check in command to ensure local file synchronization of source safe. Check in and check out appear in pairs. It is used to update the file checked out in source safe.

For specific operations, select a file in the check out state in source safe, and right-click to select Check in, a dialog box is displayed: by default, its two check boxes are not selected, the keep checked out option can be automatically checked out again after check in, so the next check out operation is omitted; remove local copy option can be checked in at the same time, delete the file with the same name in the working folder on the local machine.

Generally, you can use the default option. After check in is successful, source safe is identical to the local file, and the local file is changed to a read-only file. To modify the file again, run the check out operation. The file attribute of the local machine is automatically changed to writable state. Remember to check in after checking out. Otherwise, the result is similar to not saving the written file.

Make sure that your documents are correct and can be compiled before checking in. Otherwise, other people may not be able to compile the documents, and the entire project cannot be debugged.

(7) undo check out operation

After a file is checked out, if you want to cancel this operation, you can use the Undo check out command to select a file in the check out status, right-click and select undo check out.

When the files in source safe are completely the same as the local files, no message is prompted and the files are restored to the normal state.

When the file in source safe is not exactly the same as the local file, a prompt window appears. The local copy dialog box contains three options:

After the replace option is selected, the system queries whether to overwrite the information. If yes is clicked, the last version of the file on source safe overwrites the file on the local machine, if no is selected to retain the content of files on the local computer, the files on source safe are the content after the last check in. At this time, the two files may be different;

The leave option retains the content on the current computer. The file on source safe is the content after the last check in, and the two files may be different;

Delete option to delete the file on the local computer.

Select an option, click OK, and the file returns to normal state.

(8) edit operation

The Edit command is a combination of commands that are checked out before modification. It should be noted that after the edit command is executed, the file is modified, but the files in source safe are not modified synchronously, check in to synchronize local files with files on source safe.

(9) view the historical content of a file

Select this file, right-click show history, and a dialog box is displayed. After you select OK, a form is displayed. We can see all versions of this file, to view a version, select view. To download a previous version, click get.

(10) Source safe Permissions

By default, project security management is run in simple mode, that is, the user has only two permissions for project operations, one is read-only permission and the other is read/write permission. To enable advanced mode, select this option in visual sourcesafe 6.0 admin-tools-project security-enable project security.

Source safe has five levels of permissions:

No permission limit: the file cannot be viewed

Read-level: allows you to browse files. You can use the Get latest version command.

Check in/check out: objects can be updated but cannot be deleted.

Delete level: files can be deleted, but these files can be recovered through some commands.

Destroy: the file can be completely deleted and cannot be recovered after deletion.

Generally, the software configuration administrator can set permissions for users in visual sourcesafe 6.0 admin.

Permission management is the relationship between the user and the project directory. Therefore, there are two management methods. One is to manage permissions based on the project directory and the other is to manage permissions based on the user.

For directory-based user permission management, Click Tools-right by project... Menu to manage the project's user access permissions.

If the user is the main line for user permissions, you should first select a user in the user list below the main interface, then click rights assignments for user... Menu. In the displayed dialog box, the user's access permissions to the directories of various database projects are listed at the bottom of the dialog box. If a project is not listed in the List, the project permission inherits the access permission of the parent directory. You can click a directory to edit the user's permission to access the project directory.

Permission replication is to directly copy the permissions of a user to another user. The administrator can copy user right... Menu.

(11) Password Change

The password is generally assigned by the software configuration administrator. If you need to change the password, you can change it under tools-Change Password. Note that when your source safe password is the same as the Windows Password, start source safe without prompting you to enter the password. This is Microsoft's consistent style. It can also be found in the SQL Server database management system, because Microsoft believes that Windows passwords should be higher than other software passwords, since you can use the same user name and password to access windows, you have the right to use the same user name to access other software.

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.