Samba-SVK-HOWTO for working against the anonymous svn trees

Gerald (Jerry) Carter jerry at samba.org
Tue Sep 6 16:37:14 GMT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Folks,

I've spent a few hours playing around with svk and it appears
to solve the necessary problems.

1) providing easy SCM for Samba developers without requiring
ssh access to Samba.org

2) easy generation of patch sets against the upstream repo
including intermediate commit to the developer's local svk
repo.

3) no infrastructure changes to the svn repo on samba.org

4) very little relearning of tool sets for existing developers


Here's a quick and dirty HOWTO for Samba development against
the anonymous svn trees using svk.  If people could review this,
walk through it and give opinions about svk as well, that would
be appreciated.


- ----- Samba-SVK-HOWTO ---------------------------

* Step 0: Overview

SVK is a tool for disconnected development and is available
http://svk.elixus.org/.  It is very similar to svn with respect
to the command set.  The differences are mostly around the
concepts of a depot and a repository.  For our purposes, a
depot is basically a local mirror of a remote repository.
However a depot allows you to create your own local branches
which you can use for source control management.

Changes are then pushed from your local repo checkout to the
depot and then either (a) pushed to the central svn repository
or (b) a patch between the depot and the central repo is created.

* Step 1: Installing SVK

SVK is basically a set of perl modules.  After ensuring that you
have the svn perl bindings installed locally, let svk's makefile
grab any dependent modules from CPAN.

Help (of all kinds) is available by running 'svk help'

* Step 2: Create the local depot

Simply run 'svk depotmap', edit the path of the unnamed depot,
and save the changes.  This will create a local svn tree that
will contain the mirrored and local svn repositories.

For example, my svk depot is located at /misc/src/svk
('': /misc/src/svk).  The default location is $HOME/.svk/local


* Step 3: Mirror the Samba source tree

Choose your Samba branch of interest.  This example uses the
SAMBA_3_0 tree:

svk mirror \
	svn://svnanon.samba.org/samba/branches/SAMBA_3_0 \
	//SAMBA_3_0

Now sync the depot with the central repository on Samba.org:

svk sync //SAMBA_3_0

* Step 4: Creating your local repo

Create a local directory in the depot for your own own and then copy the
mirrored source tree.

svk mkdir -m "creating local directory tree" //local
svk copy //SAMBA_3_0 //local/SAMBA_3_0

* Step 5: check out the local branch

This is very similar to checking out an svn repo.

svk co //local/SAMBA_3_0 ~/src/samba_3_0

* Step 6: Make desired changes to the local checkout

svk has commit, update, etc... commands just like svn

* Step 7: Create a patch for review

Depending on how long, you may need to run 'svk sync' to
update the mirrored repo.  Check your changes into the local
branches (svk commit //local/SAMBA_3_0) and then
push the changes to a patch.

svk push -P mychanges //local/SAMBA_3_0

This will create an svk patch file in $HOME/.svk/patch/.

Note that you probably also want to sign these patches
(svk push -S -P filename ...)

Now post a URL to the patch on the samba-technical mailing list
for review.

- --
* Step 8: Applying someone else's patch

copy the patch to ~/.svk/patch/ and ensure that svk recognizes
it (svk patch --list).  Now apply the change to you local tree
(svk patch --apply 'patchname').

- ----- Samba-SVK-HOWTO ---------------------------

There's a lot I'm stilling learning about 'svk push' and 'svk pull'.
This was enough to get me started.  Comments are welcome.





cheers, jerry
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDHcW6IR7qMdg1EfYRAovcAJ9Eu4cGHneuhvZz19cNLNIuju+bcQCfSOyH
pdfIrFQTezSSIAPETem9KKg=
=cHWv
-----END PGP SIGNATURE-----


More information about the samba-technical mailing list