Managing repositories

Grigori Fursin edited this page Jun 5, 2018 · 6 revisions

[ Home ]

By default, all repositories are created in a CK directory in a user space (usually $HOME/CK on Linux/MacOS or %USERPROFILE%\CK on Windows).

It is possible to create a new repository (for example, for a new collaborative project or a paper) and register it in the CK via

 $ ck add repo:my-repo --quiet
where my-repo is the user-friendly alias of this repository (note, that CK will also assign a UID to this repository). Option --quiet simply skips various additional questions.

It is possible to check where this repository is physically located using the following command:

 $ ck where repo:my-repo
or via
 $ ck find repo:my-repo

Note, that it is possible to create a CK repository in any directory on a disk and then register it in the CK. Simply open a shell, go to a directory where you want to have a CK repository and then execute the following command:

 $ ck add repo:my-repo --quiet --here

Whenever a new repository is registered in the CK, an entry repo:<new repo alias> is also created in the local CK repository. This entry contains meta information about the new repo including its description and the full path. This allows CK to automatically find entries by searching through all repositories registered in the CK.

You can see all available repositories using:

 ck list repo

Also note that whenever a new repository is added, its path and meta information are also cached in two files in the local repository to considerably speed up the search:

  • .ck.cache_repo_info.json
  • .ck.cache_repo_uoa.json
In case of disk damage or some other issues, it is possible to cache all repositories again via
 $ ck recache repo

It is also possible to pull shared repositories from any Git service or as zip files from websites as described here.

Now, it is possible to add new entries to any available repository. For example, it is possible to add entry xyz for a module test to my-repo simply via

 $ ck add my-repo:test:xyz

It is also possible to unregister repository from CK (repository files will not be deleted - only CK repo description in local repository is deleted) via

 $ ck rm repo:my-repo

It can be useful when you have many repositories with many entries and search becomes slow (and you do not use ElasticSearch to speed up queries). Then you can archive repositories by removing their reference and add them back only when needed!

However, it is also possible to delete the whole repository with all files via:

 ck rm repo:my-repo --all

This is useful when you pull shared GIT repositories and then somehow pollute them so that they can not be updated anymore. Then you can delete repository and pull a new version. For example:

 $ ck rm repo:ck-autotuning --all
 $ ck pull repo:ck-autotuning

Alternatively, you can do it in one action:

 $ ck renew repo:ck-autotuning

Questions and comments

You are welcome to get in touch with the CK community if you have questions or comments!

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.