You're not currently signed in.

Single-User SVK with a Remote Subversion Repository

Here are some notes on how I am using SVK with a remote SVN repository

How am I set up?

  • I have a remote http Subversion repository supplied by Digitial Dimensions as part of my package.
  • I use OpenSUSE 10.1 on a laptop that spends a lot of time disconncted from the Internet
  • I am self employed and I am currently involved in various projects with customers
  • I am also involed in some projects with colaborators who use a different Subversion repository located at another organisation.
  • I use my latop to run my business (accounts etc) as well as my personal life (letters etc)

These are the steps I used to set up my version control sysetm from empty.

# Set up my directory layout as I want it to appear e.g.



  $HOME/mycompanystuff/marcom/presentations/scm/trunk/...

  $HOME/mycompanystuff/website/trunk/...

  $HOME/mycompanystuff/accounts/...     # No branches needed for the accounts files

  $HOME/mycompanystuff/customers/favouritecustomer1/project1/trunk/...

  $HOME/mycompanystuff/customers/favouritecustomer1/project2/trunk/...

  $HOME/mycompanystuff/customers/favouritecustomer2/project1/trunk/...



As you can see I keep trunk/branch directories at the lowest possible level, so the model is that I branch a complete project, but no more. Because I am a one person company my projects are sufficiently small that I can branch the whole project.

Now use Subversion to import the contents of mycompanystuff into my remote repository

svn import mycompanystuff http://my.domain.com.au/repobase/mycompanystuff -m "Initial Import"



Now browse or list the repository to make sure that the data can be seen

Move the ~/mycompanystuff directory to one side, or delete it if you are feeling brave.

Now create the svk repository

svk depotmap --init



and map the remote repository into a local path

svk mirror http://my.domain.com.au/repobase/mycompanystuff //mycompanystuff/main



Notice how I have placed it on a directory called main, not trunk. //mycompanystuff/mirror might have been a reasonable choice as well

And mirror the remote repository down to the laptop

svk sync //mycompanystuff/main



Now you must never make changes on the main branch -- it is purely for hosting the remote mirror. For the reason see SVKTools, it allows you to use tools that have support for SVN, but not SVK.

So let's create a local branch

svk cp //mycompanystuff/main //mycompanystuff/laptop



A working area

mkdir ~/work

cd ~/work



and check out a copy

svk co //mycompanystuff/laptop





Now ready to rumble on my laptop, refer to your favourite svk text on daily svk commands.

After making changes to the working copy on the latop commiting changes back to the depot is easy

svk ci



Of course you can also have done svk add, svk mv etc.

When you are next connected to the network issue the commnad

svk push



and all pending updates are added to your remote repository.

\\ Todo

\\ How to make odd changes in remote repository (e.g. when working onsite) and bring them back to the laptop.