Download pdf - Bazaar for osc

Transcript

Bazaar Version Control System

Version Control For Human Beings

Bazaarとかはいかがですか?

Bazaar Version Control System

Version Control For Human Beings

なまえ:岩田 秀高 twitter id : @wonderful_panda

しごと:メーカ系SE会社で業務アプリ開発など。    趣味でPythonをすこし。Rubyをもっとすこし。

よろしくお願いします。

自己紹介

Bazaar Version Control System

Version Control For Human Beings

分散バージョン管理ってなに?

Bazaar Version Control System

Version Control For Human Beings

>集中型VCS(Subversion)の場合

Checkout/Update

Commit

作業コピー

ブランチ

リポジトリ

Bazaar Version Control System

Version Control For Human Beings

>分散型VCSの場合

Clone/Pull

作業コピー

リポジトリ

Commitブランチ

Push

HgならUpdateGit/BzrはPullで

同時に更新

ブランチ

Bazaar Version Control System

Version Control For Human Beings

>分散型VCSの場合

Push/Pull

Push/Push

ユーザ同士で直接やりとりしたりも

Bazaar Version Control System

Version Control For Human Beings

ネットワークから切り離されていても、ほとんどの操作がスタンドアロンで実行できます。

好きなタイミングでコミットできます。何ならビルドが通らなくてもOK!(かどうかはプロジェクトによりますが)

「マージありき」で設計されているので、SVNとくらべてマージがとてもうまく行きます。

>なにがうれしいの?

Bazaar Version Control System

Version Control For Human Beings

How aboutBazaar?

Bazaar Version Control System

Version Control For Human Beings

「バザー」です。実は「バザール」じゃないらしいよ。

Bazaarとは?

UbuntuのCanonicalが中心となって開発している、分散バージョン管理ツールです。Ubuntu、emacs、MySQLなどのプロジェクトで使われています。

Pythonで作られていて、プラグイン機構でさまざまな機能を追加できます。

Bazaar Version Control System

Version Control For Human Beings

Version Control For Human Beings

Bazaarは、プログラマでも、マネージャでも、デザイナさんでも、あらゆる人々が使える分散バージョン管理システムを目指しています。

Bazaarのコンセプト

Bazaar Version Control System

Version Control For Human Beings

GitやMercurialと比べるとシェアは小さいですが、Bazaarもいいソフトですよ。

Subversionからの乗り換えなら、Bazaarも検討してみてはいかがでしょうか?

まとめ

Bazaar Version Control System

Version Control For Human Beings

仕組みのはなし

Bazaar Version Control System

Version Control For Human Beings

Bazaarには、SVNと同じように「リポジトリ」「ブランチ」「作業コピー」という概念があります。

運用にあわせて、それぞれを自由に配置することができます。

>リポジトリ、ブランチ、作業コピー

Bazaar Version Control System

Version Control For Human Beings

>リポジトリ、ブランチ、作業コピー

Pull

作業コピー

リポジトリ

ブランチPush

Push/Pullはブランチごと。必要なブランチだけ

持ってこれます

手元で新しくブランチを作ることも

Pushしないのも自由

Bazaar Version Control System

Version Control For Human Beings

Update

作業コピー

リポジトリ

ブランチCommit

たとえば、作業コピーだけ持ってきて、

集中型として使うこともできます。

>リポジトリ、ブランチ、作業コピー

Bazaar Version Control System

Version Control For Human Beings

>リポジトリ、ブランチ、作業コピー

作業コピー

ブランチ+

作業コピーブランチ

ブランチごとに作業コピーを用意

することも

一つの作業コピーで複数のブランチを切り替えて使うこともできます

Bazaar Version Control System

Version Control For Human Beings

>リポジトリとブランチ

各リビジョンの情報がすべて格納されているのが

「リポジトリ」です。

Bazaar Version Control System

Version Control For Human Beings

>リポジトリとブランチ

リビジョンは、自分の親を知って

います

マージされたリビジョンは、

親が2つになります。

Bazaar Version Control System

Version Control For Human Beings

>リポジトリとブランチリビジョンを一つ

選んで、親をたどると、

Bazaar Version Control System

Version Control For Human Beings

>リポジトリとブランチ

メインラインの履歴と、

(マージされた)サブの履歴が

取り出せます。

Bazaar Version Control System

Version Control For Human Beings

>リポジトリとブランチ

これが「ブランチ」です。

Bazaar Version Control System

Version Control For Human Beings

もう一つ、他のDVCSには無い「チェックアウト」という概念があります。

チェックアウトとは、親となるブランチに結びついた(バインドされた)ブランチのことです。

>チェックアウト、バインド

Bazaar Version Control System

Version Control For Human Beings

>チェックアウト、バインド

Checkout/Pull

作業コピー

Commit Commitブランチ

チェックアウト

チェックアウトしたブランチの場合、

コミットがアトミックにサーバにも反映されます。

Bazaar Version Control System

Version Control For Human Beings

この機能をつかうと、SVNとほとんど変わらない感覚で扱うことができます。

手元にもブランチがあるので、スタンドアロンでログやアノテートが見れたり、必要があればローカルコミットしたりなどのDVCSの恩恵はうけることができます。

メンバーのスキルや、作業の内容にあわせて、集中型と分散型のスタイルを使い分けることができます。

>で、なにがうれしいの?

Bazaar Version Control System

Version Control For Human Beings

いいところと悪いところ

Bazaar Version Control System

Version Control For Human Beings

コマンド名などもSVNによく似ています。チェックアウト機能などもあり、スムーズにSVNから移行できます。

>Bazaarのいいところ

ファイルのパスやコミットログなどに、安心して日本語を使えます。

クロスプラットフォームなGUIクライアントがあり、どんな環境でも同じように操作できます。フォルダもバージョン管理できます。

Bazaar Version Control System

Version Control For Human Beings

VisualStudioアドインがありません。

>Bazaarの残念なところ/足らないもの

バイナリの履歴を多く含む、大容量のリポジトリを扱うのは苦手なようです。ブランチの部分クローン機能がまだありません。ファイルのコピーはトラッキングされません。プラグインに対するGUIのサポートがあまりありません。(訂正)SVNと同じレベルでの部分クローン機能は、Git、Mercurialにも無いそうです。submodule、subrepo相当の機能は、Bazaarでも実現できます。

Bazaar Version Control System

Version Control For Human Beings

Launchpad

Bazaar Version Control System

Version Control For Human Beings

>https://launchpad.net/

Bazaar Version Control System

Version Control For Human Beings

>https://launchpad.net/

GitにはGitHubMercurialにはBitBucketがあるように、BazaarによるコードホスティングサイトとしてLaunchpadがあります。

BTS、マージリクエスト&コードレビューなどのほか、誰でも簡単にリソースの翻訳に貢献できる仕組みなんかが素敵だと思います。

Bazaar Version Control System

Version Control For Human Beings

ご清聴 ありがとうございました。