<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>へびにっき &#187; Redmine</title>
	<atom:link href="http://wp.serpere.info/archives/tag/redmine/feed" rel="self" type="application/rss+xml" />
	<link>http://wp.serpere.info</link>
	<description>樹上で暮らすヘビのように生きたい</description>
	<lastBuildDate>Thu, 09 Feb 2012 11:35:51 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Redmineのマイページで終了チケットを表示しない</title>
		<link>http://wp.serpere.info/archives/606</link>
		<comments>http://wp.serpere.info/archives/606#comments</comments>
		<pubDate>Fri, 24 Jul 2009 08:37:47 +0000</pubDate>
		<dc:creator>tkykmw</dc:creator>
				<category><![CDATA[未分類]]></category>
		<category><![CDATA[Redmine]]></category>

		<guid isPermaLink="false">http://wp.serpere.info/?p=606</guid>
		<description><![CDATA[マイページの「報告したチケット」の中で、終了したチケットが表示されて鬱陶しかったので、 app/views/my/blocks/_issuesreportedbyme.rhtml を修正。:conditionsの中に以下の条件を追加。 #{IssueStatus.table_name}.is_closed=0]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_jade" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwp.serpere.info%252Farchives%252F606%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Redmine%E3%81%AE%E3%83%9E%E3%82%A4%E3%83%9A%E3%83%BC%E3%82%B8%E3%81%A7%E7%B5%82%E4%BA%86%E3%83%81%E3%82%B1%E3%83%83%E3%83%88%E3%82%92%E8%A1%A8%E7%A4%BA%E3%81%97%E3%81%AA%E3%81%84%22%20%7D);"></div>
<p>マイページの「報告したチケット」の中で、終了したチケットが表示されて鬱陶しかったので、<br />
app/views/my/blocks/_issuesreportedbyme.rhtml<br />
を修正。:conditionsの中に以下の条件を追加。</p>
<pre>#{IssueStatus.table_name}.is_closed=0</pre>

]]></content:encoded>
			<wfw:commentRss>http://wp.serpere.info/archives/606/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RedmineでGitのリモートリポジトリを参照</title>
		<link>http://wp.serpere.info/archives/581</link>
		<comments>http://wp.serpere.info/archives/581#comments</comments>
		<pubDate>Fri, 10 Jul 2009 13:09:17 +0000</pubDate>
		<dc:creator>tkykmw</dc:creator>
				<category><![CDATA[未分類]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[Redmine]]></category>

		<guid isPermaLink="false">http://wp.serpere.info/?p=581</guid>
		<description><![CDATA[Redmineでブラウズの対象とするには local かつ bare なリポジトリでなければならないので、そのままでは使えない。そこでまず対象リポジトリのミラーとなるbareリポジトリを作る。 git clone --bare git://host/path.git cd path git remote add --mirror origin git://host/path.git 最近のバージョンの git では clone のオプションに &#8211;mirror を直接指定することができるらしいが、1.5.6 では上の手順が必要だった。 # git-1.6.0.6以降 git clone --mirror git://host/path.git リポジトリを同期するには、ミラーリポジトリ内で fetch を実行する。cronで定期的に実行するよう設定しておけば実用上は十分だろう。 git fetch origin あとはこのミラーリポジトリのパスをRedmineに設定しておく。 異なるブランチを使用する Redmineの設定画面にはブランチ名の項目は無い。 lib/redmine/scm/adapters/git_adapter.rb をチェックしたところ、常に”現在の”ブランチが使用されるようだ。 @branch &#124;&#124;= shellout&#40;&#34;#{GIT_BIN} --git-dir #{target('')} branch&#34;&#41; &#123; &#124;io&#124; io.grep&#40;/\*/&#41;&#91;0&#93;.strip.match&#40;/\* &#40;.*&#41;/&#41;&#91;1&#93; &#125; 改造するのも面倒なので、異なるブランチには異なるリポジトリを割り当てることにした。上と全く同じ手順で bare [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_jade" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwp.serpere.info%252Farchives%252F581%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Redmine%E3%81%A7Git%E3%81%AE%E3%83%AA%E3%83%A2%E3%83%BC%E3%83%88%E3%83%AA%E3%83%9D%E3%82%B8%E3%83%88%E3%83%AA%E3%82%92%E5%8F%82%E7%85%A7%22%20%7D);"></div>
<p>Redmineでブラウズの対象とするには local かつ bare なリポジトリでなければならないので、そのままでは使えない。そこでまず対象リポジトリのミラーとなるbareリポジトリを作る。</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">git</span> clone <span style="color: #660033;">--bare</span> <span style="color: #c20cb9; font-weight: bold;">git</span>:<span style="color: #000000; font-weight: bold;">//</span>host<span style="color: #000000; font-weight: bold;">/</span>path.git
<span style="color: #7a0874; font-weight: bold;">cd</span> path
<span style="color: #c20cb9; font-weight: bold;">git</span> remote add <span style="color: #660033;">--mirror</span> origin <span style="color: #c20cb9; font-weight: bold;">git</span>:<span style="color: #000000; font-weight: bold;">//</span>host<span style="color: #000000; font-weight: bold;">/</span>path.git</pre></div></div>



<p>最近のバージョンの git では clone のオプションに &#8211;mirror を直接指定することができるらしいが、1.5.6 では上の手順が必要だった。</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># git-1.6.0.6以降</span>
<span style="color: #c20cb9; font-weight: bold;">git</span> clone <span style="color: #660033;">--mirror</span> <span style="color: #c20cb9; font-weight: bold;">git</span>:<span style="color: #000000; font-weight: bold;">//</span>host<span style="color: #000000; font-weight: bold;">/</span>path.git</pre></div></div>



<p>リポジトリを同期するには、ミラーリポジトリ内で fetch を実行する。cronで定期的に実行するよう設定しておけば実用上は十分だろう。</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">git</span> fetch origin</pre></div></div>



<p>あとはこのミラーリポジトリのパスをRedmineに設定しておく。</p>
<h3>異なるブランチを使用する</h3>
<p>Redmineの設定画面にはブランチ名の項目は無い。<br />
lib/redmine/scm/adapters/git_adapter.rb<br />
をチェックしたところ、常に”現在の”ブランチが使用されるようだ。</p>


<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#0066ff; font-weight:bold;">@branch</span> <span style="color:#006600; font-weight:bold;">||</span>= shellout<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;#{GIT_BIN} --git-dir #{target('')} branch&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>io<span style="color:#006600; font-weight:bold;">|</span> io.<span style="color:#9900CC;">grep</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">/</span>\<span style="color:#006600; font-weight:bold;">*/</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">strip</span>.<span style="color:#9900CC;">match</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">/</span>\<span style="color:#006600; font-weight:bold;">*</span> <span style="color:#006600; font-weight:bold;">&#40;</span>.<span style="color:#006600; font-weight:bold;">*</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">1</span><span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#125;</span></pre></div></div>



<p>改造するのも面倒なので、異なるブランチには異なるリポジトリを割り当てることにした。上と全く同じ手順で bare リポジトリを作った後、HEADファイル内の参照を書き換える（bareリポジトリ なので checkout は使用できない）。</p>
<pre>ref: refs/heads/your_branch</pre>
<p>fetch の手順などは全く同じで良い。</p>

]]></content:encoded>
			<wfw:commentRss>http://wp.serpere.info/archives/581/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

