Subversionはたとえばコミット時に開発者にメールするなど、Subversionへのアクションをフックしてなにか処理をさせることが出来ます。
現在バグトラッキングシステムのTracとの連携を色々調べてますが、この機能を使って処理を行い、Tracのバグ問票(以下チケットといいます)にコメントを追加したり、チケットをクローズさせたり色々できるみたいですね。
とりあえずもくろんでるのは
- EclipseのMylarでTracの障害問票を起票できる
- もちろんそれはWEBブラウザでも閲覧できる。もちろん誰かの修正はEclipse/MylarでもWEBでも即座に反映される
- ソースコードはSubversionで管理してて、もちろんEclipseからコミットできる
- コミットの際のコミットログは、そのコミットのトリガとなる障害問票にコメントとして追記される
- その障害問票がトリガとなったソース修正のdiff画面へは、その問票から即座に画面遷移できる
- 最終的なコミットで、その障害問票はクローズされる*1
- 適度にユーザ管理され、問票の起票やコミット作業は誰がやったか管理が出来る。
今のところこれくらいなら出来そうですね。*2
さてその仕組みですが、SVNははじめからフック機能が備わっています。つまりフックスクリプトにもあるとおり、コミットする前・した後などいろんなイベントに反応するリスナが定義されていて、テンプレートが用意されています。具体的には
[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のチケットにコメントを書き込む †
すでにスクリプトは http://d.hatena.ne.jp/masanobuimai/20060512#1147445105 を参考に作成しておきました。
これを先のディレクトリに置いておけば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
- チケットをクローズする
この記事は
- 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?
- 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?
- 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?
- 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?
- 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?
- 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?
- 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?
- 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?
- Thanks for sharing such a good idea, paragraph is pleasant, thats why i have read it entirely -- D Change?
- Thanks for sharing such a good idea, paragraph is pleasant, thats why i have read it entirely -- D Change?
- Thanks for sharing such a good idea, paragraph is pleasant, thats why i have read it entirely -- D Change?
- Thanks for sharing such a good idea, paragraph is pleasant, thats why i have read it entirely -- D Change?
- Thanks a bunch for sharing this with all people you really realize what you are talking approximately! Bookmarked. Kindly additionally seek advice from my site =). We will have a link alternate agreement between us -- d-change.net?
- Thanks a bunch for sharing this with all people you really realize what you are talking approximately! Bookmarked. Kindly additionally seek advice from my site =). We will have a link alternate agreement between us -- d-change.net?
- Thanks a bunch for sharing this with all people you really realize what you are talking approximately! Bookmarked. Kindly additionally seek advice from my site =). We will have a link alternate agreement between us -- d-change.net?
- Thanks a bunch for sharing this with all people you really realize what you are talking approximately! Bookmarked. Kindly additionally seek advice from my site =). We will have a link alternate agreement between us -- d-change.net?
- Hi, this weekend is pleasant designed for me, for the reason that this point in time i am reading this enormous educational article here at my home. -- D Change?
- Hi, this weekend is pleasant designed for me, for the reason that this point in time i am reading this enormous educational article here at my home. -- D Change?
- Hi, this weekend is pleasant designed for me, for the reason that this point in time i am reading this enormous educational article here at my home. -- D Change?
- Hi, this weekend is pleasant designed for me, for the reason that this point in time i am reading this enormous educational article here at my home. -- D Change?
- Asking questions are really pleasant thing if you are not understanding something entirely, but this article presents nice understanding even. -- D Change?
- Asking questions are really pleasant thing if you are not understanding something entirely, but this article presents nice understanding even. -- D Change?
- Asking questions are really pleasant thing if you are not understanding something entirely, but this article presents nice understanding even. -- D Change?
- Asking questions are really pleasant thing if you are not understanding something entirely, but this article presents nice understanding even. -- D Change?
- Hello, I wish for to subscribe for this website to get hottest updates, so where can i do it please assist. -- D Change?
- Hello, I wish for to subscribe for this website to get hottest updates, so where can i do it please assist. -- D Change?
- Hello, I wish for to subscribe for this website to get hottest updates, so where can i do it please assist. -- D Change?
- Hello, I wish for to subscribe for this website to get hottest updates, so where can i do it please assist. -- D Change?
- You need to be a part of a contest for one of the best blogs on the web. I am going to recommend this web site! -- d-change.net?
- You need to be a part of a contest for one of the best blogs on the web. I am going to recommend this web site! -- d-change.net?
- You need to be a part of a contest for one of the best blogs on the web. I am going to recommend this web site! -- d-change.net?
- You need to be a part of a contest for one of the best blogs on the web. I am going to recommend this web site! -- d-change.net?
- This post is worth everyone's attention. How can I find out more? -- D Change?
- This post is worth everyone's attention. How can I find out more? -- D Change?
- This post is worth everyone's attention. How can I find out more? -- D Change?
- This post is worth everyone's attention. How can I find out more? -- D Change?
- If you want to grow your know-how just keep visiting this web site and be updated with the hottest gossip posted here. -- D Change?
- If you want to grow your know-how just keep visiting this web site and be updated with the hottest gossip posted here. -- D Change?
- If you want to grow your know-how just keep visiting this web site and be updated with the hottest gossip posted here. -- D Change?
- If you want to grow your know-how just keep visiting this web site and be updated with the hottest gossip posted here. -- D Change?
- I don't even know how I finished up here, however I thought this put up was great. I do not realize who you are however certainly you are going to a famous blogger in case you are not already. Cheers! -- D Change?
- I don't even know how I finished up here, however I thought this put up was great. I do not realize who you are however certainly you are going to a famous blogger in case you are not already. Cheers! -- D Change?
- I don't even know how I finished up here, however I thought this put up was great. I do not realize who you are however certainly you are going to a famous blogger in case you are not already. Cheers! -- D Change?
- I don't even know how I finished up here, however I thought this put up was great. I do not realize who you are however certainly you are going to a famous blogger in case you are not already. Cheers! -- D Change?
- Awesome things here. I am very happy to look your post. Thank you so much and I am looking ahead to touch you. Will you kindly drop me a mail? -- d-change.net?
- Awesome things here. I am very happy to look your post. Thank you so much and I am looking ahead to touch you. Will you kindly drop me a mail? -- d-change.net?
- Awesome things here. I am very happy to look your post. Thank you so much and I am looking ahead to touch you. Will you kindly drop me a mail? -- d-change.net?
- Awesome things here. I am very happy to look your post. Thank you so much and I am looking ahead to touch you. Will you kindly drop me a mail? -- d-change.net?
- We stumbled over here by a different website and thought I might check things out. I like what I see so now i am following you. Look forward to going over your web page repeatedly. -- d-change.net?
- We stumbled over here by a different website and thought I might check things out. I like what I see so now i am following you. Look forward to going over your web page repeatedly. -- d-change.net?
- We stumbled over here by a different website and thought I might check things out. I like what I see so now i am following you. Look forward to going over your web page repeatedly. -- d-change.net?
- We stumbled over here by a different website and thought I might check things out. I like what I see so now i am following you. Look forward to going over your web page repeatedly. -- d-change.net?
- Hmm it appears like your site ate my first comment (it was extremely long) so I guess I'll just sum it up what I had written and say, I'm thoroughly enjoying your blog. I as well am an aspiring blog blogger but I'm still new to everything. Do you have any points for first-time blog writers? I'd really appreciate it. -- d-change.net?
- Hmm it appears like your site ate my first comment (it was extremely long) so I guess I'll just sum it up what I had written and say, I'm thoroughly enjoying your blog. I as well am an aspiring blog blogger but I'm still new to everything. Do you have any points for first-time blog writers? I'd really appreciate it. -- d-change.net?
- Hmm it appears like your site ate my first comment (it was extremely long) so I guess I'll just sum it up what I had written and say, I'm thoroughly enjoying your blog. I as well am an aspiring blog blogger but I'm still new to everything. Do you have any points for first-time blog writers? I'd really appreciate it. -- d-change.net?
- Hmm it appears like your site ate my first comment (it was extremely long) so I guess I'll just sum it up what I had written and say, I'm thoroughly enjoying your blog. I as well am an aspiring blog blogger but I'm still new to everything. Do you have any points for first-time blog writers? I'd really appreciate it. -- d-change.net?
現在のアクセス:8613