svkで一気にチェックアウト
理由は良く判らないけれど,Web上に溢れている svk の入門文書を見ると,mirrorしてsyncしてcopyしてcheckoutして…という回りくどい手順が多い.
でも下記の方法で一気にやる方法もある.ちょっとしたコダワリがあって,途中でひと味違うことをしたいなら,他のWebサイトのものを参考にするのもよい.けれど,ここに各方法でも,得られる成果は等価.
ちょっと試したいだけなら,こっちのほうがずっと楽.もちろん,ヘビーユーズでも,こっちのほうが楽.覚えることは少ないほうがよい(よね?).
手順
リモートリポジトリはhttp://svn.example.com/svn/hrp-cfg/で,手元には//local/hrp-cfg辺りに置きたいと仮定する.
$ svk co http://svn.example.com/svn/hrp-cfg/ hrp-cfg New URI encountered: http://svn.example.com/svn/hrp-cfg/ Choose a base URI to mirror from (press enter to use the full URI):
単に,returnキーを叩く.
Before svk start mirroring a remote repository, we would like to explain two terms to you: 'depot path' and 'mirrored path'. A depot path is like any path in a file system, only that the path is stored in svk's internal virtual file system. To avoid confusion, svk's default depot path begins with //, for example //depot or //mirror/project. Now a mirrored path is a depot path with special properties, which serves as the 'mirror' of a remote repository and is by convention stored under //mirror/. Now, you have to assign a name to identify the mirrored repository. For example, if you name it 'your_project' (without the quotes), svk will create a mirrored path called //mirror/your_project. Of course, you can assign a 'full path' for it, for example, //mymirror/myproject, although this is not really necessary. If you just don't care, simply press enter and use svk's default, which is usually good enough. Depot path: [//mirror/hrp-cfg]
どうしても気に入らないというのなら違うパスにしてもよいけれど,単にリターンを叩けばよい.
Committed revision 1. svk needs to mirror the remote repository so you can work locally. If you're mirroring a single branch, it's safe to use any of the options below. If the repository you're mirroring contains multiple branches, svk will work best if you choose to retrieve all revisions. Choosing to start with a recent revision can result in a larger local repository and will break history-sensitive merging within the mirrored path. Synchronizing the mirror for the first time: a : Retrieve all revisions (default) h : Only the most recent revision -count : At most 'count' recent revisions revision : Start from the specified revision a)ll, h)ead, -count, revision? [a]
世間の解説では,「時間がかかるので --skipto HEADにしましょう」とか言っているのと等価な部分.
確かにaを選ぶと,えらい時間がかかる場合もあると思うので,hか-5くらいにしておくのが無難かも
しれない.
でも私の場合は,ローカルに保持していないリビジョンほど重要性が高いというマーフィーの法則は正しいと思うので,単にリターンキーを押して全てのリビジョンを得るようにしている.
Syncing http://svn.example.com/svn/hrp-cfg Retrieving log information from 1 to 135 Committed revision 2 from revision 1. Committed revision 3 from revision 2. Committed revision 4 from revision 3. Committed revision 5 from revision 4.