#author("2023-11-17T13:04:20+00:00","","") // 下階層用テンプレート #topicpath ---- //ここにコンテンツを記述します。 Subversionはたとえばコミット時に開発者にメールするなど、Subversionへのアクションをフックしてなにか処理をさせることが出来ます。 現在バグトラッキングシステムのTracとの連携を色々調べてますが、この機能を使って処理を行い、Tracのバグ問票(以下チケットといいます)にコメントを追加したり、チケットをクローズさせたり色々できるみたいですね。 とりあえずもくろんでるのは -EclipseのMylarでTracの障害問票を起票できる -もちろんそれはWEBブラウザでも閲覧できる。もちろん誰かの修正はEclipse/MylarでもWEBでも即座に反映される -ソースコードはSubversionで管理してて、もちろんEclipseからコミットできる -コミットの際のコミットログは、そのコミットのトリガとなる障害問票にコメントとして追記される -その障害問票がトリガとなったソース修正のdiff画面へは、その問票から即座に画面遷移できる -最終的なコミットで、その障害問票はクローズされる((これはコミットで行わなくてもいいかな?)) -適度にユーザ管理され、問票の起票やコミット作業は誰がやったか管理が出来る。 今のところこれくらいなら出来そうですね。((Trackerにしてみると当たり前??)) さてその仕組みですが、SVNははじめからフック機能が備わっています。つまり[[フックスクリプト>http://subversion.bluegate.org/doc/book.html#svn.reposadmin.create.hooks]]にもあるとおり、コミットする前・した後などいろんなイベントに反応するリスナが定義されていて、テンプレートが用意されています。具体的には [root@www opt]# cd /opt/svnroot/hooks/ [root@www hooks]# ls -lrt 合計 36 -rw-r--r-- 1 apache apache 2136 6月 7 23:24 start-commit.tmpl -rw-r--r-- 1 apache apache 1988 6月 7 23:24 pre-unlock.tmpl -rw-r--r-- 1 apache apache 2763 6月 7 23:24 pre-revprop-change.tmpl -rw-r--r-- 1 apache apache 2016 6月 7 23:24 pre-lock.tmpl -rw-r--r-- 1 apache apache 2933 6月 7 23:24 pre-commit.tmpl -rw-r--r-- 1 apache apache 1542 6月 7 23:24 post-unlock.tmpl -rw-r--r-- 1 apache apache 2254 6月 7 23:24 post-revprop-change.tmpl -rw-r--r-- 1 apache apache 1615 6月 7 23:24 post-lock.tmpl -rw-r--r-- 1 apache apache 2014 6月 7 23:24 post-commit.tmpl [root@www hooks]# こんな感じです。これらはテンプレートで、たとえばコミット後に○○したい場合は [root@www hooks]# cp -pfr post-commit.tmpl post-commit [root@www hooks]# chmod 755 post-commit [root@www hooks]# ls -lrt 合計 40 -rwxr-xr-x 1 apache apache 2014 6月 7 23:24 post-commit [root@www hooks]# としておいて post-commit に処理を書いておけばOKです。 これでコミット後にpost-commitが呼ばれます。そこにTracへの処理を書いておけば、Tracにコメントを書き込んだりできるわけですね。 **コミット時にTracのチケットにコメントを書き込む [#h0a4216c] すでにスクリプトは http://d.hatena.ne.jp/masanobuimai/20060512#1147445105 を参考に作成しておきました。 #ref(post-commit) #ref(trac-post-commit-hook) これを先のディレクトリに置いておけばOKです。 [root@localhost hooks]# pwd /opt/svnroot/hooks [root@localhost hooks]# ls -lrt 合計 52 -rwxr-xr-x 1 apache apache 6980 6月 7 15:54 trac-post-commit-hook -rwxr-xr-x 1 apache apache 2422 6月 8 00:45 post-commit [root@localhost hooks]# :refs #nn|チケット側にもコミットログが書き込まれて,さらにチェンジセットへのリンクも張ってくれる :closes #nn|チケットをクローズする -[[フックスクリプト>http://subversion.bluegate.org/doc/book.html#svn.reposadmin.create.hooks]] ---- この記事は #vote(おもしろかった[1],そうでもない[0]) - Quality posts is the key to attract the users to pay a visit the web page, that's what this web page is providing. -- [[D Change]] &new{2023-11-16 (木) 02:12:20}; - Quality posts is the key to attract the users to pay a visit the web page, that's what this web page is providing. -- [[D Change]] &new{2023-11-16 (木) 02:12:51}; - Quality posts is the key to attract the users to pay a visit the web page, that's what this web page is providing. -- [[D Change]] &new{2023-11-16 (木) 02:13:24}; - Quality posts is the key to attract the users to pay a visit the web page, that's what this web page is providing. -- [[D Change]] &new{2023-11-16 (木) 02:13:55}; - That is a very good tip particularly to those new to the blogosphere. Short but very accurate info… Appreciate your sharing this one. A must read article! -- [[d-change.net]] &new{2023-11-17 (金) 20:25:17}; - That is a very good tip particularly to those new to the blogosphere. Short but very accurate info… Appreciate your sharing this one. A must read article! -- [[d-change.net]] &new{2023-11-17 (金) 20:25:47}; - That is a very good tip particularly to those new to the blogosphere. Short but very accurate info… Appreciate your sharing this one. A must read article! -- [[d-change.net]] &new{2023-11-17 (金) 20:26:18}; - That is a very good tip particularly to those new to the blogosphere. Short but very accurate info… Appreciate your sharing this one. A must read article! -- [[d-change.net]] &new{2023-11-17 (金) 20:26:49}; - Thanks for sharing such a good idea, paragraph is pleasant, thats why i have read it entirely -- [[D Change]] &new{2023-11-17 (金) 22:02:47}; - Thanks for sharing such a good idea, paragraph is pleasant, thats why i have read it entirely -- [[D Change]] &new{2023-11-17 (金) 22:03:18}; - Thanks for sharing such a good idea, paragraph is pleasant, thats why i have read it entirely -- [[D Change]] &new{2023-11-17 (金) 22:03:49}; - Thanks for sharing such a good idea, paragraph is pleasant, thats why i have read it entirely -- [[D Change]] &new{2023-11-17 (金) 22:04:20}; #comment #topicpath SIZE(10){現在のアクセス:&counter;}