INFO: Merging SourceSafe FilesLast reviewed: February 28, 1997Article ID: Q132971 |
3.04 3.10 4.00 5.00 | 3.04 3.10 4.00 5.00 | 3.04 3.10 4.00
WINDOWS | WINDOWS NT | MS-DOSkbusage The information in this article applies to:
SUMMARYIf you have shared and separated your working files in SourceSafe and have made changes to each of the versions, you may wish to have these changes reflected in a final project. If multiple checkouts are enabled and more than one user has the file out for editing, you may want to have all the changes reflected in the final project. The MERGE command (Merge Branches in Visual SourceSafe 4.0) allows this capability.
MORE INFORMATIONThe MERGE command (Merge Branches in Visual SourceSafe 4.0)takes the two ASCII text files and combines them. SourceSafe merges the original file (the last version of the file in SourceSafe prior to the separate or the multiple checkout action) and the file copies which have been modified. When two users have a file checked out, the first user to update can do so with no problem. If there is a conflict (see next paragraph), the next user is told that a conflict exists and asked if the files were merged. The file will be copied to the Working directory with the conflicts marked. You should manually edit the file to resolve the conflicts and update the file. As an example of a conflict, suppose that the original file contains the following line of code: X = 4. This original file is checked out by two users through either the multiple checkout or the share and separate (Branch in Visual SourceSafe 4.0). If one user changes the line of code to read: X = 5 and the other user changes the same line of code to read: X = 3, there is now a conflict. The first person to check in changes and merge has no problem. When the second person tries to check in the file and merge, the following message is given:
An automatic merge has occurred and there are conflicts. Edit <path>\<filename> to resolve them.The file has the following:
<<<<<<< $/<project1>/<filename> X = 3 ======= X = 5 >>>>>>> $/<project2>/<filename>When manually editing, you have to strip out the >>>>>>> comments and decide which of the two changes should really be there. Then when you try to check in the conflict modified file and merge, you get the following message:
<filename> has been merged with no conflicts. Update Now?This message just makes sure that the conflicts have been fixed. Answer Yes and continue with your work. The changes are now merged. NOTE: Merging only works correctly on ASCII files. For instance, FoxPro's SCX and SCT files or Visual Basic's FRX files are binary files and will not be merged correctly by SourceSafe. To summarize:
|
KBCategory: kbusage
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |