image

  • フォト Amazonギフト券
    ※この時計の時刻は、閲覧しているパソコンのものであり、必ずしも正確な時間とは限りません

検索

最近のトラックバック

無料ブログはココログ

« 2007-08-28 | トップページ | 2007-08-31 »

2007-08-29

2007-08-29

ピックアップ:JRuby 1.0.1登場, XPath は実用に耐えうるかの考察, etc...

- http://journal.mycom.co.jp/news/2007/08/28/014/index.html
> > JRuby 1.0.1登場 - 30の互換性問題を修正、1.0ユーザはアップグレードを | エンタープライズ | マイコミジャーナル

- http://www.moongift.jp/2007/08/xray/
> > MOONGIFT: » 必見!Webデザインのお供に「XRAY」:オープンソースを毎日紹介

- http://www.moongift.jp/2007/08/epiware_document_management/
> > MOONGIFT: » ブラウザベースの高性能プロジェクト管理「Epiware Document Management」:オープンソースを毎日紹介

- http://d.hatena.ne.jp/amachang/20070828/1188306956
> > IT戦記 - XPath は実用に耐えうるかの考察と xpath.js

- http://labs.unoh.net/2007/08/introducing_javascript_jquery.html
> > ウノウラボ Unoh Labs: JavaScriptライブラリといえば jQuery(入門編)

- http://www31.ocn.ne.jp/~narita/
> > RubyとRで競馬分析

ruby で subversion を扱う実験 (2)

subversion-ruby-binding の実験。
いろいろな検索しても決定的な API 説明サイトはみつからない。

- http://www.oneofthewolves.com/2007/04/24/acts-as-subversioned-the-future/
> > One of the Wolves » Acts as Subversioned: The Future.

ActiveRecord として subversion を利用する plugin があるらしい。
download してみたが、使い方(テスト動作のさせかた)が不明。
私が ActiveRecord について理解ができてないのが原因だ。

また、
- http://collaboa.org/download
という プログラムソースには ./lib/actionsubversion/lib 以下に subversion を扱って
いる例がある。これを読んで勉強してみようとおもう。

断片情報でつくってみた実験コード。

$ cat access.rb
require "svn/core"
require "svn/client"
require "svn/repos"
require "svn/info"
require 'pp'

#-----------
# See http://www.oneofthewolves.com/2007/03/06/ruby-subversion-bindings-finally-some-documentation/
#-----------
reppath= "file:///usr/local/svn-reps"
reppath= "/usr/local/svn-reps"

# repos = Svn::Repos.create(h/path/where/repsitory/should/be/createdh)
repos = Svn::Repos.open(reppath)
pp repos

info = Svn::Info.new(reppath, repos.fs.youngest_rev)
diffs = info.diffs
pp diffs

#-----------
# See http://hisashim.livejournal.com/2007/07/24/
#----------
path= "/Users/kato/zzz/test2/svn-reps/test"

Svn::Client::Context.new.log(path, 10, "head", 100, false, false) { |changed_paths, rev, author, date, message|
       p [changed_paths, rev, author, date, message]
}

#-------------
# See http://svn.collab.net/viewvc/svn/trunk/tools/hook-scripts/commit-email.rb
#-------------
entries,props = Svn::Ra::Session#dir(path, nil)
pp entries
pp props

走らせてみた例。

$ ruby access.rb
#<SWIG::TYPE_p_svn_repos_t:0x14dba10>
{"test/test01.txt"=>
  {:added=>
    #<Svn::Info::DiffEntry:0x14d3888
     @added_line=2,
     @body=
      "--- test/test01.txt¥t2007-08-25 13:06:09 JST (rev 46)¥n+++ test/test01.txt¥t2007-08-25 15:21:32 JST (rev 47)¥n@@ -0,0 +1,2 @@¥n+aaa¥n+bbb¥n",
     @deleted_line=0,
     @type=:added>},
"test/test02.txt"=>
  {:added=>
    #<Svn::Info::DiffEntry:0x14d078c
     @added_line=2,
     @body=
      "--- test/test02.txt¥t2007-08-25 13:06:09 JST (rev 46)¥n+++ test/test02.txt¥t2007-08-25 15:21:32 JST (rev 47)¥n@@ -0,0 +1,2 @@¥n+aaa¥n+bbb¥n",
     @deleted_line=0,
     @type=:added>},
"test/test.txt"=>
  {:modified=>
    #<Svn::Info::DiffEntry:0x14d6aec
     @added_line=1,
     @body=
      "--- test/test.txt¥t2007-08-25 13:06:09 JST (rev 46)¥n+++ test/test.txt¥t2007-08-25 15:21:32 JST (rev 47)¥n@@ -1 +1,2 @@¥n aaa¥n+bbb¥n",
     @deleted_line=0,
     @type=:modified>}}
[nil, 46, "kato", Sat Aug 25 13:06:09 +0900 2007, "test"]
[nil, 47, "", Sat Aug 25 15:21:32 +0900 2007, "commmit"]
SWIG::TYPE_p_svn_ra_session_t
nil

« 2007-08-28 | トップページ | 2007-08-31 »

mokuji

2013年12月
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

google

  • twitter
  • __
  • _
    Googleボットチェッカー

合わせて読む

  • 合わせて読む
    フィードメーター - katoy: cocolog あわせて読みたい

リンク