Svk
From TLUGWiki
First off, read svn and understand that :)
Contents |
[edit] Introduction to svk
The following introduction is taken from the "svk help intro" page:
Introduction to svk:
svk is an open source distributed version control system which is designed to interoperate with Subversion. Like other version control systems, it keeps track of each change you make to a project and allows you to maintain multiple parallel tracks of development. svk also has a number of powerful features which are rarely found in other version control systems.
svk has been designed from the ground up to support development models that are simple and intuitive for software developers. It has advanced smart branching and merging semantics that make it easy to maintain multiple parallel lines of development and painless to merge changes across branches. svk's built in patch manager makes it easy for non-committers to share changes among themselves and with project maintainers
svk provides powerful support for distributed development. Every svk client is capable of fully mirroring remote Subversion repositories so that you have full access to a project's history at any time, even when they are off the network or on the wrong side of a firewall. You can branch a remote project at any point in that project's history, whether or not you have write access to that project's repository. Later, you can integrate changes from the project's master server (usually with a single command) or push your branch up to another Subversion repository.
[edit] Benefits of svk
- svk is built to interoperate with svn and as such, has all the bebfits that svn has.
- The underlying core source control system is virtually independant from svk. This means that you possibly could use:
- No annoying .svn or CVS directories in the source tree you are modifying. All that information is located in a central point in your "svk depot", generally located in ~/.svk
- You are able to work in a disconnected mode and then only commit the changes you have made with the associated commit logs when you have connectivity again
- You have the ability to manage patches and create them instead of actually commiting to the repository. A further enhancement is that you can email the patches to the project maintainer automatically.
- There are a host of other really funky features...
[edit] But why use svk?
Apart from the benefits offered, svk is a solid system and combined two paradigms of source control, Patch-based and revision-based source control.
An even more impressive reason is that you can choose what to use where and you can even create a "commit farm" where the server you commit to commits it's changes automatically to another server etc....
All in all, it is the only source control system that I know of that gives you this power. Remember, svn was designed to replace cvs. svk takes svn and converts it into a serious source control system.
[edit] Example usage of svk
This example is taken from the intro help page. It is really all you need to know to use svk in the most basic fashion. An extra thing to note is that these commands can be simplified by dropping the //local/project_x if you are in the tree of the project's source.
GETTING STARTED
svk has a rich command line interface that can be somewhat daunting at first. the following few commands are all you'll need for day to day operation.
svk mirror
First, you'll need to mirror a remote repository. This sets up a local copy of that repository for you to branch from, merge to and otherwise poke at. The local path is sometimes called a "depot path."
# This command sets up the mirror directory for your local # mirrors of remote repositories svk mkdir //mirror
svk mirror svn://svn.example.com/project_x //mirror/project_x
svk sync
When you've set up a new mirror or want to get some work done without a network connection, sync your local repository with upstream repositories.
svk sync //mirror/project_x
svk copy
After that, it's easy to copy remote branches to create local branches. (svk branches are simply directories, just like Subversion branches.)
# This command sets up a directory for your local branches. # Local branches can't live inside mirrored paths svk mkdir //local
svk copy //mirror/project_x //local/project_x
svk checkout
When you want to get some work done, you can checkout a working copy to make local changes.
cd ~/svk-checkouts svk co //local/project_x
svk add, svk delete and svk move
As you work on the files in your working copy, feel free to add new files, delete existing files and move files around.
cd ~/svk-checkouts/project_x
svk add Changelog svk move badly_named_file.c well_named_file.c svk delete .README.swp
svk commit
When you're done, just commit your changes to your local repository, whether or not you have network. If you commit to a mirrored path, rather than a local branch, you'll need to be able to access the path's upstream subversion server, but the commit will be sent to the server instantly.
svk commit
svk pull
Life doesn't stop when you make a local branch. From time to time, pull down changes from the upstream repository.
svk pull //local/project_x
svk push
When you're ready to share your changes with the world, push them to the upstream repository.
svk push //local/project_x
To see a full list of svk's commands, type svk help commands. For help with a specific command, just type svk help command.
The svk wiki (http://svk.elixus.org) is a great place to find the latest svk tips, tricks and updates. If you run into trouble using svk, the wiki's the right place to start looking for help.
[edit] Impression of svk
I, personally, have been using svk for about 6 months now and I cannot see myself using plain old svn again :) cvs? whats that?
Seriously, I love this system!

