Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fields argument to insertPackage, closes #53 #54

Merged
merged 1 commit into from
Aug 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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