r1 - 11 Sep 2006 - 18:12:40 - JaredRhineYou are here: OSAF >  Journal Web  >  ContributorNotes > JaredRhineNotes > SvkUsageNotes

SVK usage notes

With a slant towards usage by prospective committers at OSAF

Starting

Say you're not an committer to an OSAF-maintained SVN repository but you want to do some development or contribute a patch back to OSAF. Here's how using SVK can give you a rich software development experience and tight integration with the OSAF SVN repository without having a committer bit.

First, initialize your svk repository. This need only be performed once, as it creates the local repository in your home directory, ~/.svk/local.

svk depotmap --init

Then, identify the HTTP URL of the SVN repository/tree you want to track. Use that URL during the set up of svk to track the OSAF repository.

svk mkdir -p //mirror/osaf/cosmo/trunk -m'Creating directory for svk cosmo mirror'
svk mirror http://svn.osafoundation.org/server/cosmo/trunk //mirror/osaf/cosmo/trunk
svk sync --all

Now create a local working copy to do your local mods in:

mkdir ~/work
cd ~/work
svk copy -p //mirror/osaf/cosmo/trunk //local/osaf/cosmo/branches/jared-kiloprop-dev-1 -m'Branching svk cosmo trunk for kiloprop local development'
svk co //local/osaf/cosmo/branches/jared-kiloprop-dev-1 kiloprop-dev

Now you're ready to do all regular svn operations you might do (edit, add, delete, diff, checkin); just use svk instead of svn.

cd kiloprop-dev
[edit files]
svk diff
svk ci -m'My local changes'

Remember to keep your mirror up to date and merge that into your local copy occassionally:

svk sync //mirror/osaf/cosmo
svk pull //local/osaf/cosmo/branches/jared-kiloprop-dev-1

To generate a patch, you might do:

svk smerge -b 940 -P MyPatch //local/osaf/cosmo/branches/jared-kiloprop-dev-1
svk patch --update MyPatch
svk patch --regen MyPatch

Some other things you might want to:

svk mirror --list
rm ~/.svk/lock [if you interrupt an svk command]
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r1 | More topic actions
 
Open Source Applications Foundation
Except where otherwise noted, this site and its content are licensed by OSAF under an Creative Commons License, Attribution Only 3.0.
See list of page contributors for attributions.