<?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>ClearChain &#187; git</title>
	<atom:link href="http://www.clearchain.com/blog/tags/git/feed" rel="self" type="application/rss+xml" />
	<link>http://www.clearchain.com/blog</link>
	<description>-= Daily Happenings =-</description>
	<lastBuildDate>Tue, 17 Aug 2010 06:21:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>jhbuild using a git branch</title>
		<link>http://www.clearchain.com/blog/posts/jhbuild-using-a-git-branch</link>
		<comments>http://www.clearchain.com/blog/posts/jhbuild-using-a-git-branch#comments</comments>
		<pubDate>Thu, 29 Jan 2009 04:29:57 +0000</pubDate>
		<dc:creator>Benjamin Close</dc:creator>
				<category><![CDATA[FreeDesktop]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[jhbuild]]></category>

		<guid isPermaLink="false">http://www.clearchain.com/blog/?p=199</guid>
		<description><![CDATA[Recently I&#8217;ve been playing around with jhbuild. I wanted to jhbuild to use a custom branch from a git repo I&#8217;ve setup.  Sadly the documentation on how to do this is a little lacking. Added to the fact that the jhbuild code drops an argument and there&#8217;s a lot of fun at work. The solution, [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve been playing around with jhbuild. I wanted to jhbuild to use a custom branch from a git repo I&#8217;ve setup.  Sadly the documentation on how to do this is a little lacking. Added to the fact that the jhbuild code drops an argument and there&#8217;s a lot of fun at work.</p>
<p>The solution, use the revision attribute in your module set file:</p>
<p> </p>
<p> &lt;repository type=&#8221;git&#8221; name=&#8221;git.freedesktop.org&#8221;   href=&#8221;git://anongit.freedesktop.org/&#8221;/&gt;<br />
 <span style="color: #800080;">&lt;branch repo=&#8221;git.freedesktop.org&#8221;    module=&#8221;~benjsc/xorg/proto/compositeproto&#8221; checkoutdir=&#8221;xorg/proto/compositeproto&#8221; </span><strong><em><span style="color: #800080;">revision=&#8221;ir&#8221;</span></em></strong><span style="color: #800080;"> /&gt;</span></p>
<p> </p>
<p>This checks out the ir branch of the repo: git://anongit.freedesktop.org/~benjsc/xorg/proto/compositeproto<br />
<span id="more-199"></span><br />
For those looking at the jhbuild code, you can see the fun with the dropped argument:</p>
<p><span style="color: #3366ff;">class GitRepository</span></p>
<p>&#8230;</p>
<p>def branch(self, name, module = None, subdir=&#8221;", checkoutdir = None,<br />
<span style="white-space:pre"><span style="white-space:pre"> </span> </span>revision = None, tag = None):<br />
<span style="white-space:pre"><span style="white-space:pre"> </span> </span>if name in self.config.branches:<br />
<span style="white-space:pre"><span style="white-space:pre"> </span> </span>module = self.config.branches[name]<br />
<span style="white-space:pre"><span style="white-space:pre"> </span> </span>if not module:<br />
<span style="white-space:pre"><span style="white-space:pre"> </span> </span>raise FatalError(_(&#8216;branch for %s has wrong override, check your .jhbuildrc&#8217;) % name)<br />
<span style="white-space:pre"><span style="white-space:pre"> </span> </span>else:<br />
<span style="white-space:pre"><span style="white-space:pre"> </span> </span>if module is None:<br />
<span style="white-space:pre"><span style="white-space:pre"> </span> </span>module = name<br />
<span style="white-space:pre"><span style="white-space:pre"> </span> </span>module = urlparse.urljoin(self.href, module)<br />
<span style="white-space:pre"><span style="white-space:pre"> </span> </span>return <strong>GitBranch(self, module, subdir, checkoutdir, <span style="text-decoration: underline;"><em>revision, tag</em></span>)</strong></p>
<p> </p>
<p><span style="color: #3366ff;">class GitBranch(Branch):</span><br />
<span style="white-space: pre;"> </span>&#8220;&#8221;"A class representing a GIT branch.&#8221;"&#8221;</p>
<p><span style="white-space: pre;"> </span>def __init__(self, repository, module, subdir, checkoutdir=None, branch=None, <strong><span style="text-decoration: underline;">tag=None</span></strong>):<br />
<span style="white-space: pre;"> </span>Branch.__init__(self, repository, module, checkoutdir)<br />
<span style="white-space: pre;"> </span>self.subdir = subdir<br />
<span style="white-space: pre;"> </span>self.branch = branch<br />
<span style="white-space: pre;"> </span>self.tag = tag</p>
<p><span style="color: #ff0000;">So Where revision go?</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.clearchain.com/blog/posts/jhbuild-using-a-git-branch/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>cgit upgrade &amp; gitweb retired</title>
		<link>http://www.clearchain.com/blog/posts/cgit-upgrade-gitweb-retired</link>
		<comments>http://www.clearchain.com/blog/posts/cgit-upgrade-gitweb-retired#comments</comments>
		<pubDate>Mon, 24 Nov 2008 02:49:05 +0000</pubDate>
		<dc:creator>Benjamin Close</dc:creator>
				<category><![CDATA[FreeDesktop]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[cgit]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[rewrite]]></category>

		<guid isPermaLink="false">http://www.clearchain.com/blog/?p=142</guid>
		<description><![CDATA[With CGit v0.8 supporting, atom feeds, patch targets and also the clone-url option, it&#8217;s time to finally rid ourselves of the memory hungry gitweb. Hence cgit.fd.o has been upgraded and gitweb been pointed to cgit.fd.o. There&#8217;s also a bucket load of redirects in place to support this. Hence all the old gitweb url&#8217;s should correctly [...]]]></description>
			<content:encoded><![CDATA[<p>With<a href="http://hjemli.net/git/cgit/"> CGit</a> v0.8 supporting, atom feeds, patch targets and also the clone-url option, it&#8217;s time to finally rid ourselves of the memory hungry gitweb. Hence <a href="http://cgit.freedesktop.org/">cgit.fd.o</a> has been upgraded and gitweb been pointed to cgit.fd.o. There&#8217;s also a bucket load of redirects in place to support this. Hence all the old gitweb url&#8217;s should correctly translate into cgit urls.</p>
<p><span id="more-142"></span></p>
<p>Here&#8217;s the url redirect list in case someone else wants to use cgit over gitweb (highly recommended)</p>
<pre>&lt;VirtualHost *:80&gt;
        ServerName gitweb2.freedesktop.org
        ServerAdmin <a class="moz-txt-link-abbreviated" href="mailto:sitewranglers@freedesktop.org">sitewranglers@freedesktop.org</a>

        CustomLog /var/log/apache2/gitweb.freedesktop.org-access.log combined
        ErrorLog /var/log/apache2/gitweb.freedesktop.org-error.log

        #
        # Redirects mapping gitweb -&gt; cgit
        #
        # Gitweb uses get targets seperated by ;
        #
        # /?...;...;...
        #
        # p = Project
        # a = action ( blob, blob_plain, blobdiff, commitdiff, commit, shortlog, summary, tree, log, tag, history, rss)
        # h = SHA Hash
        # o = sort order
        # hb= SHA Hash Tree Base
        # hp= ?
        # pg= page
        # f= file/dir
        #
        # Cgit uses the following:
        #
        # <em class="moz-txt-slash"><span class="moz-txt-tag">/</span>project/action<span class="moz-txt-tag">/</span></em>?...
        #
        # action ( commit, log, diff, tree, tag, patch  )
        #
        # id = SHA Hash
        # id2 = SHA Hash
        # h = head
        #
        # Translation rules
        #
        # Project is a straight redirect
        # ---
        # /?p=([^.]+).git;       <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/$1/">http://cgit.freedesktop.org/$1/</a>
        #
        # Action requires a mapping
        # ---
        # a=(blob|tree) <em class="moz-txt-slash"><span class="moz-txt-tag">/</span>tree<span class="moz-txt-tag">/</span></em>
        # a=(blobdiff|commitdiff)       <em class="moz-txt-slash"><span class="moz-txt-tag">/</span>diff<span class="moz-txt-tag">/</span></em>
        # a=commit      <em class="moz-txt-slash"><span class="moz-txt-tag">/</span>commit<span class="moz-txt-tag">/</span></em>
        # a=(summary)   /
        # a=(shortlog|log|history)      <em class="moz-txt-slash"><span class="moz-txt-tag">/</span>log<span class="moz-txt-tag">/</span></em>
        # a=tag         <em class="moz-txt-slash"><span class="moz-txt-tag">/</span>tag<span class="moz-txt-tag">/</span></em>
        # a=blob_plain  <em class="moz-txt-slash"><span class="moz-txt-tag">/</span>blob<span class="moz-txt-tag">/</span></em>
        # a=rss    ?No CGIT Equivilant?
        #
        # Targets require mapping
        # ---
        # h=([^;]+)     id=$1
        # f=([^;]+)     /$1
        # hb=([^;]+)    id2=$1
        # hp([^;]+      id=$1
        #
        # Now putting it all together
        #
        RewriteEngine On
        #RewriteLog /tmp/rewrite.log
        #RewriteLogLevel 5
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=blob;h=([^;]+);hb=([^;]+);f=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/tree/%5?id=%3;id2=%4">http://cgit.freedesktop.org/%1/tree/%5?id=%3;id2=%4</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=blob;hb=([^;]+);f=([^;]+)
        RewriteRule ^/$  <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/tree/%4?id=%3">http://cgit.freedesktop.org/%1/tree/%4?id=%3</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=tree;h=([^;]+);hb=([^;]+);f=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/tree/%5?id=%4">http://cgit.freedesktop.org/%1/tree/%5?id=%4</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=tree;h=([^;]+);hb=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/tree/?id=%4">http://cgit.freedesktop.org/%1/tree/?id=%4</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=tree;hb=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/tree/?id=%3">http://cgit.freedesktop.org/%1/tree/?id=%3</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=tree
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/tree/">http://cgit.freedesktop.org/%1/tree/</a>? [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=blobdiff;h=([^;]+);hp=([^;]+);hb=([^;]+);f=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/diff/%6?id2=%4;id=%3;id3=%5">http://cgit.freedesktop.org/%1/diff/%6?id2=%4;id=%3;id3=%5</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=commitdiff;h=([^;]+);hp=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/diff/?id=%4;id2=%3">http://cgit.freedesktop.org/%1/diff/?id=%4;id2=%3</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=commitdiff;h=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/diff/?id=%3">http://cgit.freedesktop.org/%1/diff/?id=%3</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=commit;h=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/commit/?id=%3">http://cgit.freedesktop.org/%1/commit/?id=%3</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=shortlog;h=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/log/?id=%3">http://cgit.freedesktop.org/%1/log/?id=%3</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=shortlog
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/log/">http://cgit.freedesktop.org/%1/log/</a>? [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=log;h=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/log/?id=%3">http://cgit.freedesktop.org/%1/log/?id=%3</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=log
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/log">http://cgit.freedesktop.org/%1/log</a>? [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=history;h=([^;]+);hb=([^;]+);f=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/log/%5?id=%4">http://cgit.freedesktop.org/%1/log/%5?id=%4</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=history;h=([^;]+);hb=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/log/?id=%4">http://cgit.freedesktop.org/%1/log/?id=%4</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=history;hb=([^;]+);f=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/log/%4?id=%3">http://cgit.freedesktop.org/%1/log/%4?id=%3</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=history;hb=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/log/?id=%3">http://cgit.freedesktop.org/%1/log/?id=%3</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=tag;h=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/tag/?id=%4">http://cgit.freedesktop.org/%1/tag/?id=%4</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=blob_plain;h=([^;]+);f=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/blob/%4?id=%3">http://cgit.freedesktop.org/%1/blob/%4?id=%3</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=blob_plain;f=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/blob/%4">http://cgit.freedesktop.org/%1/blob/%4</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=rss
        RewriteRule ^/$ http://cgit.freedesktop.org/%1/atom? [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=summary
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/">http://cgit.freedesktop.org/%1/</a>? [R,L,NE]
        #
        # Fail safes incase nothing above matches, try at least to put the person in the project, els root of cgit
        RewriteCond %{query_string} p=([^.]+)(\.git)*.*
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/">http://cgit.freedesktop.org/%1/</a>? [R,L,NE]
        RewriteRule ^.* <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/">http://cgit.freedesktop.org/</a> [R,L,NE]
&lt;/VirtualHost&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.clearchain.com/blog/posts/cgit-upgrade-gitweb-retired/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
