Top > SCM > Bazaar > BzrForSVNUsers
以下は、原文に忠実とは限らない、下訳です。 正しい理解のためには、本家の英語版を参照してください。

はじめに

このチュートリアルはSVNを使ったことのある人向けです。 SVNを使ったことがないならば、まずは普通のチュートリアルからはじめるのが良いでしょう。

このチュートリアルは2つのセクションに分かれています。 それはコンセプトと振舞いです。

コンセプトのセクションではBazaarを効果的に実行するための知識を与えることに関係しています。 2つ目のセクションでは詳細を控え、Bazaarの使い方に焦点をしぼっています。

もしハンズオンのやりかたで学ぶなら、セクション2に飛んでください。 そうでなく、手を動かす前に物事について考えるのを好むような人なら、セクション1が良いでしょう。

Tutorials/CentralizedWorkflowを中央管理方式について見ておきたいかもしれませんね。

(注: http://bazaar-vcs.org/Tutorials/CentralizedWorkflow のこと)

セクション1 - Bazzar解説

Bazaarの売りは何?

この観点では、きっとちょっと試せばどのように分散リビジョン管理システムを使えばいいかわかることでしょう。 "Bazaarはこうやるんだ! これをマージして、そんな風に独立して開発できるんだ、ハックを楽しいものにするんだ"とね。

本当にこういったすべての事を実現できるのでしょうか。 いいえ、それはまやかしです。 Bazaarは洗濯機の後ろに落ちた靴下を見付けられたりはしません。 残りは疑う余地などありません。

DRCSってつまり何?

Project management used to be highly centralized. People working together on a project would meet together in one place, work together on a project and release their work. If you didn't work in the same place, you were an outsider that at best could send in patches.

To say that the world has changed since the internet became ubiquitous is an understatement. Developers for free software projects are spread throughout the world. Wouldn't it make sense if our development tools worked the same way that we do?

How is a branch different from a SVN repository?

The purpose of decentralized revision control systems is to break the chain between the developer and the server. This is done by moving the RCS data from the central server down to the developer. This is done by making a Bzr branch something that is like both a repository and a working tree.

Logically combining the RCS data with the working tree means that when you branch from somebody else, you end up with a repository of your own. That means you can commit in your branch without needing to ask for permission from the person you branched from. Its almost as if you copied their SVN repository and made a SVN repository of your own.

How do repositories fit into the Bazaar model?

The catch to keeping RCS data and working trees logically related is that each time you make a branch, you copy a lot of RCS data. Some revision control systems, such as Bazaar, allow one to create a shared repository. A shared respository allows the user to store the RCS data for several branches in one place. That way, the RCS data common to several branches is only represented once on the filesystem.

どうやってブランチ間のマージができるのか?

(本家に記述なし)

セクション2 - ふつうのSVNをBazaarに言い換えてみると

This section explains how to perform common SVN behaviours in a Bazaar world. Unfortunately, this means that I won't be able to teach you many of the things that are unique to decentralized revision control systems.

This section covers how to use Bazaar in checkout mode. Reading section 3, which covers standard Bazaar methods, is highly encouraged.

チェックアウト

SVNの世界で、すでにSVNリポジトリがセットアップされていて、チェックアウトすべきURLを教えてもらったとします。 チェックアウトは以下のようにして行います:

$ svn checkout URL
$ svn checkout svn://somemachine.com/this/directory/here

一方、Bazaarでは、こんな風になります:

$ bzr checkout http://somemachine.com/this/directory/here

チェックアウトの更新

In the SVN world you may have done a checkout. From time to time you have to get new changes from the repository and apply them to your checkout. This usually looks something like this:

$ cd codebase/
$ svn update

This looks very similiar in the Bazaar world:

$ cd codebase/
$ bzr update

In both the SVN and Bazaar cases this will mean that the changes in the repository or branch that you do not yet have in the working tree will be applied. You might have to deal with conflicts.

Seeing how a working tree has changed since the last commit

In the SVN world we often want to check how we have changed things since we last committed. By checking how the code base has changed, we can see what we're about to commit before we actually perform the commit.

In the SVN world, we would check the changes this way:

$ svn status
[see a list of files that have changed]
$ svn diff
[see a diff of how files have changed]

This is very similar in Bazaar:

$ bzr status
[see a list of files that have changed]
$ bzr missing
[see a list of new revisions in the parent branch]
$ bzr diff
[see a diff of how files have changed]

In both of these cases, you'll get a diff that you can review prior to commit.

チェックアウトしたコードのコミット

In the SVN world you may have made changes to your checkout that need to be saved in the repository. One typically does so in this way:

$ svn commit -m'(何がコミットされているかの記述)'

これはBazaarでも同様です:

$ bzr commit -m'(何がコミットされているかの記述)'

これら両方とも、新規修正はリポジトリ(SVN)ないしブランチ(Bazaar)に保存されます。

セクション2 - SVN移行を実行するためにブランチを使う

Bazaar supports a variety of other development methodologies that are foreign to SVN developers. These methodologies typically work much better than the SVN method. They are, however, a bit different from the CVS way.

セクション3 - 開発方法論

Loose Cannon Style

General Rules

利点

欠点

共有ブランチスタイル

Explicit markup ends without a blank line; unexpected unindent.

ルール

利点

欠点

The Lieutenant Style

''ルール''

Benefits

Drawbacks

PQM(Patch Queue Manager)スタイル

ルール

利点

欠点


Powered by docutils, and CSS Design by tri-star