From owner-freebsd-questions@FreeBSD.ORG Mon Nov 11 07:38:48 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E6031795 for ; Mon, 11 Nov 2013 07:38:48 +0000 (UTC) (envelope-from FreeBSD@shaneware.biz) Received: from ipmail06.adl2.internode.on.net (ipmail06.adl2.internode.on.net [IPv6:2001:44b8:8060:ff02:300:1:2:6]) by mx1.freebsd.org (Postfix) with ESMTP id 7CE662074 for ; Mon, 11 Nov 2013 07:38:48 +0000 (UTC) Received: from ppp118-210-43-157.lns20.adl2.internode.on.net (HELO leader.local) ([118.210.43.157]) by ipmail06.adl2.internode.on.net with ESMTP; 11 Nov 2013 18:08:45 +1030 Message-ID: <52808981.20102@ShaneWare.Biz> Date: Mon, 11 Nov 2013 18:08:41 +1030 From: Shane Ambler User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Sreeram BS , "freebsd-questions@freebsd.org" Subject: Re: Source code version References: <1384148498.43725.YahooMailNeo@web125401.mail.ne1.yahoo.com> In-Reply-To: <1384148498.43725.YahooMailNeo@web125401.mail.ne1.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Nov 2013 07:38:49 -0000 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 http://svnweb.freebsd.org/base/head/usr.bin/ > 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: > http://svnweb.freebsd.org/base/head/usr.bin/tail/tail.c?revision=LATEST? > 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