An intuitive way to see when somebody did something in a determined part of the code is through annotate command. The annotate command requiers one obligatory parameter: a file name, which is the file we want to explore. Suppose we want to see the annotated version of the source ntpd.c, well we just type (assuming that we are working at our repository root):
 $ bk annotate ntpd/ntpd.c
This particular example will generate a huge output, we can just redirect or pipe it to a file or a program.
 $ bk annotate ntpd/ntpd.c | less            # less is more than more :-D
Say we want to see only the annotated version at a specific revision, this can be done using the parameter -r, like this:
 $ bk annotate -r1.1 ntpd/ntpd.c
Nice don't you think?, you are now looking at the first revision of the NTP daemon source code.

We can manage the format of each annotated line by using the -Aformat parameter, where format stands for:

b Prefix each line with the basename of the file.

d Prefix each line with the date of last modification.

n Prefix each line with its line number.

p Prefix each line with pathname of the file relative to the root of the repository.

r Prefix each line with the revision of last modification.

u Prefix each line the name of the user who last modified it.

Try this:
 $ bk annotate -Adu ntpd/ntpd.c
Now we know when who modified what in ntpd.c.

To see which lines were added when we can use the -R parameter:
 $ bk annotate -R1.20 ntpd/ntpd.c           # See what was added in revision #20

For a complete usage see the command online help by typing:
 $ bk help annotate

-- FernandoHauscarriaga - 06 Mar 2007

This topic: Dev > WebHome > BitKeeperNotes > BkAnnotate
Topic revision: 06 Mar 2007, FernandoHauscarriaga
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Network Time Foundation's NTP Support Wiki? Send feedback