suggestion of src-cur src/.svn_revision

Montgomery-Smith, Stephen stephen at missouri.edu
Sat Nov 15 20:41:26 UTC 2014


On 11/15/2014 09:01 AM, Julian H. Stacey wrote:
> "Montgomery-Smith, Stephen" wrote:
>> On 11/14/2014 04:29 AM, Julian H. Stacey wrote:
>>> Hi Stephen,
>>>
>>> Wed, 05 Nov 2014 16:29:29 +0100 I wrote ctm-users at freebsd.org
>>>
>>>> So there is no place where ctm src-cur users can refer to SVN revision number,
>>>> So I suggest the ctm generator could be slightly extended eg approx:
>>>> 	svn export file:///usr/svn/base/head > ../output
>>>> 	tail -1 ../output | sed -e 's/Exported revision //' \
>>>> 	| sed -e 's/.$//' > head/.svn_revision
>>>
>>> Any chance you could try adding code above or similar please ?
>>
>> It was surprisingly easy to implement.  Tell me if there are any problems.
> 
> Working nicely here thanks Stephen, great that you've done them all :-)

One problem I encountered is that the SVN release number can increase
without there being any actual changes to that particular branch.  So
mkctm has now been rewritten so that the delta is created only when
there are actual changes, not just an SVN revision update.  Otherwise
branches like svn-4 will be spitting out new deltas which only update
the SVN revision.

> I see with my http://www.berklix.com/~jhs/src/bsd/jhs/bin/local/ctms/ctms
> 
> /pub/FreeBSD/branches/-current/ports            ports-cur 10647 372594
> /pub/FreeBSD/branches/-current/src              src-cur 11700 274549
> /pub/FreeBSD/branches/10.0-stable/src           src-10 520 274548
> /pub/FreeBSD/branches/4.0-stable/src            src-4 2355 274538
> /pub/FreeBSD/branches/5.0-stable/src            src-5 862 274538
> /pub/FreeBSD/branches/6.0-stable/src            src-6 1653 274538
> /pub/FreeBSD/branches/7.0-stable/src            src-7 1734 274538
> /pub/FreeBSD/branches/8.0-stable/src            src-8 1834 274548
> /pub/FreeBSD/branches/9.0-stable/src            src-9 1325 274548
> /pub/FreeBSD/development/CTM/ports-cur          ports-cur.10647.gz
> /pub/FreeBSD/development/CTM/src-10             src-10.0520.gz
> /pub/FreeBSD/development/CTM/src-4              src-4.2355.gz
> /pub/FreeBSD/development/CTM/src-5              src-5.0862.gz
> /pub/FreeBSD/development/CTM/src-6              src-6.1653.gz
> /pub/FreeBSD/development/CTM/src-7              src-7.1734.gz
> /pub/FreeBSD/development/CTM/src-8              src-8.1834.gz
> /pub/FreeBSD/development/CTM/src-9              src-9.1325.gz
> /pub/FreeBSD/development/CTM/src-cur            src-cur.11700.gz
> /pub/FreeBSD/development/CTM/svn-cur            svn-cur.03024.xz
> /pub/FreeBSD/development/FreeBSD-SVN            svn-cur 3024 
> 
> 
> I suggest one of us submit this or similar for 'man ctm' FILES section:
> 
> *** 11.0-CURRENT/src/usr.sbin/ctm/ctm/ctm.1	Sat Nov 15 15:34:47 2014
> --- new/src/usr.sbin/ctm/ctm/ctm.1	Sat Nov 15 15:52:38 2014
> ***************
> *** 275,280 ****
> --- 275,290 ----
>   Changing
>   or removing this file will greatly confuse
>   .Nm .
> + .sp
> + .Pa .svn_revision
> + contains the revision number emitted by SVN 
> + .\" eg from approx
> + .\"	svn export file:///usr/svn/base/head > ../output
> + .\"	tail -1 ../output | sed -e 's/Exported revision //' \
> + .\"	| sed -e 's/.$//' > head/.svn_revision
> + (to reference when discussing sources with users of 
> + .Nm svn
> + direct).
>   .Pp
>   Using the
>   .Fl e
> 
> Cheers,
> Julian
> 

This was the actual code I used to create (for example) src-8.

cd ~library
cd ctm/Temps/FreeBSD-8
svn up src
svn up src | tail -1 | sed -E 's/[^[:digit:]]//g' > src/.svn_revision
cd ~library
ctm/ctm_generation/mkCTM ctm_conf.src-8
/usr/home/library/ctm/bin/create-INDEX

One of us could file a PR with the appropriate changes to the ctm man
page, but all my other PRs for ctm/mkctm have been ignored.

However, I'll add the change to the svn-cur patches.


More information about the ctm-users mailing list