BK-FM3TOOL(1)

πŸ“¦ version 7.3.3, in alpine 3.24

🌸 bk fm3tool β€” BitKeeper three-way merge tool 🌸

From the BitKeeper User’s Manual, section none (yes, literally none, mysterious icon behavior πŸ’…). Bestie, this is the three-way merge tool that shows up when you answer f at the merge prompt during the resolve phase of a pull.

πŸ’– NAME πŸ’–

bk fm3tool β€” BitKeeper three-way merge tool.

✨ SYNOPSIS ✨

bk fm3tool [βˆ’ofilename] [βˆ’fn] βˆ’llocal_rev βˆ’rremote_rev file

πŸ¦‹ DESCRIPTION πŸ¦‹

bk fm3tool is a three-way merge tool used for resolving conflicting changes between two different versions of a file that have a common ancestor. Normally fm3tool is not run from the command line; it is started during the resolve phase of a pull by responding with f at the merge prompt.

The purpose of this tool is to aid in resolving parallel work that contains conflicts. A conflict is defined as one or more lines that were added, deleted, or modified in the local version of the file, at or adjacent to one or more lines that were added, deleted, or modified in the remote version of the file.

When the tool is started up, all of the changes that could be automerged have been automerged. The rest of the changes are noted as

<<<<<<
UNMERGED
>>>>>>

in the merged file window (see below). The tool’s default behavior is to go to the first conflict and wait for you to merge it. Typically, you merge that conflict, go to the next conflict, and repeat until done. It is not necessary to merge the conflicts in order; you may look at them all and merge them in any order. You must merge all conflicts, however, before you may save the file and exit.

When you are finished, you must save the file to complete the merge.

πŸŽ€ RUNNING OTHER GUI TOOLS πŸŽ€

It might be useful to look at other information associated with the changes. The File menu allows you to run several other tools:

  • revtool β€” This shows you the file history with the GCA, local, and remote versions highlighted. This is useful to see the progression of changes by selecting the GCA and then diffing down one side and then the other side one delta at a time.
  • csettool β€” May be run on the additions, deletions, or both. This can be useful when the context needed to resolve the conflict is contained elsewhere in the changeset that caused the conflict.

🌈 SCREEN LAYOUT 🌈

When bk fm3tool is started, there are six main areas on the screen. Notice that information about the local repository is on the left and remote repository is on the right.

           +‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ +
           | Local change info  | Remote change info |
           +‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+
           | ‐ GCA baseline     | ‐ GCA baseline     |
           | + Local change     | + Remote change    |
           |                    |                    |
           +‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐+
           | Merge                    | Information  |
           |                          |              |
           |                          |              |
           +‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐+
  • Local change info β€” Revision history for the local changes to the file.
  • Remote change info β€” Revision history for the remote changes to the file.
  • Local diff β€” Diff of local file versus the greatest common ancestor (GCA).
  • Remote diff β€” Diff of remote file versus the GCA.
  • Merge β€” Result of the merge.
  • Information β€” Informational messages and navigation controls.

As the tool moves from change to change, the top two windows will change to show revision history of the current highlighted change. The history shown for the deleted lines corresponds to the revisions that did the deletions. The annotation about which revisions added and deleted lines in the files are shown by selecting View->Show Annotations.

πŸ’… OPTIONS πŸ’…

  • βˆ’ofilename β€” save output to the specified file.
  • βˆ’f β€” force overwrite of existing file. By default fm3tool will not overwrite an existing merge file.
  • βˆ’llocal_rev β€” the revision in the file to be considered the most recent local work.
  • βˆ’n β€” do not write any merged output, put the tool in readonly mode.
  • βˆ’rremote_rev β€” the revision in the file to be considered the most recent remote work.

🫢 HAND-EDITING 🫢

A merge conflict may be edited manually by single-clicking over a highlighted diff in the merge window. The merge window will then enter a special edit mode where you can make changes. To exit the edit mode, press escape or click on area that divides the merge area from the areas above it.

πŸ“ COPY AND PASTE πŸ“

When the tool is in edit mode, it is possible to select text from either diff window and then copy them into the clipboard. The text copied to the clipboard is taken from the window with the active focus. This can include the merge window itself.

Pasting while focused in the left or right diff window will paste into the merge window at the insertion cursor. If the current block is UNMERGED, it will be replaced with the contents of the clipboard. Subsequent pastes will be inserted after the last insertion. Pasting while focused in the merge window itself will paste at the insertion cursor with no special action.

🧚 KEYBOARD BINDINGS 🧚

fm3tool has two major modes: β€œmerging mode,” for navigating through the diffs and conflicts and β€œediting mode,” for hand-editing a merge. Each of these modes has its own set of key bindings.

πŸ’€ MERGING MODE πŸ’€

  • Left-Click β€” Over a highlighted block in the upper windows, a left-click will append the highlighted block of text to the current merge region in the merge window. Left-Click over the merge window will enter hand-edit mode. See the section on HAND EDITING, above.
  • Right-Click β€” Over a highlighted block in the upper windows, a right-click will append the single line that was clicked on to the current merge region in the merge window.
  • Shift-Left-Click β€” Works like a left click, but replaces the contents of the current merge rather than adding on to it.
  • Shift-Right-Click β€” Works like a right click, but replaces the contents of the current merge with the line that was clicked on.
  • PageUp β€” Scroll up one page.
  • PageDown β€” Scroll down one page.
  • UpArrow β€” Scroll up one line.
  • DownArrow β€” Scroll down one line.
  • LeftArrow β€” Scroll left.
  • RightArrow β€” Scroll right.
  • <space> β€” move to the next conflict.
  • [ β€” Move to previous difference.
  • ] β€” Move to next difference.
  • { β€” Move to previous conflict.
  • } β€” Move to next conflict.
  • βˆ’ β€” Move to first difference.
  • + β€” Move to last difference.
  • x β€” Toggle the display of the GCA.
  • z β€” Toggle the display of annotations.
  • c β€” Clears the current merge region.
  • a β€” Restores the auto-merge.
  • m β€” Restores the manual merge.
  • s β€” Saves the merge file.
  • u β€” Will undo the effects that the last mouse click had on the current merge region.
  • e β€” This will move the focus to the merge edit window at the bottom and put the tool in edit mode.
  • Control-q β€” Exit from fm3tool.

🌸 EDITING MODE 🌸

  • <escape> β€” Exit edit mode.
  • Control-a β€” move to start of line.
  • Control-e β€” move to end of line.
  • Control-n β€” move to next line.
  • Control-p β€” move to previous line.
  • Control-d β€” delete character under cursor.
  • Control-y β€” Redo the last undone change.
  • Control-z β€” Undo the last typed change.
  • UpArrow β€” Move the cursor up one line.
  • DownArrow β€” Move the cursor down one line.
  • LeftArrow β€” Move the cursor left one character.
  • RightArrow β€” Move the cursor right one character.
  • PageUp β€” Scroll up one page.
  • PageDown β€” Scroll down one page.

πŸ‘‘ SEE ALSO πŸ‘‘

  • bk-config-gui
  • bk-resolving
  • bk-smerge
  • bk-fmtool

⭐ CATEGORY ⭐

GUI-tools


Cute sign-off, bestie: BitKeeper Inc Β· version 1E1 Β· manual page bk fm3tool(none) β€” no date in the footer, so I’m not inventing one πŸ’–

πŸ“¦ where this page comes from
  • alpine 3.24: bitkeeper-doc 7.3.3-r1 Β· Apache-2.0
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms