Skip to content

CTU-Bern/svn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

svn

Interface between R and SVN to get info on repo status.

Installation

# if you do not have devtools installed
# install.packages("devtools", dependencies=TRUE)
# install svn package
devtools::install_github("CTU-Bern/svn")
# or from the universe (does not require devtools)
install.packages('svn', repos = 'https://ctu-bern.r-universe.dev')

Testing/Development

devtools::document(".")
# devtools::test(".") # tests not really possible as not transferrable to other machines
devtools::install()

NOTE: due to external software requirements (SVN and a suitable repo), examples do not work and the package is not fully tested

Usage

# return details of current wirking directory in a format that could be used in a report
svn_details()
# return lists of file status (added, modified, etc)
svn_state()
# same as above, but with a list of the ignored files too
svn_state(ignored = TRUE)
# return a list of conflicted files
svn_conflict()
# the log
svn_log()
# revision number
svn_revnum()

The functions also allow multiple repositories to be queried simultaneously (useful for e.g. externals).

repos <- c("path_to_repo1", "path_to_repo2", "path_to_repo3")
# return details of current wirking directory
svn_details(repos)
# return lists of file status (added, modified, etc)
svn_state(repos)
# same as above, but with a list of the ignored files too
svn_state(repos, ignored = TRUE)
# return a list of conflicted files
svn_conflict(repos)
# the log
svn_log(repos)
# revision number
svn_revnum(repos)

Releases

No releases published

Packages

No packages published

Languages