Svk

SVK 是一种分布式版本控制系统,使用 Perl 在 Subversion 的基础上开发。其主页的说明如下:

svk is a decentralized version control system built with the robust Subversion filesystem.
It supports repository mirroring, disconnected operation, history-sensitive merging, and
integrates with other version control systems, as well as popular visual merge tools.

使用场合

  • 出差,畢竟出門在外不一定都會有網路,而且也不一定能連到公司的 Repository server,這時就可以拉 code 到 Notebook,然後在 Notebook 上作版本控制,等到回公司了,再把 code 推回去公司的 Repository server。
  • 專案內使用了某 Open source,通常 Open source 專案會不時變動,開發時期會需要固定一個版本下來,這時候就可以拉一份下來作管理,到時候可以很容易釐清是哪裡的問題

所需套件

  • Perl - 需要 N 多 module,大多通过 CPAN 取得。
  • Subversion - 需要支持 Perl 的 SWIG 帮定,重新编译 Subversion。1.4.4 "make check-swig-pl" 时有问题。
  • 打了 debian 的 patch 后,可以了。

使用

$svk depotmap --init # initiatize your local repository

$svk mirror https://.../trunk //project/trunk # initialse mirror
$svk sync /project/trunk

$svk copy //mirror/openmoko //local/openmoko
$svk co //local/openmoko

$svk pull # equal to the following cmd:
$svk sync //mirror/openmoko
$svk smerge -I/ //mirror/openmoko //local/openmoko
$svk update (from working copy)

$svk push # local -> Remote equal to:
$svk smerge -c //local/openmoko //mirror/openmoko
$svk smerge -I/

$svk mkdir {//mirror, //local}
$svk import -m 'import <project>' //project/trunk/path/to/project
$svk log -v //project
$svk {add,rm,status,commit}

$svk mirror [http|svn]://host/path DEPOTPATH
$svk mirror cvs::pserver:user@host:/cvsroot/node/.. DEPOTPATH
$svk mirror p4:user@host:/666/path/.. DEPOTPATH
page_revision: 0, last_edited: 1201751874|%e %b %Y, %H:%M %Z (%O ago)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License