Re: [Rd] pointers on including SVN revision number in package info?

From: Dirk Eddelbuettel <>
Date: Fri, 06 Jan 2012 15:09:39 -0600

On 6 January 2012 at 20:37, Prof Brian Ripley wrote:
| The Subversion book? The MASS/DESCRIPTION file has
| gannet% svn proplist DESCRIPTION
| Properties on 'DESCRIPTION':
| svn:keywords

Yep, I do the same for the $Date$ property in my DESCRIPTION files. Upon commit of the file (eg when incrementing the minor version), the date gets updated automagically. You have to set the Date property, which even has its own sub-menu if you happen to use the psvn mode under the One True Editor (TM).  

Eg for the most recent Rcpp:

   Date: $Date: 2011-12-25 14:14:33 -0600 (Sun, 25 Dec 2011) $

and the two $ signs give it away if you know these SVN tricks...

| Note this only tracks the version when DESCRIPTION is changed, not what
| anything else is updated. But then I change the DESCRIPTION file
| immediately before release.


The flipside is that you can also add $Revision$, $URL$, ... to each R source file individually, and they all get their own stamps. I luuuv monotonically increasing SVN revs, but some git fanboy will surely chime in within the hour and tell me that I am off my rocker. ;-)  

| > Or can people suggest other useful strategies for keeping track of
| > which development (micro-)version a random user might be working with?

You cannot do something simple

    Version: 0.2.3.$Revision$

because the $ will stay there, as discussed above. But you can filter. In the littler sources we do this with a helper script (which I include below). That gets us this revision display with an autocreated header file:

   edd_at_max:~$ r --version | head -2
   r ('littler') version 0.1.5

              svn revision 185 as of 2011-09-17 09:35:56    edd_at_max:~$

You can use the other magic keywords listed in section "Keyword Substitution" in Chapter 3: "Advanced Topics" of the SVN book which Brian Ripley already pointed to.


"Outside of a dog, a book is a man's best friend. Inside of a dog, it is too
dark to read." -- Groucho Marx

______________________________________________ mailing list
Received on Fri 06 Jan 2012 - 21:14:53 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 06 Jan 2012 - 23:10:07 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive