rc_adapter_get_version: Retrieves current RC version number for working copy at...

Description Usage Arguments Value See Also Examples

Description

Retrieves current RC version number for working copy at directory passed.

Usage

1

Arguments

rc_adapter

rc adapter object

dir

path to the directory to get the version for. The folder must exist (type: character)

Value

named list with following entries:

has_changes

TRUE if changes detected by RC in the directory. (type: logical)

revision

revision reported by RC. (type: character)

latest

the latest revision reported by RC at the repository. (type: character)

See Also

Other in extending RSuite with RC adapter: rc_adapter_create_base, rc_adapter_is_under_control, rc_adapter_pkg_struct_add, rc_adapter_prj_struct_add, rc_adapter_remove_admins

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# create you own RC adapter
rc_adapter_create_own <- function() {
  result <- rc_adapter_create_base("Own")
  class(result) <- c("rc_adapter_own", class(result))
  return(result)
}

#' @export
rc_adapter_get_version.rc_adapter_own <- function(rc_adapter, dir) {
  # ... detect if working copy is consistent with repository state ...
  return(list(has_changes = TRUE,
              revision = "0.0",
              latest = FALSE))
}

RSuite documentation built on June 10, 2019, 5:03 p.m.