RSS
22 Aug 2007

SVK Quick Start Guide

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

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

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. ;-)

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.

blog comments powered by Disqus