Merge

If you edit a file that another user is also working on, the status of that file will become Merge Required if the other user checks in their changes before you check in your changes. Since you want to be able to preserve both the other user's edits, and your own edits, you will have to merge the two sets of changes to that file.

To perform the merge, select the file in the file list, right click on the file, and then choose the Merge File... or the Visual Merge... menu option.

When you choose the Merge File... menu option, QVCS-Enterprise will automatically merge the two separate sets of edits to the file and update your copy of that file so that it contains the merged result and the file status will change to Your copy changed.. If there are any collisions in your respective edits, the merge is abandoned, and your file will be left the same as before. When there are collisions between the respective edits, you have to use the Visual Merge... menu option in order to be able to resolve the collisions and produce a merged result.

When you choose the Visual Merge... menu option, QVCS-Enterprise will open a separate Visual Merge window. The Visual Merge window is separated into three separate panes. The top pane shows the result of the merge. The bottom left pane shows the file with the first set of edits. The bottom right pane shows the file with your set of edits. When the windows first appears, none of the edits from either file have been applied in the merged result window. You cause the edits from the respective files to be applied by using the toolbar buttons to navigate over the respective edits and clicking on the apply edit buttons to cause the current edit to be applied (or not) to the merged result.

In the typical scenario, you follow these steps to create a merged result:

  1. After the visual merge window displays, click on the 'Apply all non-colliding edits from both files' toolbar button.
  2. If there are any collision areas, enable the checkbox in the left or right lower pane next to the edit that should appear in the merged result.
  3. Click on the 'Save merged output file' toolbar button.
  4. Dismiss the Visual Merge window.
  5. The status of the file in the file list pane should now show Your copy changed.

If you exit the merge window without clicking on the Save merged output file button, the status of the file will remain Merge Required.

You can only perform a merge on a text file.

End-of-Line Sequence Behavior

When using the Visual Merge tool to write the merged result, QVCS-Enterprise must choose what character sequence to use for the end-of-line markers. Typically, Unix based operating systems use just a line-feed character to mark the end-of-line, and Windows based operating systems use a carriage-return/line-feed sequence to mark the end-of-line. Since QVCS-Enterprise is cross-platform, it must handle the case where a merge is performed for edits that originate from a Windows box and a Unix based box.

The strategy it follows is simple. It checks all the rows of the ancestor file to verify that all the rows share a common end-of-line sequence. If all the rows share the same end-of-line sequence, it will use that end-of-line sequence when it writes the merged result. If there is any variation in the end-of-line sequence in the ancestor file, it will use the client platform's end-of-line sequence when writing the merged result.