revert: Revert Lockfile

Description Usage Arguments Details Value Examples

View source: R/history.R

Description

Revert the lockfile to its contents at a prior commit.

Usage

1
revert(commit = "HEAD", ..., project = NULL)

Arguments

commit

The commit associated with a prior version of the lockfile.

...

Optional arguments; currently unused.

project

The project directory. If NULL, then the active project will be used. If no project is currently active, then the current working directory is used instead.

Details

The revert() function is currently only implemented for projects using git for version control.

Value

The commit used when reverting renv.lock. Note that this function is normally called for its side effects.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 

# get history of previous versions of renv.lock in VCS
db <- renv::history()

# choose an older commit
commit <- db$commit[5]

# revert to that version of the lockfile
renv::revert(commit = commit)


## End(Not run)

wnattt/renv documentation built on Dec. 23, 2021, 5:19 p.m.