BK-FM3TOOL(1)
πΈ 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 defaultfm3toolwill 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 inreadonlymode.β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-Clickover 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 fromfm3tool.
πΈ 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-guibk-resolvingbk-smergebk-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
- Copyright (c) 1998-2015 BitKeeper Inc
- Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms