Once a Web application has source control enabled, you check your files in and out instead of getting and releasing working copies as you did before.
By checking files in and out through the Web projects in Microsoft® Visual InterDev™, team members have more control over when the master Web application and Visual SourceSafe repository are updated with newer versions from your local Web applications.
Note If you use the Visual SourceSafe client instead of the Visual InterDev features to perform source control tasks, be sure to refresh your Web project in Visual InterDev before continuing with your work.
For more information about working under source control, see the following:
Once you've enabled source control for a Web application, any files that you create or add to that Web application using Visual InterDev are added automatically to the Visual SourceSafe project. This includes files that are created in any Visual InterDev editor or files that you create in other applications and add to a Web project.
Note If you add files directly to the project directory on the server, through the file system, those files will not be automatically added to the Visual SourceSafe project. To add those files to the Visual SourceSafe project, you need to refresh the project view by synchronizing the local Web application with the master Web application.
To synchronize the local and master Web applications
Your view of the Project Explorer is refreshed and all files contained in the project directory appear in the Project Explorer.
If you see an icon with a red "X," the associated file is not in the Visual SourceSafe project.
If you have a file in your Web project that for some reason is not under source control, you can add it manually.
To add a file manually to source control
To remove files from source control
For more information about using Visual SourceSafe, see Troubleshooting Source Control.
You can check out a file directly in the Visual InterDev Project Explorer without running the Visual SourceSafe client. By default, when you check out a file, no one else can get a write-enable copy of the file. If you request a local copy of a file that another user has already checked out, Visual SourceSafe displays a message indicating that another user has the file checked out, and only allows you to get a read-only version of the file.
To check out a file
In the Project Explorer, files that are write-enabled in the local directory are shown in color, while read-only copies and files without any local copy appear in shades of gray.
File status in the Project Explorer
When a file is checked out, you get a write-enabled copy of the file and Visual SourceSafe marks the file as checked out in the Project Explorer. When you check in the local copy, the file is marked as checked in and all changes to the files are saved to the master Web server.
By default, you are prompted to choose between a write-enabled or a read-only copy of the file. If you know you always want one or the other, you can set Visual SourceSafe to always provide one or the other.
To specify how files are checked out
If your team members want to be able to work on the same file simultaneously, your Visual SourceSafe administrator can allow more than one person to check out and edit a file by allowing multiple checkouts. This option allows more than one person to work on a file at the same time.
When multiple checkouts are allowed, each user who checks out the file gets a write-enabled copy of the file. If you are the second person to check the file in, you can review the differences and choose to merge the two versions. For more information, see the topic "Resolve Merge Conflicts with Visual Merge" in the Visual SourceSafe documentation.
To allow multiple checkouts
If you want to review the latest version of a file without making changes to the file, you can get a copy of the master version of a file without checking the file out. When you get the latest version of a file, a read-only copy of the master file is placed on your local Web server. For example, you might want to get the latest version of files that link to the files you are developing.
To get a copy of the master version of a file
If you already have a local copy of the file, Visual InterDev displays a dialog box in which you choose to keep the existing local file or to replace it with the master copy. A copy of the requested file is placed on your local Web application.
Note If the local directory is not synchronized with the master Web directory, this command may fail. If this happens, use the Refresh command on the View menu to synchronize the project with the Web directory, and then try the command again.
When you check in a file, you replace the current version of the file in Visual SourceSafe with a revised version of the file from your local Web directory. Visual InterDev automatically interacts with Visual SourceSafe to check the file in; you don't have to perform any additional steps.
To check in a file
Note The Check In command is different from the Save command. The Save command updates the file in the local or master Web applications, but does not update the source control version in Visual SourceSafe.
After the file is checked in, the version you originally checked out is placed in the Visual SourceSafe history for that file.
If you made changes to the file, but do not want to save them as the latest version in Visual SourceSafe, you can use the Discard Changes command to abandon all changes made since getting the local copy.
To discard changes made to a file
When multiple check outs are allowed, you might need to resolve merge conflicts if other team members have made changes to the file you are checking in.
When you check in a file in that has been altered by another user, Visual InterDev detects the merge conflicts and displays the Merge dialog box for you to review the two different versions. For example, you check out a file to change some client script and a Web author checks out the same file to rewrite some of the content. If the Web author checks in the modified file before you, the Web author's version of the file becomes the new master version. When you check in your copy of the file, the Merge dialog box appears allowing you to merge the two versions and save the merged file as the latest version.
If someone made changes to the master version after you got the copy you changed, the Merge dialog box appears when you release the your local copy. In the Merge dialog box, you can review differences between the files and accept or reject the changes.
For example, in the Visual SourceSafe version is the master version that someone saved to the server. The local version reflects the latest local copy. The Original version pane allows you to edit the file and shows the merge decisions you have made.
To merge the files
Both the master and the local copies reflect the changes you saved.
You can also view differences by comparing the version in Visual SourceSafe and the local version.
For more information about using the Visual Merge Dialog Box, see the topic "Resolve Merge Conflicts with Visual Merge" in the Visual SourceSafe documentation.
To manually view differences
For more information about comparing files, see the File Difference Options dialog box.