BUG: The contents of a file are not replaced if you use the Replace option when you undo a checkout in Visual SourceSafe (814680)



The information in this article applies to:

  • Microsoft Visual SourceSafe for Windows 4.0

SYMPTOMS

In Microsoft Visual SourceSafe, when you use the Undo Check Out option to cancel the changes that you made to a file, you can select Replace in the Local copy box. However, you may notice that the contents of the local file in your working folder are not replaced with the original contents. You may also notice that the time that the local file was modified is different from the current time.

Note You notice this behavior only if you compare the times on the files and then try to set the dates and the times on the files to the current date and time.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to reproduce the behavior

  1. Create a folder and a file on your computer:
    1. In the root folder of drive C on your computer, create a folder that is named Test.
    2. In the Test folder that you created, create a text file that is named Example1.txt.
    3. Type some text in the Example1.txt file, and then save the changes to the file.
  2. Start Microsoft Visual SourceSafe.
  3. In the Visual SourceSafe Login dialog box, do the following:
    1. In the Username box, type your user name.
    2. In the Password box, type your password.
    3. Click OK.
  4. Create a project in Visual SourceSafe:
    1. In the All Projects pane, click $/.
    2. On the File menu, click Create Project. The Create Project in $/ dialog box appears.
    3. In the Project box, type MyProject, and then click OK.
    4. In the All Projects pane, click MyProject.
  5. Add a file to your Visual SourceSafe project:
    1. On the File menu of Visual SourceSafe, click Add Files. The Add File to $/MyProject dialog box appears.
    2. Locate and then click the Test folder that you created in step 1, and then click Add. The Add Folder C:\TEST dialog box appears.
    3. Click OK. You receive the following message: Set C:\TEST as your personal working folder for the project $/MyProject/TEST?
    4. Click Yes, and then click Close. The folder is added to the project in Visual SourceSafe.
  6. Set the Visual SourceSafe options:
    1. On the Tools menu, click Options. The SourceSafe Options dialog box appears.
    2. Click the Local Files tab.
    3. In the Compare files by box, click Time.
    4. In the Set date/time on local files box, click Current.
    5. Click OK.
  7. Edit the file in Visual SourceSafe:
    1. In the All Projects pane, click MyProject.
    2. In the Contents of $/MyProject/TEST pane, click Example1.txt.
    3. On the Edit menu, click Edit File. The File $/MyProject/TEST/Example1.txt dialog box appears.
    4. Click the Check out this file and edit it in your working folder option, and then click OK. The Check Out Example1.txt dialog box appears.
    5. Click OK. The Example1.txt file opens.
    6. Modify the contents of the file, and then save the file.
    7. Close the file.
  8. Wait for a couple of minutes to make sure that the time that the local file was modified is different from the time on the Date-Time tab in Visual SourceSafe.
  9. Right-click Example1.txt, and then click Undo Check Out. The Undo Check Out for Example1.txt dialog box appears.
  10. In the Local copy box, click Replace, and then click OK. You receive the following message: C:\TEST\Example1.txt has changed. Undo check out and lose changes?
  11. Click Yes All.
  12. Locate the C:\Test folder, and then open the Example1.txt file.
Notice that the file contains the modified contents. Additionally, notice that the time that the local file was modified is different from the current time.

REFERENCES

For more information about how to use local files and folders in Visual SourceSafe, visit the following Microsoft Developer Network (MSDN) Web sites:

Modification Type:MinorLast Reviewed:8/15/2005
Keywords:kbpending kbSrcControl kbbug KB814680 kbAudDeveloper