About Source Safe

Source: Internet
Author: User

Suddenly I wanted to manage myself with the help of source safe, and then I found a problem. The added VC project always prompts "Cannot access the ClassView information file. ClassView information will not be available"

After opening the application, I can't get any class in Classview. so I found the following information. It turns out that X. the ncb (CFlassView file) file is also added, so that the code for checking out to the local device is read-only every time, so this error occurs when you open the VC project. The solution is to set X. the read-only attribute of ncb is removed. There are two specific implementation methods: 1. directly change the file attributes. 2. Check Out the X. ncb. ^_^ in VSS.

Of course, to avoid this problem, do not add X. ncb to VSS.

Along with this, I also found information about SourceSafe. I will share the following information with his home.

 

Currently, common configuration management tools in China include SourceSafe, CVS, and Clear Case.

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) before giving a detailed introduction to SourceSafe, let's briefly describe its 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 the working folder

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.

Be sure to Get Latest Version first. Otherwise, if someone else updates the code, VC will prompt you for Version differences and ask if you want to overwrite, integrate, retain, etc, if you select the wrong one, your code Cancel will be removed, 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;

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: Only files can be browsed. 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.