BK-DIFFTOOL(1)
๐ NAME ๐
okay so bestie, meet bk difftool โ the BitKeeper graphical differences viewer from the BitKeeper Userโs Manual (yep, the bk difftool(none) page, and weโre folding that manual-name energy right in here ๐
). Itโs a side-by-side differences viewer that shows the files being compared in separate windows. The differences are color coded, but as you move to a new diff, that diff becomes highlighted in a bold font. You can move back and forth through the diffs using the keys described below. ๐ฆ
โจ SYNOPSIS โจ
bk difftool [<opts>]
bk difftool [<opts>] dir
bk difftool [<opts>] โ
bk difftool [<opts>] file
bk difftool [<opts>] โrrev file
bk difftool [<opts>] โrrev1 โrrev2 file
bk difftool [<opts>] file1 file2
bk difftool [<opts>] path/to/file1 dir
bk difftool [<opts>] โr@cset1 โr@cset2
bk difftool [<opts>] [โS] โL[url]
๐ OPTIONS ๐
โbโ Ignore changes in amount of white space.โL[url]โ Show changes that are unique to this repository relative to the (outgoing) parent or url.โscompโ In a nested collection, limit the files processed to the set of component[s] (or aliases of components) specified. This option may repeat.โS,โโstandaloneโ When used in a nested collection, treat the repository as if it were detached rather than as part of the collection. This option limits the files being considered to those in the current component (or product).โwโ Ignore white space when comparing lines.
๐ง ARGUMENTS ๐ง
If no arguments are given, bk difftool finds all the modified files in the repository and allows the user to select the files they are interested in via a pull-down menu. Keyboard accelerators may also be be used to navigate between the files. ๐ซถ
If a directory, dir, is given as an argument, bk difftool looks for changes in and only in that directory.
If a dash (โ) is given as an argument, bk difftool takes a list of files to view from stdin. For example,
$ bk gfiles โcU | bk difftool โ
$ bk โcgU difftool
If only one file is specified and that file is a locked and modified file, bk difftool will diff the most recent revision against the locked version.
If a revision and a checked out file are specified, bk difftool diffs that version against the checked out file.
If two revisions and a file are specified, bk difftool diffs those two versions of the file.
If two files are specified, bk difftool diffs those two files.
If a file (or a path with a filename) are given as the first argument and a directory is given as the second argument, then the basename of the first argument is appended to the second argument. The purpose of this calling convention is to save typing. For example, if I have multiple-related repositories at the same level in the filesystem and I want to diff a file in the local repository against the same file in another version of the repository, I can do the following:
bk difftool src/filename.c ../../repo/src
The above command is equivalent to doing the following:
bk difftool src/filename.c ../../repo/src/filename.c
If two revs are specified in changeset format, i.e., โr@cset, then the set of files displayed is based on the two changesets; each file that is different as of the specified changesets is shown. This output format can be very useful for reviewing, see examples below. If a file has been renamed, difftool will show the difference in contents as well as the change in the name. Note that this format works in nested repositories as well as standalone repositories. ๐
If the โL option is given, show all the changes unique to this repository relative to the (outgoing) parent or url if one was specified. This is similar to:
bk difftool โr@โbk repogca [url]โ โr@+
but not identical in that the โL option will also show any work in progress, such as files that are modified or have pending deltas (not yet committed to a changeset).
Use โS with โL when in a nested component and you want the component to act like a standalone repository.
๐ DISCARDING FILES ๐
When a file that is being viewed is in the checked out state, a button labelled discard will be enabled. You may click this button to discard your changes (see bk unedit). To perform the discard you must click on the discard button twice. After the first click you will be prompted to make a second click. If you click anywhere other than the discard button, or wait 10 seconds, the discard will be cancelled. ๐ญ
Once a file has been discarded, itโs corresponding entry in the Files menu will be disabled.
๐ EXAMPLES ๐
To see all the changes between two arbitrary changesets:
bk difftool โr@<rev1> โr@<rev2>
That form can be useful to "collapse" multiple changesets that may have added and then deleted content to the same file[s].
In a nested collection, to do the same as the previous example but limit the output to a particular component or alias:
bk difftool โs<alias> โr@<rev1> โr@<rev2>
In a nested collection, to limit showing changes to a particular component or alias:
bk difftool โs<alias>
๐น KEY BINDINGS ๐น
- Home โ Scroll both files to the top
- End โ Scroll both files to the bottom
- PageUp โ Scroll both files one screen up
- PageDown โ Scroll both files one screen down
- UpArrow โ Scroll both files one line up
- DownArrow โ Scroll both files one line down
- Left โ Scroll both files to the left
- Right โ Scroll both files to the right
- Controlโq โ Quit
- space โ Next diff
- n โ Next diff
- p โ Previous diff
- . โ Center the current diff on the screen
- Controlโn โ Go to then next file
- Controlโp โ Go to the previous file
๐ SEE ALSO ๐
bkโconfigโguibkโdiffbkโfmtoolbkโrange
๐ท๏ธ CATEGORY ๐ท๏ธ
- Common
- GUIโtools
- Repository
๐ signed off by BitKeeper Inc ยท version 1E1 ยท date: not listed on the page, bestie โ just footer vibes and manual energy ๐
๐ซถ
๐ฆ 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