Merging a Local File with the Tip Revision

You can use File Compare/Merge to merge the contents of a local working file with the tip revision of the file in StarTeam. For example, if the file in your working folder has been modified, but is not based on the tip (latest) revision of this file, it is marked with a Merge status. This status usually occurs when you and another person have both been working on a file, but the other person has checked it in before you. To check in your edits without losing the edits of the other person, you can compare the contents of the files, reconcile the differences between them, and merge the contents into one file.

To merge a local file with the tip revision

  1. Select a file in StarTeam with a file status of Merge or Unknown, and choose File > Check Out .

    A message appears giving you the option to merge the contents of the two files.

  2. Click Yes to merge the contents.

    The File Compare/Merge window opens in a 3-way Vertical comparison mode. The two files you are comparing display in the right and left panes, and a center pane displays the merged base file. If you want to use a different comparison layout, right-click in one of the panes and choose Switch Comparison Modes. You can choose either 3-way Horizontal or 3-way Mixed comparison mode. In the 3-way Mixed mode, the base file is in the lower pane.

    Note: You can edit in all the panes in the standalone File Compare/Merge, and you can replace or append text in the base file with highlighted text from the left and right panes.
  3. Edit and/or merge the contents of the files using one or more of the following methods:
    • Perform an automatic merge: Right-click in a File Compare/Merge pane and choose Nonconflicting Parts Auto Merge or Full Auto Merge. Nonconflicting Parts Auto Merge places only the nonconflicting portions of the two compared files into the base file. Full Auto Merge parses the two files, examines the changes, and automatically decides whether to keep or add each change to the final base version of the file.
    • Edit any of the files directly. You can perform common text-editing actions such as type, cut, copy, paste, and undo.
    • Copy text from the right and left panes using buttons that appear in the top right corner of the color differences blocks. These buttons appear dynamically when you hover the mouse cursor over a color differences block. If you do not select specific text to copy to the center pane, File Compare/Merge copies the entire highlighted block of text.
    Note: You can also use the toolbar and the context menu to navigate in the panes, control scrolling behavior, search for text, and perform other basic actions.
  4. Optionally, right-click in one of the panes and choose Generate Report.

    To print the report, choose File > Print .

    Note: If you want a report of your changes, you must generate it before closing the File Compare/Merge window.
  5. Choose File > Exit when you are satisfied with the merged results.

    File Compare/Merge closes, and updates the file status to Modified in StarTeam.

  6. Optionally, test the modified file to ensure there are no problems with it.
  7. Check in the file.