documentation:dev:scm:svk
=>  Releases

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

=>  Events

No events planned

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
documentation:dev:scm:svk [2006/06/06 13:35]
kang added svk script
documentation:dev:scm:svk [2006/06/06 14:12]
kang corrected link
Line 1: Line 1:
-Please read the [[documentation:​dev:​scm:​svn|SVN documentation]] to learn about SVN structure and the RSBAC list of repositories. You will need them for SVK, and SVN is closely tied to SVK. 
  
-===== What is SVK ===== 
- 
-SVK is available from http://​svk.elixus.org/​ 
-It is a "​distributed"​ Version Control tool. 
-It uses FSFS from SVN as it's sublayer. From a 10,000 feet view, SVK allows to checkout any SVN/​CVS/​Perforce/​Git repository to your local machine and commit/​checkout remotely //and// locally, then submit the changes when you are done. So, it allows to work offline. And it allows to work on your very own branches, for testing. 
- 
-From a more technical point of view, SVK is like a repository on your local machine where you have two kinds of sub-repositories:​ Mirrors of SVN/CVS/... or local branches. 
- 
-Here's a diagram showing how this little world works: [[http://​perlcabal.org/​~autrijus/​svk-overview.png|SVK overview diagram.]] 
- 
-===== Getting started, mirroring a repository ===== 
- 
-So let's initialise where to keep the local repository (the depot): 
-<​code>​ 
-# svk depotmap --init 
-</​code>​ 
-You can choose where to put or change the location of this depot with the relocate command: 
-<​code>​ 
-# svk depotmap --relocate /​path/​to/​somewhere 
-</​code>​ 
- 
-You will probably want to make a depot dedicated to RSBAC, so that you can mess with it without destroying other depots. 
-<​code>​ 
-# svk depotmap rsbac /​home/​youruser/​.svk/​rsbac 
-(or anywhere else) 
-</​code>​ 
- 
- 
-We will now mirrors the RSBAC SVN repositories:​ 
- 
-//For anonymous mirroring// 
-<​code>​ 
-# svk mirror svn://​rsbac.org/​rsbac-2.6 /​rsbac/​rsbac-2.6 
-# svk mirror svn://​rsbac.org/​rsbac-admin /​rsbac/​rsbac-admin 
-</​code>​ 
- 
-//For developers with write access// 
-<​code>​ 
-# svn+ssh://<​you@>​rsbac.org/​daten/​subversion/​rsbac-2.6 /​rsbac/​rsbac-2.6 
-# svn+ssh://<​you@>​rsbac.org/​daten/​subversion/​rsbac-2.4 /​rsbac/​rsbac-2.4 
-# svn+ssh://<​you@>​rsbac.org/​daten/​subversion/​rsbac-admin /​rsbac/​rsbac-admin 
-</​code>​ 
- 
-And synchronise it: 
-<​code>​ 
-# svk sync -a 
-</​code>​ 
- 
-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 "​.svn"​ directories or the like. SVK is just flexible. 
- 
-===== 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 ''​%%//​%%''​ path as 
-local depot. (It is automatically created the first time you use SVK) 
-<​code>​ 
-# svk cp /​rsbac/​rsbac-2.6 //​rsbac/​rsbac-2.6 
-</​code>​ 
- 
-You can now checkout "​%%//​%%rsbac/​rsbac-2.6",​ modify, commit (using "svk commit -S", 
-please **never** ever use svn on svk repositories,​ it would corrupt it.) 
- 
-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 ''​smerge''​ and specifying path by hand is 
-prefered. Note that the ''​push''​ command is simply a wrapper around ''​smerge''​. 
- 
-<​code>​ 
-# svk smerge -I //​rsbac/​rsbac-2.6 /​rsbac/​rsbac-2.6 
-</​code>​ 
- 
-//note: IT IS EASY TO SCREW UP WITH PUSH. ONLY USE PUSH IF YOU KNOW WHAT YOU ARE DOING.// 
- 
-Equivalent push command: 
- 
-<​code>​ 
-(from your /​rsbac/​rsbac-2.6 checkout) 
-# svk push 
-(from anywhere) 
-# svk push /​rsbac/​rsbac-2.6 
-</​code>​ 
- 
-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// 
-<​code>​ 
-(from anywhere) 
-# svk pull /​rsbac/​rsbac-2.6 
-(from your /​rsbac/​rsbac-2.6 checkout) 
-# svk pull 
-</​code>​ 
- 
-===== Signing ===== 
-If you are a RSBAC developper, please do not forget to sign every commit made to the mirrored path! 
- 
-Simply add "​-S"​ to every ''​commit'',​ ''​smerge'',​ ''​merge'',​ or other commit-like command. 
-<​code>​ 
-# svk commit -S myfile.c 
-# svk smerge -S ... 
-# svk import -S ... 
-</​code>​ 
- 
-You can verify the signatures with the verify command 
- 
-<​code>​ 
-# svk verify -r REVISION 
-</​code>​ 
- 
-===== Versionning,​ diffs, etc. ===== 
- 
-There are several ways to specify an SVK version (called changeset, revision). 
- 
-Let's take a look at the log: 
- 
-<​code>​ 
-# svk log -r HEAD /​rsbac/​rsbac-2.6 
----------------------------------------------------------------------- 
-r105 (orig r104): ​ kang | 2006-06-01 15:22:12 +0200 
- 
-tagging 1.2.7 release 
----------------------------------------------------------------------- 
-</​code>​ 
- 
-r105 is your local SVK revision number. you can use it anytime, but its only **yours**. 
-r104 is SVN's revision number. If you want to talk about this very change to someone, ​ //PLEASE// give this revision number. 
-r104 is also often seen as r104@ in SVK notation. The ''​@''​ tell you that we 
-are talking about the SVN repository'​s revision number. 
- 
-In short, to see a diff from this change on **your** system: 
-<​code>​ 
-# svk diff -r105:104 
-</​code>​ 
- 
-To see a diff on this change, for anyone you contact (also works for you): 
-<​code>​ 
-# svk diff -r105@:104@ 
-</​code>​ 
- 
-When diffing a file on your filesystem against the SVK (mirrored or local) repository latest'​s version, you can simply do: 
- 
-<​code>​ 
-# svk diff -rBASE:HEAD myfile 
-</​code>​ 
- 
-It will return the changes in the repository, that are not yet in your local file. 
- 
-The reverse, to see what's in your file and not in the repository, is quite easy: 
- 
-<​code>​ 
-# svk diff myfile 
-</​code>​ 
- 
-You can also specify revisions per date: 
- 
-<​code>​ 
-# svk log -r {2005-09-22} 
-</​code>​ 
- 
-===== Ressources ===== 
- 
-For more information,​ see the [[http://​svk.elixus.org|SVK website]], or the very good [[http://​svkbook.elixus.org/​|SVK book]]. 
- 
-You may want to use [[documentation:​dev:​svm:​svk:​script|this small script]] to create/sync svk for you, avoiding most errors, and brainless ;) 
//
documentation/dev/scm/svk.txt · Last modified: 2006/06/06 14:12 by kang

documentation/dev/scm/svk.txt · Last modified: 2006/06/06 14:12 by kang
This website is kindly hosted by m-privacy