[Distr-commits] r686 - in branches/distr-2.3/pkg: SweaveListingUtils SweaveListingUtils/man distr distr/man distrDoc distrDoc/man distrEllipse distrEllipse/man distrEx distrEx/man distrMod distrMod/man distrSim distrSim/man distrTEst distrTEst/man distrTeach distrTeach/man startupmsg utils

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Oct 20 15:06:28 CEST 2010


Author: ruckdeschel
Date: 2010-10-20 15:06:27 +0200 (Wed, 20 Oct 2010)
New Revision: 686

Modified:
   branches/distr-2.3/pkg/SweaveListingUtils/DESCRIPTION
   branches/distr-2.3/pkg/SweaveListingUtils/man/0SweaveListingUtils-package.Rd
   branches/distr-2.3/pkg/distr/DESCRIPTION
   branches/distr-2.3/pkg/distr/man/0distr-package.Rd
   branches/distr-2.3/pkg/distrDoc/DESCRIPTION
   branches/distr-2.3/pkg/distrDoc/man/0distrDoc-package.Rd
   branches/distr-2.3/pkg/distrEllipse/DESCRIPTION
   branches/distr-2.3/pkg/distrEllipse/man/0distrEllipse-package.Rd
   branches/distr-2.3/pkg/distrEx/DESCRIPTION
   branches/distr-2.3/pkg/distrEx/man/0distrEx-package.Rd
   branches/distr-2.3/pkg/distrMod/DESCRIPTION
   branches/distr-2.3/pkg/distrMod/man/0distrMod-package.Rd
   branches/distr-2.3/pkg/distrSim/DESCRIPTION
   branches/distr-2.3/pkg/distrSim/man/0distrSim-package.Rd
   branches/distr-2.3/pkg/distrTEst/DESCRIPTION
   branches/distr-2.3/pkg/distrTEst/man/0distrTEst-package.Rd
   branches/distr-2.3/pkg/distrTeach/DESCRIPTION
   branches/distr-2.3/pkg/distrTeach/man/0distrTeach-package.Rd
   branches/distr-2.3/pkg/startupmsg/DESCRIPTION
   branches/distr-2.3/pkg/utils/DESCRIPTIONutils.R
   branches/distr-2.3/pkg/utils/setNewVersion.r
Log:
DESCRIPTION files and package-help files gain a tag SVNRevision to be filled by get[All]RevNr.R from utils in distr
correspondingly DESCRIPTIONutils and setNewVersion.r from utils are extended for this purpose

Modified: branches/distr-2.3/pkg/SweaveListingUtils/DESCRIPTION
===================================================================
--- branches/distr-2.3/pkg/SweaveListingUtils/DESCRIPTION	2010-10-20 12:00:35 UTC (rev 685)
+++ branches/distr-2.3/pkg/SweaveListingUtils/DESCRIPTION	2010-10-20 13:06:27 UTC (rev 686)
@@ -15,3 +15,4 @@
 Date: 2009-11-01
 LastChangedDate: {$LastChangedDate$}
 LastChangedRevision: {$LastChangedRevision$}
+SVNRevision: 684

Modified: branches/distr-2.3/pkg/SweaveListingUtils/man/0SweaveListingUtils-package.Rd
===================================================================
--- branches/distr-2.3/pkg/SweaveListingUtils/man/0SweaveListingUtils-package.Rd	2010-10-20 12:00:35 UTC (rev 685)
+++ branches/distr-2.3/pkg/SweaveListingUtils/man/0SweaveListingUtils-package.Rd	2010-10-20 13:06:27 UTC (rev 686)
@@ -20,6 +20,7 @@
 Depends: \tab R(>= 2.10.0), startupmsg \cr
 LazyLoad: \tab yes \cr
 License: \tab LGPL-3 \cr
+SVNRevision: \tab 684  \cr
 }
 
 TeX-package \file{listings}, confer \url{http://www.ctan.org/tex-archive/macros/latex/contrib/listings/},

Modified: branches/distr-2.3/pkg/distr/DESCRIPTION
===================================================================
--- branches/distr-2.3/pkg/distr/DESCRIPTION	2010-10-20 12:00:35 UTC (rev 685)
+++ branches/distr-2.3/pkg/distr/DESCRIPTION	2010-10-20 13:06:27 UTC (rev 686)
@@ -14,3 +14,4 @@
 URL: http://distr.r-forge.r-project.org/
 LastChangedDate: {$LastChangedDate$}
 LastChangedRevision: {$LastChangedRevision$}
+SVNRevision: 684
\ No newline at end of file

Modified: branches/distr-2.3/pkg/distr/man/0distr-package.Rd
===================================================================
--- branches/distr-2.3/pkg/distr/man/0distr-package.Rd	2010-10-20 12:00:35 UTC (rev 685)
+++ branches/distr-2.3/pkg/distr/man/0distr-package.Rd	2010-10-20 13:06:27 UTC (rev 686)
@@ -50,6 +50,7 @@
 LazyLoad: \tab yes \cr
 License: \tab LGPL-3 \cr
 URL: \tab http://distr.r-forge.r-project.org/\cr
+SVNRevision: \tab 684  \cr
 }}
 
 

Modified: branches/distr-2.3/pkg/distrDoc/DESCRIPTION
===================================================================
--- branches/distr-2.3/pkg/distrDoc/DESCRIPTION	2010-10-20 12:00:35 UTC (rev 685)
+++ branches/distr-2.3/pkg/distrDoc/DESCRIPTION	2010-10-20 13:06:27 UTC (rev 686)
@@ -14,3 +14,4 @@
 URL: http://distr.r-forge.r-project.org/
 LastChangedDate: {$LastChangedDate$}
 LastChangedRevision: {$LastChangedRevision$}
+SVNRevision: 684
\ No newline at end of file

Modified: branches/distr-2.3/pkg/distrDoc/man/0distrDoc-package.Rd
===================================================================
--- branches/distr-2.3/pkg/distrDoc/man/0distrDoc-package.Rd	2010-10-20 12:00:35 UTC (rev 685)
+++ branches/distr-2.3/pkg/distrDoc/man/0distrDoc-package.Rd	2010-10-20 13:06:27 UTC (rev 686)
@@ -21,6 +21,7 @@
 LazyLoad: \tab yes \cr
 License: \tab LGPL-3 \cr
 URL: \tab http://distr.r-forge.r-project.org/\cr
+SVNRevision: \tab 684  \cr
 }}
 
 

Modified: branches/distr-2.3/pkg/distrEllipse/DESCRIPTION
===================================================================
--- branches/distr-2.3/pkg/distrEllipse/DESCRIPTION	2010-10-20 12:00:35 UTC (rev 685)
+++ branches/distr-2.3/pkg/distrEllipse/DESCRIPTION	2010-10-20 13:06:27 UTC (rev 686)
@@ -13,3 +13,4 @@
 Encoding: latin1
 LastChangedDate: {$LastChangedDate: 2009-03-31 15:31:30 +0200 (Di, 31 Mrz 2009) $}
 LastChangedRevision: {$LastChangedRevision: 447 $}
+SVNRevision: 684
\ No newline at end of file

Modified: branches/distr-2.3/pkg/distrEllipse/man/0distrEllipse-package.Rd
===================================================================
--- branches/distr-2.3/pkg/distrEllipse/man/0distrEllipse-package.Rd	2010-10-20 12:00:35 UTC (rev 685)
+++ branches/distr-2.3/pkg/distrEllipse/man/0distrEllipse-package.Rd	2010-10-20 13:06:27 UTC (rev 686)
@@ -19,6 +19,7 @@
 LazyLoad: \tab yes \cr
 License: \tab LGPL-3 \cr
 URL: \tab http://distr.r-forge.r-project.org/\cr
+SVNRevision: \tab 684  \cr
 }
 }
 \section{Classes}{

Modified: branches/distr-2.3/pkg/distrEx/DESCRIPTION
===================================================================
--- branches/distr-2.3/pkg/distrEx/DESCRIPTION	2010-10-20 12:00:35 UTC (rev 685)
+++ branches/distr-2.3/pkg/distrEx/DESCRIPTION	2010-10-20 13:06:27 UTC (rev 686)
@@ -13,3 +13,4 @@
 URL: http://distr.r-forge.r-project.org/
 LastChangedDate: {$LastChangedDate$}
 LastChangedRevision: {$LastChangedRevision$}
+SVNRevision: 684
\ No newline at end of file

Modified: branches/distr-2.3/pkg/distrEx/man/0distrEx-package.Rd
===================================================================
--- branches/distr-2.3/pkg/distrEx/man/0distrEx-package.Rd	2010-10-20 12:00:35 UTC (rev 685)
+++ branches/distr-2.3/pkg/distrEx/man/0distrEx-package.Rd	2010-10-20 13:06:27 UTC (rev 686)
@@ -32,6 +32,7 @@
 LazyLoad: \tab yes \cr
 License: \tab LGPL-3 \cr
 URL: \tab http://distr.r-forge.r-project.org/\cr
+SVNRevision: \tab 684  \cr
 }
 }
 \section{Classes}{

Modified: branches/distr-2.3/pkg/distrMod/DESCRIPTION
===================================================================
--- branches/distr-2.3/pkg/distrMod/DESCRIPTION	2010-10-20 12:00:35 UTC (rev 685)
+++ branches/distr-2.3/pkg/distrMod/DESCRIPTION	2010-10-20 13:06:27 UTC (rev 686)
@@ -12,3 +12,4 @@
 URL: http://distr.r-forge.r-project.org/
 LastChangedDate: {$LastChangedDate$}
 LastChangedRevision: {$LastChangedRevision$}
+SVNRevision: 684
\ No newline at end of file

Modified: branches/distr-2.3/pkg/distrMod/man/0distrMod-package.Rd
===================================================================
--- branches/distr-2.3/pkg/distrMod/man/0distrMod-package.Rd	2010-10-20 12:00:35 UTC (rev 685)
+++ branches/distr-2.3/pkg/distrMod/man/0distrMod-package.Rd	2010-10-20 13:06:27 UTC (rev 686)
@@ -21,6 +21,7 @@
 LazyLoad: \tab yes \cr
 License: \tab LGPL-3 \cr
 URL: \tab http://distr.r-forge.r-project.org/\cr
+SVNRevision: \tab 684  \cr
 }}
 
 \section{Classes}{

Modified: branches/distr-2.3/pkg/distrSim/DESCRIPTION
===================================================================
--- branches/distr-2.3/pkg/distrSim/DESCRIPTION	2010-10-20 12:00:35 UTC (rev 685)
+++ branches/distr-2.3/pkg/distrSim/DESCRIPTION	2010-10-20 13:06:27 UTC (rev 686)
@@ -13,3 +13,4 @@
 URL: http://distr.r-forge.r-project.org/
 LastChangedDate: {$LastChangedDate$}
 LastChangedRevision: {$LastChangedRevision$}
+SVNRevision: 684

Modified: branches/distr-2.3/pkg/distrSim/man/0distrSim-package.Rd
===================================================================
--- branches/distr-2.3/pkg/distrSim/man/0distrSim-package.Rd	2010-10-20 12:00:35 UTC (rev 685)
+++ branches/distr-2.3/pkg/distrSim/man/0distrSim-package.Rd	2010-10-20 13:06:27 UTC (rev 686)
@@ -20,6 +20,7 @@
 LazyLoad: \tab yes \cr
 License: \tab LGPL-3 \cr
 URL: \tab http://distr.r-forge.r-project.org/\cr
+SVNRevision: \tab 684  \cr
 }
 }
 \section{Classes}{

Modified: branches/distr-2.3/pkg/distrTEst/DESCRIPTION
===================================================================
--- branches/distr-2.3/pkg/distrTEst/DESCRIPTION	2010-10-20 12:00:35 UTC (rev 685)
+++ branches/distr-2.3/pkg/distrTEst/DESCRIPTION	2010-10-20 13:06:27 UTC (rev 686)
@@ -15,3 +15,4 @@
 URL: http://distr.r-forge.r-project.org/
 LastChangedDate: {$LastChangedDate$}
 LastChangedRevision: {$LastChangedRevision$}
+SVNRevision: 684

Modified: branches/distr-2.3/pkg/distrTEst/man/0distrTEst-package.Rd
===================================================================
--- branches/distr-2.3/pkg/distrTEst/man/0distrTEst-package.Rd	2010-10-20 12:00:35 UTC (rev 685)
+++ branches/distr-2.3/pkg/distrTEst/man/0distrTEst-package.Rd	2010-10-20 13:06:27 UTC (rev 686)
@@ -22,6 +22,7 @@
 LazyLoad: \tab yes \cr
 License: \tab LGPL-3 \cr
 URL: \tab http://distr.r-forge.r-project.org/\cr
+SVNRevision: \tab 684  \cr
 }}
 \section{Classes}{
 \preformatted{

Modified: branches/distr-2.3/pkg/distrTeach/DESCRIPTION
===================================================================
--- branches/distr-2.3/pkg/distrTeach/DESCRIPTION	2010-10-20 12:00:35 UTC (rev 685)
+++ branches/distr-2.3/pkg/distrTeach/DESCRIPTION	2010-10-20 13:06:27 UTC (rev 686)
@@ -14,3 +14,4 @@
 Packaged: Fri Jun 8 00:12:57 2007; Peter
 LastChangedDate: {$LastChangedDate$}
 LastChangedRevision: {$LastChangedRevision$}
+SVNRevision: 684

Modified: branches/distr-2.3/pkg/distrTeach/man/0distrTeach-package.Rd
===================================================================
--- branches/distr-2.3/pkg/distrTeach/man/0distrTeach-package.Rd	2010-10-20 12:00:35 UTC (rev 685)
+++ branches/distr-2.3/pkg/distrTeach/man/0distrTeach-package.Rd	2010-10-20 13:06:27 UTC (rev 686)
@@ -27,6 +27,7 @@
 LazyLoad: \tab yes \cr
 License: \tab LGPL-3 \cr
 URL: \tab http://distr.r-forge.r-project.org/\cr
+SVNRevision: \tab 684  \cr
 }
 }
 \section{Classes}{

Modified: branches/distr-2.3/pkg/startupmsg/DESCRIPTION
===================================================================
--- branches/distr-2.3/pkg/startupmsg/DESCRIPTION	2010-10-20 12:00:35 UTC (rev 685)
+++ branches/distr-2.3/pkg/startupmsg/DESCRIPTION	2010-10-20 13:06:27 UTC (rev 686)
@@ -11,3 +11,4 @@
 License: LGPL-3
 LastChangedDate: {$LastChangedDate$}
 LastChangedRevision: {$LastChangedRevision$}
+SVNRevision: 684

Modified: branches/distr-2.3/pkg/utils/DESCRIPTIONutils.R
===================================================================
--- branches/distr-2.3/pkg/utils/DESCRIPTIONutils.R	2010-10-20 12:00:35 UTC (rev 685)
+++ branches/distr-2.3/pkg/utils/DESCRIPTIONutils.R	2010-10-20 13:06:27 UTC (rev 686)
@@ -1,5 +1,7 @@
 ### some utils for unified treatment of DESCRIPTION files from R
 
+source("C:/rtest/distr/branches/distr-2.3/pkg/utils/getRevNr.R")
+
 updatePackageHelp <- function(package){
   if(file.exists(file.path(package, "DESCRIPTION"))){
   DFF    <-  read.dcf(file = file.path(package, "DESCRIPTION"))
@@ -14,7 +16,7 @@
      df0 <- gsub(liS, reS,dfile)
      return(df0)}
   PFc    <-  PF
-  s <- sapply(c("Package","Version","Date","Depends","LazyLoad","License"),
+  s <- sapply(c("Package","Version","Date","Depends","LazyLoad","License","SVNRevision"),
               function(x){ PFca <- replaceField(field=x,dfile=PFc)
                            PFc <<- PFca
                            return(NA)})
@@ -26,11 +28,20 @@
 
 changeDescription <- function(startDir, names, values, 
                               pkgs = NULL, 
+                              withSVNread = TRUE,
                               withPackageHelpUpdate = TRUE){
   oldDir <- getwd()
   on.exit(setwd(oldDir))
   setwd(startDir)
+  if(withSVNread){
+      svn <- getRevAllNr(startDir,list="max")
+      svnrev <- svn[[1]]
+      if("SVNRevision" %in% names){
+         values[which(names=="SVNRevsion")] <- svnrev
+      }
+  }
   
+  
   if(is.matrix(values) && is.null(colnames(values))) 
      colnames(values) <- rep(pkgs, length.out = ncol(values))
      

Modified: branches/distr-2.3/pkg/utils/setNewVersion.r
===================================================================
--- branches/distr-2.3/pkg/utils/setNewVersion.r	2010-10-20 12:00:35 UTC (rev 685)
+++ branches/distr-2.3/pkg/utils/setNewVersion.r	2010-10-20 13:06:27 UTC (rev 686)
@@ -1,35 +1,41 @@
+source("C:/rtest/distr/branches/distr-2.3/pkg/utils/getRevNr.R")
+#
 setNewversion <- function(
               dev.dir = "C:/rtest/",
               packs = c("startupmsg",
+                        "SweaveListingUtils",
                         "distr",
                         "distrEx",
                         "distrDoc",
+                        "distrMod",
                         "distrSim", 
                         "distrTEst", 
                         "distrTeach", 
-                        "distrMod", 
+                        "distrEllipse",
                         "robKalman", 
-                        "Benchmark",
+#                        "Benchmark",
+                        "RandVar",
                         "RobAStBase",
-                        "RandVar",
                         "ROptEst",
                         "RobLox",
-                        "RobRex",
-                        "ROptRegTS"), 
-              packs.dir = paste(dev.dir, c(rep("distr/pkg",8),
+                        "RobRex"
+                        "RobLoxBioC",
+                        "ROptEstOld",
+                        "ROptRegTS",
+                        ), 
+              svnrepos =  paste(dev.dir, c(rep("distr",10),"robkalman",
+                                rep(RobASt",8)), sep=""),
+              packs.dir = paste(dev.dir, c(rep("distr/pkg",10),
                                "robKalman/pkg","",
-                               rep("RobASt/pkg",6)), sep=""), 
-              packs.ver = c("0.5", rep("2.0",7),"0.2","2.4",
-                            "0.1.0","0.6.3","0.6.0",
-                            "0.6.0", "0.6.0", "0.5.0",
-                            "0.5.0"),          
-              packs.gtR = c(rep("2.2.0",8),"2.3.0","","2.6.0",
-                            "2.4.0","2.4.0","2.6.0","2.4.0","2.4.0"),
+                               rep("RobASt/pkg",8)), sep=""), 
+              packs.ver = c("0.5", "0.8", rep("2.3",8),"0.4",rep("0.8",8),          
+              packs.gtR = c("1.8.0","2.10.0","2.2.0",rep("2.6.0",9),"2.6.0",
+              rep("2.7.0",4),"2.4.0","2.8.1","2.4.0","2.4.0"),
               withHTML = TRUE, 
-              packs.HTML.dir = c("", paste(dev.dir, 
-                     c(rep("distr/www",7),"robKalman/www"),
+              packs.HTML.dir = c("", "", paste(dev.dir, 
+                     c(rep("distr/www",8),"robKalman/www"),
                                       sep=""),"",
-                     paste(dev.dir, c(rep("RobASt/www",6)), sep="")),
+                     paste(dev.dir, c(rep("RobASt/www",8)), sep="")),
               rkurs = TRUE,
               rkursDir = "D:/Eigene Dateien/Arbeit/R-Kurs/"
                            )
@@ -57,6 +63,8 @@
 for(i in 1:length(packs))
    {
     setwd(packs.dir[i])
+    svn <- getRevAllNr(packs.dir[i],list="max")
+    svnrev <- svn[[1]]
     
     #DESCRIPTION file
     xx <-  readLines(paste(packs[i],"/DESCRIPTION",sep=""))
@@ -68,6 +76,7 @@
     gtR <- packs.gtR[i]
 
     xx <- gsub("^Version: .*", paste("Version:", pk),xx)
+    xx <- gsub("^SVNRevision: .*$", paste("SVNRevision: ", sverev),xx)
 
     writeLines(xx, con=paste(packs[i],"/DESCRIPTION",sep=""))
 
@@ -77,10 +86,13 @@
     if (file.exists(paste(packs[i],"/man/",fdx,sep="")))                  
      { yy <-  readLines(paste(packs[i],"/man/",fdx,sep=""))
     
-       yy <- gsub("Version: \\\\tab .*\\\\cr", 
+       yy <- gsub("Version: \\\\tab .*\\\\cr$", 
                     paste("Version: \\\\tab", pk, "\\\\cr"), yy)
 
-       yy <- gsub("Date: \\\\tab .*\\\\cr", 
+       yy <- gsub("SVNRevision: \\\\tab .*\\\\cr$", 
+                    paste("SVNRevision: \\\\tab", svnrev, "\\\\cr"), yy)
+
+       yy <- gsub("Date: \\\\tab .*\\\\cr$", 
                     paste("Date: \\\\tab", mydate, "\\\\cr"), yy)
        
        writeLines(yy, con=paste(packs[i],"/man/",fdx,sep=""))



More information about the Distr-commits mailing list