Description Usage Arguments Details Value
new_state
creates a new state
object and
assigns the default values to all its attributes.
state_reset
assign default values to all attributes
of the state
object.
pick_branch
implements the logic of choosing the commit
to attach to.
interactions
creates an object with a number of callbacks
to be used when decision can be delegated to the user. It provides default
implementations which either make the most straightforwards decision or
abort the call with a descriptive user message.
Provided callbacks:
create_first_commit
to decide whether load the contents or R session
into an empty repository as its first commit
create_repository
to decide if a new repository should be created
clean_env
to decide if objects in the global environment should be
removed in order to attach to repository
choose_commit
when there are multiple commits matching global environment
choose_branch
when there is more than one branch and global environment
is empty
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | new_state()
is_state(x)
state_reset(state)
open_repository(state, x, int = interactions())
pick_branch(state, env, int = interactions())
interactions(create_first_commit, create_repository, clean_env,
choose_commit, choose_branch)
start_tracking(state, callback_name)
stop_tracking(state)
|
x |
a repository::repository object or a directory path for the new/existing repository; or object to be tested. |
state |
state object (environment). |
int |
an interactions object. |
env |
environment used to find the branch to attach to. |
create_first_commit |
callback function |
create_repository |
callback function |
clean_env |
callback function |
choose_commit |
callback function |
choose_branch |
callback function |
callback_name |
passed to addTaskCallback as |
a repository::repository()
object
id of the callback passed to addTaskCallback
open_repository
returns the state
object.
pick_branch
returns the identifier of the commit pulled into
R session.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.