DSCM is Agile

39
みんな分散SCMを 使えばいいと思うよ 浦嶌 啓太 (uid:ursm) (株)永和システムマネジメント

Transcript of DSCM is Agile

Page 1: DSCM is Agile

みんな分散SCMを使えばいいと思うよ

浦嶌 啓太 (uid:ursm)(株)永和システムマネジメント

Page 2: DSCM is Agile

お品書き

1.分散SCMとは

2.分散SCMツールの比較

3.Mercurial体験コース

4.Q&A

Page 3: DSCM is Agile

Linus Torvalds

Subversionほど無意味なプロジェクトはない

Page 4: DSCM is Agile

Subversion爆発しろ

• すべての変更がトラッキングされる

• お粗末なマージ機能

• オフラインだと何もできない

• 何をするにも遅すぎる

Page 5: DSCM is Agile

そこで分散SCMですよ!

Page 6: DSCM is Agile

分散SCMとは

Page 7: DSCM is Agile

従来のSCMと分散SCMの違い

Page 8: DSCM is Agile

分散SCMのアプローチ•開発者それぞれが独立したリポジトリを持つ

•必要な時に変更を伝播する

•主従関係がない

Page 9: DSCM is Agile

分散SCMの作業フロー

1. clone 2. commit 3. push/pull (merge)

Page 10: DSCM is Agile

分散SCMが提供するもの

•オレオレブランチ

•柔軟なデータフロー

•強力なマージ

•オフラインアクセス

Page 11: DSCM is Agile

オレオレブランチ

•自分のリポジトリは自分専用のブランチ

•好きなだけコミットして好きな時にマージすればいいよ

•もちろん捨ててもOK

Page 12: DSCM is Agile

柔軟なデータフロー

•すべてのリポジトリは対等な関係

•変更を受け渡すフローを自由に変更できる

•隣の人から直接変更を貰ってきたりできる!

Page 13: DSCM is Agile

強力なマージ

•マージは「日常的な作業」

•優れたマージアルゴリズム

• svn upぐらいの手軽さ

Page 14: DSCM is Agile

オフラインアクセス•各リポジトリは完全な情報を持つ

•push/pull以外の操作はすべてローカルで完結する

•いつでもどこでも開発できる

•すっごく速いよ!

Page 15: DSCM is Agile

まとめ•分散SCMはいいものですよ!

•気軽で

•柔軟で

•パワフルで

•速い!

Page 16: DSCM is Agile

アジャイルな組織には分散SCMがよく似合う

Page 17: DSCM is Agile

分散SCMツールの比較

Page 18: DSCM is Agile

いろいろあります

Page 19: DSCM is Agile

どれを使えば良いの?•実績があるのは Git と Mercurial

• Git

• Linux Kernel, X.Org, Samba, Rails

•Mercurial

• OpenJDK, OpenSolaris, Mozilla

Page 20: DSCM is Agile

Gitの特徴•機能性を重視

•低レベルな部分も触れる

•Subversion連携がしっかりしている

•Rails界隈のデファクトスタンダード

•GitHub

Page 21: DSCM is Agile

Gitのここが駄目

•コマンドが100個以上ある…

•依存関係が多くてビルドが面倒

•まともなGUIクライアントがない

Page 22: DSCM is Agile

Mercurialの特徴•シンプルさを重視

•痒いところに手が届くインターフェース

•拡張性が高い

•ドキュメントが充実している

•GUIなクライアントも一応ある

Page 23: DSCM is Agile

Mercurialのここが駄目

•やや保守的

•Subversion連携がイマイチ

•GitHubがない

Page 24: DSCM is Agile

Git MercurialC + Perl + sh多機能・実利的

Python + Cシンプル・理論的

何でもできるSubversionと仲が良いRails界隈で一大ブーム

親切なUI拡張性が高い

関連ツールが充実してる

複雑すぎるWindows? シラネ

もう少し弾けて欲しいSubversion? シラネ

Git vs Mercurial

Page 25: DSCM is Agile

結論

•どっちでもいい

•強いて言えば…

•Subversion連携を重視するならGit

•手軽に使いたいならMercurial

Page 26: DSCM is Agile

Mercurial体験コース

Page 27: DSCM is Agile

Step 1リポジトリを作る

• hg init

• hg add• hg status (st)

• hg commit (ci)• hg log

Page 28: DSCM is Agile

Step 2cloneしてみる

• hg clone

• hg outgoing (out)• hg push

• hg incoming (in)• hg pull

• hg update (up)

Page 29: DSCM is Agile

Step 3マージしてみる

• hg heads

• hg merge

Page 30: DSCM is Agile

Mercurialとうまく付き合うコツ

•メッセージはちゃんと見よう

•ローカルとリモートを意識しよう

•マージは頻繁にやろう

Page 31: DSCM is Agile

Congratulations!

Page 32: DSCM is Agile

Q&A•日本語大丈夫?

•バックアップってどうすんの?

•ユーザ管理は?

• http(s)通るのか?

•どうすればVSSを追放できるのか?

Page 33: DSCM is Agile

日本語大丈夫?

•鬼門は日本語のファイル名

•Mercurialは大体OK、Windows環境の問題もMBCS Extensionで克服した

•Gitはログ中の多バイト文字がエスケープされてるけど問題ない (らしい)

Page 34: DSCM is Agile

バックアップってどうすんの?

• cloneすれば良いんじゃないかな

Page 35: DSCM is Agile

ユーザ管理は?

•基本的にはUNIXユーザ/グループのアクセス権で管理

•HTTP経由なら今まで通りApacheで

•MercurialだとACL Extensionというのもあります (使ったことないけど)

Page 36: DSCM is Agile

http(s)通るのか?

•Of course.

•MercurialはWebDAVじゃないのでプロキシ環境でも安心ですよ

Page 37: DSCM is Agile

どうすればVSSを追放できるのか?

Kent Beck

Social change starts with YOU.

Page 38: DSCM is Agile

ご質問は?

Page 39: DSCM is Agile

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