Current version
Git/Latestdiff: 1.5.6
Latest Snapshots
Produced after each commit or rebase to new upstream version
GIT
RSBAC source code, can be unstable sometimes
No events planned
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
documentation:svk [2006/06/02 10:27] – updated to new repo layout kang | documentation:svk [2006/06/02 11:02] (current) – removed kang | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== What is SVK ===== | ||
- | SVK is available from http:// | ||
- | It is a " | ||
- | It uses FSFS from SVN as it's sublayer. From a 10,000 feet view, SVK allows to checkout any SVN/ | ||
- | |||
- | From a more technical point of view, SVK is like a repository on your local machine where you have two kinds of sub-repositories: | ||
- | |||
- | Here's a diagram showing how this little world works: [[http:// | ||
- | |||
- | ===== Getting started, mirroring a repository ===== | ||
- | |||
- | So let's initialise where to keep the local repository (the depot): | ||
- | < | ||
- | # svk depotmap --init | ||
- | </ | ||
- | You can choose where to put or change the location of this depot with the relocate command: | ||
- | < | ||
- | # svk depotmap --relocate / | ||
- | </ | ||
- | |||
- | You will probably want to make a depot dedicated to RSBAC, so that you can mess with it without destroying other depots. | ||
- | < | ||
- | # svk depotmap rsbac / | ||
- | (or anywhere else) | ||
- | </ | ||
- | |||
- | |||
- | We will now mirrors the RSBAC SVN repositories: | ||
- | |||
- | //For anonymous mirroring// | ||
- | < | ||
- | # svk mirror svn:// | ||
- | # svk mirror svn:// | ||
- | </ | ||
- | |||
- | //For developers with write access// | ||
- | < | ||
- | # svn+ssh://< | ||
- | # svn+ssh://< | ||
- | # svn+ssh://< | ||
- | </ | ||
- | |||
- | And synchronise it: | ||
- | < | ||
- | # svk sync -a | ||
- | </ | ||
- | |||
- | When committing or using this path directly, changes will affect the real SVN repository directly, much like using SVN would do. | ||
- | |||
- | Whenever you want to checkout this path, just do it. You can delete the files afterwards and check them out again, or you can simply update then. There will be no " | ||
- | |||
- | ===== Making a local branch, working offline ===== | ||
- | |||
- | To work offline or just do your stuff without modifying the official repository directly, you've to create a local branch. Once you are done with your work you can commit it to the mirrored path, or create a patch if you have no write access (and send it to us :-)) | ||
- | Basically the repository already lives on your harddrive so just make this branch whenever you are really offline, or have no write access. | ||
- | |||
- | So, create a directory for the local branches, and create your branch (example | ||
- | for the 2.6 RSBAC kernel). With SVK, the convention is to use the ''//'' | ||
- | local depot. (It is automatically created the first time you use SVK) | ||
- | < | ||
- | # svk cp / | ||
- | </ | ||
- | |||
- | You can now checkout " | ||
- | please **never** ever use svn on svk repositories, | ||
- | |||
- | Once done, you have to merge back your local branch to the mirrored path (this | ||
- | will commit your changes to the real SVN repository). This is called pushing. | ||
- | However, for safety concerns, using '' | ||
- | prefered. Note that the '' | ||
- | |||
- | < | ||
- | # svk smerge -I // | ||
- | </ | ||
- | |||
- | //note: IT IS EASY TO SCREW UP WITH PUSH. ONLY USE PUSH IF YOU KNOW WHAT YOU ARE DOING.// | ||
- | |||
- | Equivalent push command: | ||
- | |||
- | < | ||
- | (from your / | ||
- | # svk push | ||
- | (from anywhere) | ||
- | # svk push / | ||
- | </ | ||
- | |||
- | You can also get the changes from the mirror to update your local branch with | ||
- | the upstream mirrored repository: | ||
- | |||
- | //note: AGAIN, IT IS EASY TO SCREW UP WITH PULL. ONLY USE PULL IF YOU KNOW WHAT YOU ARE DOING.// | ||
- | //To be safe, always specify the path to pull to instead of invoking pull from the checkout// | ||
- | < | ||
- | (from anywhere) | ||
- | # svk pull / | ||
- | (from your / | ||
- | # svk pull | ||
- | </ | ||
- | |||
- | ===== Signing ===== | ||
- | If you are a RSBAC developper, please do not forget to sign every commit made to the mirrored path! | ||
- | |||
- | Simply add " | ||
- | < | ||
- | # svk commit -S myfile.c | ||
- | </ | ||
- | |||
- | You can verify those signatures with the verify command | ||
- | |||
- | < | ||
- | # svk verify -r REVISION | ||
- | </ | ||
- | |||
- | ===== Versionning, | ||
- | |||
- | There are several ways to specify an SVK version. | ||
- | Let's take a look at the log: | ||
- | < | ||
- | # svk log -r HEAD //rsbac1 | ||
- | ---------------------------------------------------------------------- | ||
- | r220 (orig r208): | ||
- | |||
- | kang: added possibility to change the default branch (SVKDEFBRANCH=linux-rsbac-1 | ||
- | .2|linux-rsbac) | ||
- | ---------------------------------------------------------------------- | ||
- | </ | ||
- | |||
- | r220 is your local SVK revision number. you can use it anytime, but its only **yours**. | ||
- | r208 is SVN's revision number. If you want to talk about this very change to someone, | ||
- | |||
- | In short, to see a diff from this change on **your** system: | ||
- | < | ||
- | # svk diff -r220:219 | ||
- | </ | ||
- | |||
- | To see a diff on this change, for anyone, including you: | ||
- | < | ||
- | # svk diff -r208@:207@ | ||
- | </ | ||
- | |||
- | See the " | ||
- | |||
- | When diffing a file on your filesystem against the mirrored repository latest' | ||
- | |||
- | < | ||
- | # svk diff -rBASE:HEAD myfile | ||
- | </ | ||
- | |||
- | It will return the changes in the mirrored repository, not yet in your local file. | ||
- | |||
- | The reverse, to see what's in your file and not in the repository, is quite easy: | ||
- | |||
- | < | ||
- | # svk diff myfile | ||
- | </ | ||
- | |||
- | You can also specify revision per date: | ||
- | |||
- | < | ||
- | # svk log -r {2005-09-22} | ||
- | </ | ||
- | |||
- | |||
- | ===== Ressources ===== | ||
- | |||
- | For more information, |