Source code version

Shane Ambler FreeBSD at ShaneWare.Biz
Mon Nov 11 07:38:49 UTC 2013

On 11/11/2013 16:11, Sreeram BS wrote:
> Hi, I have 2 questions related to source code of standard 
> programs(commands) of FreeBSD.
> (1) Assuming I would like to get the source code of program 'tail', 
> then I visit this URL 
> and enter the  'tail' sub-directory. Here I see the tail.c file, but 
> there is a version number(revision-number) next to it and that is
> the actual link for the program. Now, this version number is
> different for different utilities. For example, the latest version of
> tail.c is 251565, whereas the latest version of another program,
> 'basename' is 216370. My question is, is there a common path which
> can take us to the latest version of these programs? For example: 

Using ...usr.bin/tail/tail.c will show the revision log and
...usr.bin/tail/tail.c?view=markup will show the source for the file as
of the latest revision.

> (2) Is there a way, where I can get the revision number of source 
> code of a program shipped in a particular release. For example, 
> 'tail' is present in FreeBSD9 and FreeBSD8 also ('tail' is present
> in all FreeBSD releases, and so picking that as an example). The
> source code for 'tail' in FreeBSD8 could be different from the one
> in FreeBSD9. Is there a way to obtain the revision number of tail.c 
> program that was shipped in FreeBSD8 (or FreeBSD9).

You have several options for accessing different release versions all
use the filepath.

base/head/... is the newest development
release/x.y.z/... is a specific release version
releng/x.y/... is the release version with updates often called patch
levels - that is minor (usually security) updates available through
freebsd-update - eg 9.1-RELEASE-p3 will be available at releng/9.1

Not sure of a list of svn revision numbers for each release, but to see
the code used you should use the releng/x.y not revision xxx from head

More information about the freebsd-questions mailing list