BK-ANNOTATE(1)

πŸ“¦ version 7.3.3, in alpine 3.24

🌸 bk annotate(none) β€” the BitKeeper User's Manual, bestie edition 🌸

okay so real quick, this is a page from the BitKeeper User's Manual β€” buckle up, it's a good one πŸ’…


✨ NAME ✨

bk annotate β€” gives you annotated listings of one or more source files. cute, useful, iconic πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

bk annotate [options] [file ... | βˆ’]

πŸ’– DESCRIPTION πŸ’–

so BitKeeper annotations literally add an extra level of information β€” think date, author, etc. β€” while you're viewing file contents. Annotated listings are highkey useful for a deeper understanding of your source base, like when you're out here tracking down bugs πŸ”₯

BitKeeper has two kinds of annotations, bestie:

  • annotations of a specific version of a file
  • annotations of all (or some) versions of a file β€” that second form is unique to BitKeeper, no cap πŸ‘‘

By default, the bk annotate command displays a specific version of a file with annotations. The default version of a file is the most recent version; the βˆ’r option lets you specify an alternative version. The default annotations are the revision in which the change was made and the user who made that change. And psst β€” selecting any annotations overrides all of the default annotations 🫢

There's also an alternate form of the bk annotate command that shows or annotates either all lines added by all versions, or just the lines added by one or more versions. In that latter case, the whole file is not displayed β€” instead, only the lines which were added in that range of changes are displayed. The βˆ’R option turns on this form of annotation. Each version of a line is grouped closely with other versions of that line, which is so helpful for determining when a particular feature was added or modified 🌈

This form of annotation has no annotations by default β€” the desired annotations must be specified. If no annotations are specified, then the selected lines are shown without annotations. periodt.


πŸ’… OPTIONS πŸ’…

  • βˆ’A5dnpru β€” Align annotations in a human readable form. The set of annotations will be followed by a vertical bar and a space before the data from each line of the file starts. Each annotation is aligned in a column. The option argument[s] turn on one or more annotations as a prefix to each line. The order of annotations is fixed (no matter what order you specify them) and it's the same as the order listed below ⭐
    • p β€” Prefix each line with the pathname of the file relative to the current working directory. The name is always the current name of the file even if it has been renamed. iykyk, renames don't lie here 🧚
    • d β€” Prefix each line with the date of last modification.
    • u β€” Prefix each line with the name of the user who last modified it.
    • r β€” Prefix each line with the revision of the last modification.
    • 5 β€” Prefix each line with the MD5 key of the last modification.
    • n β€” Prefix each line with its line number.
  • βˆ’a5dnpru β€” Similar to βˆ’A but without the alignment (each annotation is followed by a tab). The order of fields is fixed and is: pathname, date, user, revision, md5key, line number. simple, clean, no notes πŸ’œ
  • βˆ’cdates β€” annotate only the lines added by the specified range of dates. See bk range for information on specifying dates.
  • βˆ’k β€” do not expand RCS or SCCS keywords. This option is implied by βˆ’c and βˆ’R.
  • βˆ’rrev β€” annotate all lines in this version of the file.
  • βˆ’R[rev] β€” annotate only the lines added by the specified revision (or range of revisions). If rev is not specified, that implies all revisions (i.e., ..). The difference between this option and the previous option is that in this case bk annotate shows only those lines added by the specified revision[s], but in the βˆ’r case, the entire contents of the specified version is annotated. two totally different vibes fr fr πŸ’€
  • βˆ’w[rev] β€” Change the format of the r annotation from rev to revβˆ’d<rev> in the case where the line is deleted from the rev passed as the argument, or rev‐x<rev> in the case where the line has been excluded. If no rev argument is given, the tip revision is used.

πŸ“ EXAMPLES πŸ“

Annotate the latest revision of a file:

$ bk annotate foo.c

Annotate the lines added in the latest revision of that file:

$ bk annotate ‐R+ foo.c

Annotate all lines in all versions of that file:

$ bk annotate ‐R foo.c

Annotate all lines added to all files in the current directory between June 1 of 2010 and July 31 of 2010:

$ bk annotate ‐c2010/06..2010/07

To annotate all lines added between two tagged releases:

bk ‐U annotate ‐Rbk‐4.6..bk‐5.0

πŸ™ˆ NOTES πŸ™ˆ

okay so history lesson β€” in previous versions of BitKeeper, the βˆ’c option was used to select a single revision and annotate all lines in that revision. You can now get the same effect as the old:

bk annotate ‐c2000 foo.c

with the more complicated (this assumes bash is your shell):

bk annotate ‐r$(bk prs ‐1 ‐hnd:REV: ‐c..2000 foo.c) foo.c

not me crying at how much simpler the old way was 😭


πŸ” SEE ALSO πŸ”

bk‐get, bk‐grep, bk‐range, bk‐revtool


πŸ‘‘ CATEGORY πŸ‘‘

File


πŸ’€ friendly little reminder: everything above is straight from the manpage β€” the flags, the paths, the examples, all of it. don't go inventing new ones, bestie.

that's the whole page! brought to you by BitKeeper Inc β€” version 1E1 β€” and it's the bk annotate(none) page, so go forth and annotate, you absolute main character πŸŒŸπŸ’–

πŸ“¦ 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