<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Mercurial trac commit hook</title>
	<atom:link href="http://swag.dk/blog/2008/10/13/mercurial-trac-commit-hook/feed/" rel="self" type="application/rss+xml" />
	<link>http://swag.dk/blog/2008/10/13/mercurial-trac-commit-hook/</link>
	<description></description>
	<lastBuildDate>Fri, 13 Nov 2009 10:03:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: math</title>
		<link>http://swag.dk/blog/2008/10/13/mercurial-trac-commit-hook/comment-page-1/#comment-776</link>
		<dc:creator>math</dc:creator>
		<pubDate>Fri, 30 Oct 2009 14:35:07 +0000</pubDate>
		<guid isPermaLink="false">http://swag.dk/blog/?p=56#comment-776</guid>
		<description>&lt;p&gt;Hmm, just copying the trachook.py to the place gave me an permission error, that normal users which checkin doesn&#039;t have the permission to change /srv/trac/myProject files. How did you solved this??&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hmm, just copying the trachook.py to the place gave me an permission error, that normal users which checkin doesn&#8217;t have the permission to change /srv/trac/myProject files. How did you solved this??</p>]]></content:encoded>
	</item>
	<item>
		<title>By: hyper</title>
		<link>http://swag.dk/blog/2008/10/13/mercurial-trac-commit-hook/comment-page-1/#comment-743</link>
		<dc:creator>hyper</dc:creator>
		<pubDate>Tue, 04 Aug 2009 09:32:48 +0000</pubDate>
		<guid isPermaLink="false">http://swag.dk/blog/?p=56#comment-743</guid>
		<description>&lt;p&gt;I kept getting import errors on trachook, eve though i could import successfully into a python shell. I think it had something to do with my PYTHONPATH not being the same as the webserver user&#039;s one.&lt;/p&gt;

&lt;p&gt;I fixed the import problem by using a more explicit syntax:
In ~/.hgrc:&lt;/p&gt;

&lt;p&gt;[extensions]
trachook = /full/path/to/trachook.py&lt;/p&gt;

&lt;p&gt;then in your repository-specific hgrc, follow the syntax exactly as shown in the original entry.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I kept getting import errors on trachook, eve though i could import successfully into a python shell. I think it had something to do with my PYTHONPATH not being the same as the webserver user&#8217;s one.</p>

<p>I fixed the import problem by using a more explicit syntax:
In ~/.hgrc:</p>

<p>[extensions]
trachook = /full/path/to/trachook.py</p>

<p>then in your repository-specific hgrc, follow the syntax exactly as shown in the original entry.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Mads Sülau Jørgensen</title>
		<link>http://swag.dk/blog/2008/10/13/mercurial-trac-commit-hook/comment-page-1/#comment-184</link>
		<dc:creator>Mads Sülau Jørgensen</dc:creator>
		<pubDate>Tue, 07 Apr 2009 11:59:18 +0000</pubDate>
		<guid isPermaLink="false">http://swag.dk/blog/?p=56#comment-184</guid>
		<description>&lt;p&gt;I&#039;ve givin you write acess to the repository, should you want to maintain it (better than moving it imo) :)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I&#8217;ve givin you write acess to the repository, should you want to maintain it (better than moving it imo) :)</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Marcus Lindblom</title>
		<link>http://swag.dk/blog/2008/10/13/mercurial-trac-commit-hook/comment-page-1/#comment-183</link>
		<dc:creator>Marcus Lindblom</dc:creator>
		<pubDate>Tue, 07 Apr 2009 11:49:53 +0000</pubDate>
		<guid isPermaLink="false">http://swag.dk/blog/?p=56#comment-183</guid>
		<description>&lt;p&gt;For others who end up on this page, I&#039;ve cloned Mads repo (as he knows) and changed some bits. It&#039;s now available here and I&#039;ll try to maintain it until the Trac-devs integrate a hook into trac releases. &lt;/p&gt;

&lt;p&gt;http://bitbucket.org/marcusl/mercurial-trac-hook/&lt;/p&gt;

&lt;p&gt;Comnments welcome. :)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>For others who end up on this page, I&#8217;ve cloned Mads repo (as he knows) and changed some bits. It&#8217;s now available here and I&#8217;ll try to maintain it until the Trac-devs integrate a hook into trac releases. </p>

<p><a href="http://bitbucket.org/marcusl/mercurial-trac-hook/" rel="nofollow">http://bitbucket.org/marcusl/mercurial-trac-hook/</a></p>

<p>Comnments welcome. :)</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Mads Sülau Jørgensen</title>
		<link>http://swag.dk/blog/2008/10/13/mercurial-trac-commit-hook/comment-page-1/#comment-122</link>
		<dc:creator>Mads Sülau Jørgensen</dc:creator>
		<pubDate>Thu, 05 Feb 2009 09:04:26 +0000</pubDate>
		<guid isPermaLink="false">http://swag.dk/blog/?p=56#comment-122</guid>
		<description>&lt;p&gt;I&#039;ve pushed a new version of the hook now - just changed the count() to len(). Let me know if it should break something (it shouldn&#039;t).&lt;/p&gt;

&lt;p&gt;&lt;p&gt;Thanks Marcus!&lt;/p&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I&#8217;ve pushed a new version of the hook now &#8211; just changed the count() to len(). Let me know if it should break something (it shouldn&#8217;t).</p>

<p></p><p>Thanks Marcus!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Marcus Lindblom</title>
		<link>http://swag.dk/blog/2008/10/13/mercurial-trac-commit-hook/comment-page-1/#comment-121</link>
		<dc:creator>Marcus Lindblom</dc:creator>
		<pubDate>Tue, 03 Feb 2009 08:13:16 +0000</pubDate>
		<guid isPermaLink="false">http://swag.dk/blog/?p=56#comment-121</guid>
		<description>&lt;p&gt;Another fix. Starting at v1.1, Mercurial&#039;s changelog do not have a count() function anymore. Rather, you need to do use the len() built-in function. &lt;/p&gt;

&lt;p&gt;I&#039;ve patched my version for this. Some logic is probably needed to make it work for different versions of Hg.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Another fix. Starting at v1.1, Mercurial&#8217;s changelog do not have a count() function anymore. Rather, you need to do use the len() built-in function. </p>

<p>I&#8217;ve patched my version for this. Some logic is probably needed to make it work for different versions of Hg.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Marcus Lindblom</title>
		<link>http://swag.dk/blog/2008/10/13/mercurial-trac-commit-hook/comment-page-1/#comment-117</link>
		<dc:creator>Marcus Lindblom</dc:creator>
		<pubDate>Wed, 14 Jan 2009 08:55:25 +0000</pubDate>
		<guid isPermaLink="false">http://swag.dk/blog/?p=56#comment-117</guid>
		<description>&lt;p&gt;I had to move to hg-ssh in cygwin to make things work, so then I got:&lt;/p&gt;

&lt;p&gt;TypeError: &#039;_demandmod&#039; object is not iterable&lt;/p&gt;

&lt;p&gt;I just disabled demandimport at the top of trachook.py, and this made things work again:&lt;/p&gt;

&lt;p&gt;from mercurial import demandimport
demandimport.disable()&lt;/p&gt;

&lt;p&gt;One could probably be more selective in the disabling, but this seem to work for now.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I had to move to hg-ssh in cygwin to make things work, so then I got:</p>

<p>TypeError: &#8216;_demandmod&#8217; object is not iterable</p>

<p>I just disabled demandimport at the top of trachook.py, and this made things work again:</p>

<p>from mercurial import demandimport
demandimport.disable()</p>

<p>One could probably be more selective in the disabling, but this seem to work for now.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Mads Sülau Jørgensen</title>
		<link>http://swag.dk/blog/2008/10/13/mercurial-trac-commit-hook/comment-page-1/#comment-101</link>
		<dc:creator>Mads Sülau Jørgensen</dc:creator>
		<pubDate>Mon, 27 Oct 2008 20:05:01 +0000</pubDate>
		<guid isPermaLink="false">http://swag.dk/blog/?p=56#comment-101</guid>
		<description>&lt;p&gt;There, updated at bitbucket. I&#039;ve added an re.I to the match, which should fix it.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>There, updated at bitbucket. I&#8217;ve added an re.I to the match, which should fix it.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Mads Sülau Jørgensen</title>
		<link>http://swag.dk/blog/2008/10/13/mercurial-trac-commit-hook/comment-page-1/#comment-100</link>
		<dc:creator>Mads Sülau Jørgensen</dc:creator>
		<pubDate>Mon, 27 Oct 2008 14:55:23 +0000</pubDate>
		<guid isPermaLink="false">http://swag.dk/blog/?p=56#comment-100</guid>
		<description>&lt;p&gt;That&#039;s something that the orginal hook does as well. I&#039;ll update my version later tonight, as it&#039;s a very annoying &quot;feature&quot;.&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>That&#8217;s something that the orginal hook does as well. I&#8217;ll update my version later tonight, as it&#8217;s a very annoying &#8220;feature&#8221;.</p>

<p>Thanks.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Marcus Lindblom</title>
		<link>http://swag.dk/blog/2008/10/13/mercurial-trac-commit-hook/comment-page-1/#comment-99</link>
		<dc:creator>Marcus Lindblom</dc:creator>
		<pubDate>Mon, 27 Oct 2008 14:34:24 +0000</pubDate>
		<guid isPermaLink="false">http://swag.dk/blog/?p=56#comment-99</guid>
		<description>&lt;p&gt;The hook works fine, but it isn&#039;t case independent on commands. so &#039;Fixes&#039; or &#039;See&#039; doesn&#039;t work. &lt;/p&gt;

&lt;p&gt;Easy to add by appending .lower() on the call:&lt;/p&gt;

&lt;pre lang=&quot;python&quot;&gt;
cmd_groups = command_re.findall(self.msg.lower())&lt;/pre&gt;
</description>
		<content:encoded><![CDATA[<p>The hook works fine, but it isn&#8217;t case independent on commands. so &#8216;Fixes&#8217; or &#8216;See&#8217; doesn&#8217;t work. </p>

<p>Easy to add by appending .lower() on the call:</p>


<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">cmd_groups = command_re.<span style="color: black;">findall</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>.<span style="color: black;">msg</span>.<span style="color: black;">lower</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></pre></div></div>
]]></content:encoded>
	</item>
</channel>
</rss>
