Linux: 2008年1月アーカイブ
前回のyumコマンドの設定方法では途中までしか書けませんでしたが、いよいよSubversionを設定します。CVSは設定したことがあるので同じように上手くいくと良いのですが、どうでしょうか?
Subversionを使う上で"は"よい本だと思う
日本語のSubversion解説本の最高作
とりあえず今日はここまで、何かCVSと全く変わらないような気がしますが、おそらくもっと使いこなせるようになるといろいろ便利な機能が見つかると思います。
設定自体はすごく簡単にできました。
Subversion実践入門:達人プログラマに学ぶバージョン管理(第2版)
posted with amazlet on 08.01.31
Mike Mason でびあんぐる
オーム社 (2007/04/21)
売り上げランキング: 8436
オーム社 (2007/04/21)
売り上げランキング: 8436
おすすめ度の平均: 

Subversionを使う上で"は"よい本だと思う
日本語のSubversion解説本の最高作- まずは前回の記事の通り、Subversionをインストール(rootで実施)
# yum install subversion.i386
- リポジトリの作成
$ svnadmin create /var/svn --fs-type fsfs
- モジュールの作成
$ mkdir modules
$ ls
modules
$ cd modules
$ mkdir branches
$ mkdir tags
$ mkdir trunk
$ ls
branches tags trunk
- モジュールの登録する
$ svn import modules file:///var/svn/modules -m "first import." Adding modules/trunk Adding modules/branches Adding modules/tags Committed revision 1.
- チェックアウトする
$ svn checkout file:///var/svn/modules/trunk modules Checked out revision 1. $ ls modules
- ローカルファイルの更新処理
$ svn update At revision 1.
- ファイル、ディレクトリの追加
$ svn add src/ A src A src/lang A src/lang/ruby A src/lang/ruby/sample.rb
- コミットする
$ svn commit src/ -m "commit ruby programs." Adding src Adding src/lang Adding src/lang/ruby Adding src/lang/ruby/sample.rb Transmitting file data ..... Committed revision 2.
- ファイル比較するには?
$ svn help usage: svn[options] [args] Subversion command-line client, version 1.4.3. Type 'svn help ' for help on a specific subcommand. Type 'svn --version' to see the program version and RA modules or 'svn --version --quiet' to see just the version number. Most subcommands take file and/or directory arguments, recursing on the directories. If no arguments are supplied to such a command, it recurses on the current directory (inclusive) by default. Available subcommands: add blame (praise, annotate, ann) cat checkout (co) cleanup commit (ci) copy (cp) delete (del, remove, rm) diff (di) export help (?, h) import info list (ls) lock log merge mkdir move (mv, rename, ren) propdel (pdel, pd) propedit (pedit, pe) propget (pget, pg) proplist (plist, pl) propset (pset, ps) resolved revert status (stat, st) switch (sw) unlock update (up) Subversion is a tool for version control. For additional information, see http://subversion.tigris.org/ $ svn diff sample.rb Index: sample.rb =================================================================== --- sample.rb (revision 2) +++ sample.rb (working copy) @@ -11,5 +11,5 @@ end
とりあえず今日はここまで、何かCVSと全く変わらないような気がしますが、おそらくもっと使いこなせるようになるといろいろ便利な機能が見つかると思います。
設定自体はすごく簡単にできました。
久しぶりのブログ更新です。風邪がひどくて休んでいました。
作成したスクリプトをきちんとバージョン管理したいと思いSubversionをインストールしようかなと思いました。しかし、その前にyumコマンドを忘れていたのでここに記載しておきます。
使ったオプションだけになりますので、詳細は参考サイトを確認してください。
yum list installed
こんなところですね。
次回はSubversionの設定をしたいと思います。
【参考サイト】
@IT:yumコマンドでよく利用するコマンド
サラトガIT日記|yumコマンド一覧
作成したスクリプトをきちんとバージョン管理したいと思いSubversionをインストールしようかなと思いました。しかし、その前にyumコマンドを忘れていたのでここに記載しておきます。
使ったオプションだけになりますので、詳細は参考サイトを確認してください。
- インストール済みパッケージ一覧を表示
yum list installed
# yum list installed | grep ruby ruby.i386 1.8.5.114-1.fc6 installed ruby-devel.i386 1.8.5.114-1.fc6 installed ruby-irb.i386 1.8.5.114-1.fc6 installed ruby-libs.i386 1.8.5.114-1.fc6 installed
- 利用可能なパッケージの一覧表示
# yum list subversion Loading "installonlyn" plugin Loading "fastestmirror" plugin Setting up repositories Loading mirror speeds from cached hostfile Reading repository metadata in from local files primary.xml.gz 100% |=========================| 475 kB 00:00 updates : ################################################## 1285/1285 Available Packages subversion.i386 1.4.3-2.fc6 updates
- アップデート可能なパッケージの一覧を表示
# yum check-update Loading "installonlyn" plugin Loading "fastestmirror" plugin Setting up repositories Loading mirror speeds from cached hostfile Reading repository metadata in from local files authconfig.i386 5.3.18-0.1.fc6 updates autofs.i386 1:5.0.1-0.rc3.33 updates bind.i386 31:9.3.4-8.P1.fc6 updates bind-libs.i386 31:9.3.4-8.P1.fc6 updates bind-utils.i386 31:9.3.4-8.P1.fc6 updates
- 指定したパッケージをインストール
# yum install subversion.i386 Loading "installonlyn" plugin Loading "fastestmirror" plugin Setting up Install Process Setting up repositories Loading mirror speeds from cached hostfile Reading repository metadata in from local files Parsing package install arguments Resolving Dependencies --> Populating transaction set with selected packages. Please wait. ---> Downloading header for subversion to pack into transaction set. subversion-1.4.3-2.fc6.i3 100% |=========================| 42 kB 00:00 ---> Package subversion.i386 0:1.4.3-2.fc6 set to be updated --> Running transaction check --> Processing Dependency: perl(URI) >= 1.17 for package: subversion --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Downloading header for perl-URI to pack into transaction set. perl-URI-1.35-3.noarch.rp 100% |=========================| 12 kB 00:00 ---> Package perl-URI.noarch 0:1.35-3 set to be updated --> Running transaction check Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: subversion i386 1.4.3-2.fc6 updates 2.3 M Installing for dependencies: perl-URI noarch 1.35-3 core 116 k Transaction Summary ============================================================================= Install 2 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 2.4 M Is this ok [y/N]: y Downloading Packages: (1/2): perl-URI-1.35-3.no 100% |=========================| 116 kB 00:00 (2/2): subversion-1.4.3-2 100% |=========================| 2.3 MB 00:00 Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing: perl-URI ######################### [1/2] Installing: subversion ######################### [2/2] Installed: subversion.i386 0:1.4.3-2.fc6 Dependency Installed: perl-URI.noarch 0:1.35-3 Complete!
こんなところですね。
次回はSubversionの設定をしたいと思います。
【参考サイト】
@IT:yumコマンドでよく利用するコマンド
サラトガIT日記|yumコマンド一覧


