RSS
22 Aug 2007

SVK Quick Start Guide

Author: ceefour | Filed under: Beginner, Cool, Enterprise, Indonesia, Praises, Ruby, Tips, Tools, Tutorials

Some people asked me about SVK so here it is. Quickly written because I am a bit lazy and sleepy right now.

SVK is a distributed version control system. In other words, it allows you to mirror a Subversion repository, have local commits, pull changes from upstream, and synchronize/merge it back to the remote Subversion server if you want.

English version

UPDATE: This is an outdated version. The most up-to-date version with newer tips and tricks is in wiki Ruby Indonesia: SVK, which unfortunately is only available in Indonesian. icon wink SVK Quick Start Guide

Method 1: Use Subversion repository, but SVK working copy

Assumptions:

  • Subversion repository remote: http://svn.example.com/try/
  • SVK depot: /try/
svk depot try ~/.svk/try
svk mirror /try/remote http://svn.example.com/try/
svk sync /try/remote
svk cp /try/remote /try/local

Checkout & working copy:

svk co /try/local/trunk

Commit:

svk ci

Push: (merge to remote)

svk push

Pull: (merge from remote to local)

svk pull

Method 2: Use remote Subversion repository, local Subversion repository, and SVK to merge between those repositories

The advantage of this approach is that you can use usual Subversion tools (TortoiseSVN, or native utility from Aptana IDE, NetBeans, etc.)

Assumptions:

  • Subversion repository remote: http://svn.example.com/try/
  • Subversion repository local: http://svn.mycomputer/try/
  • SVK depot: /try/
svk depot try ~/.svk/try
svk mirror /try/remote http://svn.example.com/try/
svk sync /try/remote
svk mirror /try/localsvn http://svn.mycomputer/try/
svk sync /try/localsvn
svk smerge /try/remote /try/localsvn

Checkout & working copy:

svn co http://svn.mycomputer/try/trunk/

Commit:

svn ci

Push: (merge to remote)

svk sync /try/localsvn
svk sync /try/remote
svk smerge /try/localsvn /try/remote

Pull: (merge from remote to local)

svk sync /try/localsvn
svk sync /try/remote
svk smerge /try/remote /try/localsvn

Tip: Moving local Subversion repository history to remote Subversion server

Assumptions:

  • Subversion repository remote (still empty): http://svn.example.com/try/
  • Subversion repository local (has history): http://svn.mycomputer/try/
  • SVK depot: /try/

In short:

svk depot try ~/.svk/try
svk mirror /try/remote http://svn.example.com/try/
svk sync /try/remote
svk mirror /try/localsvn http://svn.mycomputer/try/
svk sync /try/localsvn
svk smerge --incremental --log --baseless /try/localsvn /try/remote

Versi Indonesia

UPDATE: Versi ini sudah out-of-date. Versi paling up-to-date dengan tips-tips tambahan dan edisi revisi ada di wiki Ruby Indonesia: SVK.

SVK adalah sistem version control terdistribusi.

Cara 1: Pake Subversion repository, SVK working copy

Asumsi:

svk depot coba ~/.svk/coba
svk mirror /coba/remote http://svn.example.com/coba/
svk sync /coba/remote
svk cp /coba/remote /coba/local

Checkout & working copy:

svk co /coba/local/trunk

Commit:

svk ci

Push: (merge ke remote)

svk push

Pull: (merge dari remote ke local)

svk pull

Cara 2: Pake Subversion repository remote, Subversion repository local, dan SVK untuk merge

Kelebihan dari cara ini adalah Anda bisa menggunakan tools Subversion seperti biasanya (TortoiseSVN, maupun native utility dari Aptana IDE, NetBeans, dsb.)

Asumsi:

svk depot coba ~/.svk/coba
svk mirror /coba/remote http://svn.example.com/coba/
svk sync /coba/remote
svk mirror /coba/localsvn http://svn.mycomputer/coba/
svk sync /coba/localsvn
svk smerge /coba/remote /coba/localsvn

Checkout & working copy:

svn co http://svn.mycomputer/coba/trunk/

Commit:

svn ci

Push: (merge ke remote)

svk sync /coba/localsvn

svk sync /coba/remote

svk smerge /coba/localsvn /coba/remote

Pull: (merge dari remote ke local)

svk sync /coba/localsvn
svk sync /coba/remote
svk smerge /coba/remote /coba/localsvn

Tip: Mindahin history Subversion local ke remote

Ini pertanyaan dari Marcel.

Asumsi:

So singkatnya:

svk depot coba ~/.svk/coba
svk mirror /coba/remote http://svn.example.com/coba/
svk sync /coba/remote
svk mirror /coba/localsvn http://svn.mycomputer/coba/
svk sync /coba/localsvn
svk smerge --incremental --log --baseless /coba/localsvn /coba/remote

Credits

Thanks buat Marcel ([1]) yang sudah menyumbang pertanyaan yang akhirnya membuat saya menulis artikel ini. Trims. –Ceefour 11:23, 22 Agustus 2007 (CDT)

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

  • Marcel

    Thanks Hendy, now I have on the net/public subversion repository, and yet work and commit offline.

    Next step automatic deployment.

  • http://blog.bitfluent.com Kamal Fariz

    Thanks Hendy for the article. I just started using SVK myself a week ago, but never ventured anywhere beyond the basic commands as listed in svk help intro. Your example for SVN Remote SVK SVN Local was awesome!

    I’m now looking at how to replace piston and use SVK to manage externals which can be committed and updated periodically. Any ideas?

  • http://hendy.gauldong.net/ Hendy Irawan

    Kamal:

    Look at http://wiki.ruby-id.web.id/wiki/SVK

    I’ve just updated it

    under section “Manajemen Plugins / svn:externals / Alternatif Piston”

  • http://www.sameshirteveryday.com/2007/08/23/morning-brew-66/ Morning Brew #66

    [...] SVK Quick Start – SVK is a distributed version control system. It allows you to mirror a Subversion repository, have local commits, pull changes from upstream and synchronize/merge it back to the remote server if you want. [...]

  • http://rubygalore.com/svk-quick-start/ Ruby Galore – Today Top Blog Posts on Ruby on Rails – Powered by SocialRank

    [...] SVK Quick Start [...]

  • http://pamshipp1102.newsvine.com/_news/2011/12/01/9153774-organization-jahit-tudung-wear-it-is-possible-to-use Jahit Tudung

    Great website…

    [...]we like to honor many other internet sites on the web, even if they aren’t linked to us, by linking to them. Under are some webpages worth checking out[...]……