
Relink versions in a resrepo repository
version_relink.RdIf a repository has been cloned, relinks the "versions" directory to the "data" directory according to the version metadata. If a user wishes to move the "versions" directory to a different location (or back to the root of the repository), or repair missing or stale links, this function updates the links and git hooks accordingly.
Arguments
- quiet
If TRUE, the user will not be prompted to backup their data. Default is FALSE.
- resources_path
The path to a directory outside the repository that holds "versions", the directory containing versioned data (or to "versions" itself). If NULL (the default), "versions" is at the root of the repository.
- create
If TRUE, create the versions in use if they are missing (empty). Default is FALSE, which stops instead.
Details
Repositories versioned with older versions of resrepo ignore any file or
directory called versions (the line versions in .gitignore):
version_relink() replaces that line with /versions, which ignores only
the directory at the root, and commits .gitignore when on a branch and
that change can be committed on its own.
The versions in use (in data/version_meta/raw_in_use.meta and
intermediate_in_use.meta) must be in the versions directory: if any is
missing (e.g. a mistyped resources_path, or data not yet copied there),
version_relink() stops, unless create = TRUE, which creates them empty.