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

From: Roger Bivand <Roger.bivand_at_nhh.no>
Date: Sat, 07 Jan 2012 13:10:49 +0000

Ben Bolker <bbolker <at> gmail.com> writes:

>
>
> I'm trying to keep debugging of a development package relatively sane.
>
...
>
> Or can people suggest other useful strategies for keeping track of
> which development (micro-)version a random user might be working with?
>

Rather than update the DESCRIPTION file, rgeos includes the SVN revision in the startup messages, by copying in ./configure (here ./configure.in):

if test -e ".svn" ; then
  svnversion -n > inst/SVN_VERSION
fi

and testing for the file in R/AAA.R:

  fn <- system.file("SVN_VERSION", package="rgeos")   if (file.exists(fn)) {
    svn_version <- scan(system.file("SVN_VERSION", package="rgeos"),       what=character(1), sep="\n", quiet=TRUE)   } else {
    svn_version <- "(unknown)"
  }

Clunky, and inst/SVN_VERSION isn't in svn itself, but it does work if the build machine uses SVN and is up-to-date. I think I'll try to use the DESCRIPTION Revision tag too. Naturally, this is feasible in packages using ./configure already. The package is on R-Forge, so the implicated files can be browsed online.

Roger

> thanks,
> Ben Bolker
>
>



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Sat 07 Jan 2012 - 13:13:56 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 Mon 09 Jan 2012 - 00:30:07 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive