Skip to content

Commit

Permalink
Merge pull request #54 from jangorecki/packages-fields
Browse files Browse the repository at this point in the history
fields argument to insertPackage, closes #53
  • Loading branch information
eddelbuettel committed Aug 1, 2016
2 parents 0cb0026 + 37a0cb7 commit e81e550
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
9 changes: 5 additions & 4 deletions R/insertPackage.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
##' previous versions), \dQuote{archive} (place any previous versions into
##' a package-specific archive folder, creating such an archive if it does
##' not already exist), or \dQuote{prune} (calling \code{\link{pruneRepo}}).
##' @param ... For the aliases variant, a catch-all collection of
##' parameters.
##' @param ... For \code{insert} the aliases variant, a catch-all collection of
##' parameters. For \code{insertPackage} arguments passed to \code{write_PACKAGES}.
##' @return NULL is returned.
##' @examples
##' \dontrun{
Expand All @@ -48,7 +48,8 @@ insertPackage <- function(file,
repodir=getOption("dratRepo", "~/git/drat"),
commit=FALSE,
pullfirst=FALSE,
action=c("none", "archive", "prune")) {
action=c("none", "archive", "prune"),
...) {

if (!file.exists(file)) stop("File ", file, " not found\n", call.=FALSE)

Expand Down Expand Up @@ -99,7 +100,7 @@ insertPackage <- function(file,
}

## update index
write_PACKAGES(pkgdir, type=pkgtype)
write_PACKAGES(pkgdir, type=pkgtype, ...)

if (commit) {
if (haspkg) {
Expand Down
14 changes: 7 additions & 7 deletions man/insertPackage.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
\usage{
insertPackage(file, repodir = getOption("dratRepo", "~/git/drat"),
commit = FALSE, pullfirst = FALSE, action = c("none", "archive",
"prune"))
"prune"), ...)

insert(...)
}
Expand All @@ -25,14 +25,14 @@ implies the \sQuote{TRUE} values in other contexts.}

\item{pullfirst}{Boolean toggle to call \code{git pull} before inserting the package.}

\item{action}{A character string containing one of: \dQuote{none}
(the default; add the new package into the repo, effectively masking
previous versions), \dQuote{archive} (place any previous versions into
a package-specific archive folder, creating such an archive if it does
\item{action}{A character string containing one of: \dQuote{none}
(the default; add the new package into the repo, effectively masking
previous versions), \dQuote{archive} (place any previous versions into
a package-specific archive folder, creating such an archive if it does
not already exist), or \dQuote{prune} (calling \code{\link{pruneRepo}}).}

\item{...}{For the aliases variant, a catch-all collection of
parameters.}
\item{...}{For \code{insert} the aliases variant, a catch-all collection of
parameters. For \code{insertPackage} it passed to \code{write_PACKAGES}.}
}
\value{
NULL is returned.
Expand Down

0 comments on commit e81e550

Please sign in to comment.