• For a conflicting change, the blocks in all contributors are colored yellow, no matter what the navigation mode is.Example 1: In My changes navigation mode, non-conflicting additions that come from your version are colored green; non-conflicting additions that come from the other contributor are colored gray. In Their changes navigation mode, the color-coding of non-conflicting additions would be reversed.Example 2: In Conflicts navigation mode, all conflicting changes are colored yellow; all other change sections are colored gray.The merged version is displayed with color-coding, too. Each colored block is a location where a change has been incorporated from one of the contributors into the merged version. When it starts, the Merge tool performs as much merging as it can automatically, applying all of the non-conflicting changes to the merged version. The text is always colored gray. Annotations in the left margin indicate the origin of the change:The Merge tool cannot resolve conflicts automatically, so the location of each conflict is initially indicated in the merged version by a blank yellow block. As you make selections to resolve the conflicts, the blank yellow blocks get filled in with the selected text and are annotated:
• If the Their changes mode button is selected, the navigation buttons traverse just the change sections in which the left-hand (or upper) contributor differs from the closest common ancestor.
• If the All the changes mode button is selected, the navigation buttons traverse all the change sections.
• If the My changes mode button is selected, the navigation buttons traverse just the change sections in which the right-hand (or lower) contributor differs from the closest common ancestor.
• If the Conflicts mode button is selected, the navigation buttons traverse just the sections with conflicting changes.Whenever you use one of these buttons (except for Search) to jump to a particular change section, the Merge tool remembers it as the current change. Selecting a particular change section by left-clicking it in either contributor pane makes it the current change.For example, "2 of 4" might mean "you are currently in My changes mode, and you are currently at the 2nd of 4 such changes".In addition to navigating among the change/conflict sections, you can search for any text string in any pane, using the Search toolbar button (keyboard shortcut: Ctrl-S).
• Click the Take common ancestor change toolbar button to incorporate the original block from the closest common ancestor.
• Click the Take my change toolbar button to incorporate the changed block from the right-hand (or lower) contributor (file in your workspace).
2. Hold down the Ctrl key, and click another conflict-resolution button. The newly selected block is sent to the merged version, below the previously selected block. The conflict-resolution buttons are annotated with numbers, indicating the order you selected. (And the tooltip reminds you of this "multiselect" capability.)You can undo a multiselect by clicking any of the conflict-resolution buttons without holding down the Ctrl key. Typically, you'll need to do some manual editing to "smooth out" the combined changes of a multiselect.
• The Revert all of my changes button makes the merged version the same as the left-hand (or upper) contributor version.
• The Use only my changes button makes the merged version the same as the right-hand (or lower) contributor version.When you click one or more conflict-resolution buttons to resolve a conflict, the selected block(s) appear in the merged version and the highlight changes from yellow (unresolved) to blue (resolved). This also decrements the change section counter in the Merge toolbar.Use the Next navigation button to scroll down to the next conflict. (It may take more than one click if your are not in Conflicts navigation mode.) Again, use one of the "take change" buttons to select the text from the left contributor or the right contributor (or both of them).You can change your merge decisions as much as you want. For example, you can navigate to a particular change section where you had selected Take their change, and then click the Take my change button. This swaps out their change and swaps in your change.Warning: swaps of this kind also discard any manual edits that you have made in that section after initially selecting it.If you want to discard all your merge work, close the Merge tab to abandon the merge session entirely.At any time during a Merge tool session, you can manually edit the contents of the merged version. Just click anywhere in the pane containing the merged version, and type. The Delete and Backspace keys work as expected. Using context (right-click) menus or the GUI main menu, you can Cut, Copy, and Paste sections of text that you've highlighted with the mouse. You can also use the common keyboard shortcuts: Ctrl-C or Ctrl-Ins to copy, Ctrl-V or Shift-Ins to paste.Warning: If you make changes manually within a conflict section that you've resolved with one of the conflict-resolution buttons, the manual changes will be overwritten if you return to that section and click any conflict-resolution button.
1. Right-click in the contributor section, and choose Join Sections from the context menu.
• Clicking Keep & Exit ends the merge session immediately, closing the Merge tab. AccuRev overwrites the file in your workspace with the merged version. Then, it a Keeps a new version in your workspace stream, to preserve the merge results. The overlap status of the file is removed, so that you can now Promote the new version to the backing stream.
• Clicking Review continues the merge session. This enables you to review your work, change some of your merge decisions, and perform manual edits. At any time, you can click the Keep button in the Merge toolbar to complete the merge process.As of AccuRev Release 4.9, the merge command is now smarter about simple (rebase) merges, resulting in simplified display of merge lines in the Version Browser, and simplified change packages. For example, assume two developers are working in parallel on the same element, with a common ancestor, and there are only regular versions (that is, no patches, merges, or reversions) between the current versions and the common ancestor. When these are merged, the resulting version of the merge is rebased to point to the merged version.In these cases you will not see a red merge line in the Version Browser. Instead, the comment section of the merged file will contain an entry similar to: “merged, rebased to <version>”. In other words, if a merge results in a change that you would have received if you had simply done an update, it is not displayed as a merge. See the screenshots under Notes:.When this radio button is selected, the navigation buttons take you to all the change sections.When this radio button is selected, the navigation buttons take you to all the sections that contain conflicting changes.Preserve the current contents of the merge results pane as a new version of the element, using the Keep command. (The Keep dialog box does not appear.) The Merge tab for this file then closes automatically.
• Character Encoding: A drop-down list that lets you specify the character encoding of the file being merged. This field has two effects:
• BOM: A BOM (Byte Order Mark) is part of the Unicode standard used to indicate the endianness of a text file, and which Unicode encoding is in use (UTF-8, UTF-16, or UTF-32. for example). The BOM drop-down is displayed only when you are merging Unicode files, as shown here:This can happen because the native encoding is Unicode, or if you use the Character Encoding field to explicitly set a Unicode encoding.When the BOM field is set to Yes, the output file of the merge will be written with a leading BOM indicator from the Unicode standard. When the BOM field is set to No, the output file will be written without the leading BOM. If either contributor to the merge has a BOM in it, the BOM field defaults to Yes; otherwise it defaults to No.(Appears for file with .htm or .html suffix only) Toggle switch: display the context of the merged version as plain text, or render the contents as HTML.
Micro Focus |