BK-ANNOTATE(1)
πΈ 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βAbut 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. Seebk rangefor information on specifying dates.βkβ do not expand RCS or SCCS keywords. This option is implied byβcandβ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 casebk annotateshows only those lines added by the specified revision[s], but in theβrcase, the entire contents of the specified version is annotated. two totally different vibes fr fr πβw[rev]β Change the format of therannotation fromrevtorevβd<rev>in the case where the line is deleted from the rev passed as the argument, orrevβ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
- 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