sinkin' in the rain
Makio Tsukamoto tumblelogging in the mood of sinkin' in the rain.
February 23, 2008
Fastladder on Windowsをrev.26に更新。

rev.25からrev.26は追加ファイルがたくさんあって、こうなると個別ファイルコピーはもう非現実的。素直にsvn&patchコマンドのお世話になる。

まずsvnコマンドでパッチの作成。LANG=Cをする理由はこちら、-r16:headの理由はこちらを参照。

C:\Program Files\Fastladder>set LANG=C
C:\Program Files\Fastladder>svn diff -r16:head http://fastladder.googlecode.com/svn/trunk/fastladder
> patch.txt

次に、スタートメニュー→[コントロールパネル]→[管理ツール]→[サービス]を開き、Fastladderを右クリックして停止。クローラも動かしているのであれば停止。

そしてpatchコマンドでパッチの適用。

C:\Program Files\Fastladder>patch -p0 patching file test/unit/crawl_status_test.rb
patching file test/test_helper.rb
patching file test/lib/fastladder/crawler_test.rb
patching file test/fixtures/crawl_statuses.yml
patching file test/fixtures/feeds.yml
patching file test/fixtures/favicons.yml
patching file app/models/feed.rb
Assertion failed: hunk, file patch.c, line 343
(app/views/reader/index.rhtml)

なぜかこんな調子で時々エラーが起きて止まるのだけど、エラーが起きたファイルの前まで(patching file app/models/feed.rbの前、つまりpatching file test/fixtures/favicons.ymlへの差分まで)をpatch.txtから消して、再度実行すると今度はうまく進む。この作業を繰り返していると、そのうち全パッチの適用が終わる。

それから、バイナリファイルはpatchで作成されないので、patch.txt内で「svn:mime-type = …」とか書かれているファイルを確認し、そのファイルは改めて取得。rev.16からrev.26ではtest/fixtures/files/favicon.icoだけ。

取得がすんだら、更新作業は終了。スタートメニュー→[コントロールパネル]→[管理ツール]→[サービス]を開き、Fastladderを右クリックして開始する。