<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/atom10full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US">
  <title>A Single Programmer's Blog - Home</title>
  <id>tag:blog.teksol.info,2008:mephisto/</id>
  <generator version="0.8.0" uri="http://mephistoblog.com">Mephisto Drax</generator>
  
  <link href="http://blog.teksol.info/" rel="alternate" type="text/html" />
  <updated>2008-05-14T00:26:15Z</updated>
  <link rel="self" href="http://feeds.feedburner.com/teksol" type="application/atom+xml" /><entry xml:base="http://blog.teksol.info/">
    <author>
      <name>francois</name>
    </author>
    <id>tag:blog.teksol.info,2008-05-14:5379</id>
    <published>2008-05-14T04:23:00Z</published>
    <updated>2008-05-14T00:26:15Z</updated>
    <category term="piston" />
    <link href="http://blog.teksol.info/2008/5/14/piston-on-google-returns-piston-rubyforge-org" rel="alternate" type="text/html" />
    <title>"piston" on Google returns piston.rubyforge.org</title>
<content type="html">
            &lt;p&gt;Wow, without my ever doing anything special, searching for “piston” on Google returns this:&lt;/p&gt;


&lt;p&gt;
&lt;a href="http://google.com/search?q=piston"&gt;&lt;img src="http://blog.teksol.info/assets/2008/5/14/piston-number-1.jpg" alt="Piston is the #1 search result on Google for the string 'piston'" /&gt;&lt;/a&gt;
&lt;/p&gt;

	&lt;p&gt;Thanks to everyone who linked to &lt;a href="http://piston.rubyforge.org/"&gt;Piston&lt;/a&gt; and made this happen.&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/teksol/~4/290053619" height="1" width="1"/&gt;</content>  </entry>
  <entry xml:base="http://blog.teksol.info/">
    <author>
      <name>francois</name>
    </author>
    <id>tag:blog.teksol.info,2008-05-13:5377</id>
    <published>2008-05-13T22:38:00Z</published>
    <updated>2008-05-13T22:39:59Z</updated>
    <category term="piston" />
    <link href="http://blog.teksol.info/2008/5/13/piston-2-0-progress-info-lock-unlock" rel="alternate" type="text/html" />
    <title>Piston 2.0 Progress:  info, lock, unlock</title>
<content type="html">
            &lt;p&gt;&lt;a href="http://github.com/tapajos"&gt;Tapajos&lt;/a&gt; has been helping me shaping Piston into shape.  And I’m working on update now, so expect a 1.9.3 &lt;a href="http://web.bilkent.edu.tr/Online/Jargon30/JARGON_R/RSN.HTML"&gt;&lt;span class="caps"&gt;RSN&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/teksol/~4/289753376" height="1" width="1"/&gt;</content>  </entry>
  <entry xml:base="http://blog.teksol.info/">
    <author>
      <name>francois</name>
    </author>
    <id>tag:blog.teksol.info,2008-05-09:5243</id>
    <published>2008-05-09T15:57:00Z</published>
    <updated>2008-05-09T16:06:50Z</updated>
    <category term="piston" />
    <link href="http://blog.teksol.info/2008/5/9/piston-2-0-progress-native-or-ruby-patching" rel="alternate" type="text/html" />
    <title>Piston 2.0 Progress: native or ruby patching ?</title>
<content type="html">
            &lt;code&gt;piston update&lt;/code&gt; is coming.  I have the high-level workflow completed.  Conceptually, updating is pretty simple:

&lt;table class="CodeRay"&gt;&lt;tr&gt;
  &lt;td title="click to toggle" class="line_numbers"&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;11&lt;tt&gt;
&lt;/tt&gt;12&lt;tt&gt;
&lt;/tt&gt;13&lt;tt&gt;
&lt;/tt&gt;14&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;15&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;16&lt;tt&gt;
&lt;/tt&gt;17&lt;tt&gt;
&lt;/tt&gt;18&lt;tt&gt;
&lt;/tt&gt;19&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;20&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;21&lt;tt&gt;
&lt;/tt&gt;22&lt;tt&gt;
&lt;/tt&gt;23&lt;tt&gt;
&lt;/tt&gt;24&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;25&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;26&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class="code"&gt;&lt;pre&gt;&lt;span class="r"&gt;module&lt;/span&gt; &lt;span class="cl"&gt;Piston&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class="r"&gt;module&lt;/span&gt; &lt;span class="cl"&gt;Commands&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span class="r"&gt;class&lt;/span&gt; &lt;span class="cl"&gt;Update&lt;/span&gt; &amp;lt; &lt;span class="co"&gt;Piston&lt;/span&gt;::&lt;span class="co"&gt;Commands&lt;/span&gt;::&lt;span class="co"&gt;Base&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class="c"&gt;# +wcdir+ is the working copy we're going to change.&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class="c"&gt;# +to+ is the new target revision we want to be at after update returns.&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class="r"&gt;def&lt;/span&gt; &lt;span class="fu"&gt;run&lt;/span&gt;(wcdir, to)&lt;tt&gt;
&lt;/tt&gt;        working_copy = &lt;span class="co"&gt;Piston&lt;/span&gt;::&lt;span class="co"&gt;WorkingCopy&lt;/span&gt;.guess(wcdir)&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;        logger.debug {&lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;Recalling previously saved values&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;}&lt;tt&gt;
&lt;/tt&gt;        values = working_copy.recall&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;        repository_class = values[&lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;repository_class&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;]&lt;tt&gt;
&lt;/tt&gt;        repository_url = values[&lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;repository_url&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;]&lt;tt&gt;
&lt;/tt&gt;        repository = repository_class.constantize.new(repository_url)&lt;tt&gt;
&lt;/tt&gt;        from_revision = repository.at(values[&lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;handler&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;])&lt;tt&gt;
&lt;/tt&gt;        to_revision = repository.at(to)&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;        logger.debug {&lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;Validating that &lt;/span&gt;&lt;span class="il"&gt;&lt;span class="dl"&gt;#{&lt;/span&gt;from_revision&lt;span class="dl"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class="k"&gt; exists and is capable of performing the update&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;}&lt;tt&gt;
&lt;/tt&gt;        from_revision.validate!&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;        logger.info {&lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;Updating from &lt;/span&gt;&lt;span class="il"&gt;&lt;span class="dl"&gt;#{&lt;/span&gt;from_revision&lt;span class="dl"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class="k"&gt; to &lt;/span&gt;&lt;span class="il"&gt;&lt;span class="dl"&gt;#{&lt;/span&gt;to_revision&lt;span class="dl"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;}&lt;tt&gt;
&lt;/tt&gt;        working_copy.apply_differences(from_revision.differences_with(to_revision))&lt;tt&gt;
&lt;/tt&gt;      &lt;span class="r"&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span class="r"&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class="r"&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class="r"&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


	&lt;p&gt;Obviously, the devil’s in the details…  Notice the last line above:&lt;/p&gt;


&lt;table class="CodeRay"&gt;&lt;tr&gt;
  &lt;td title="click to toggle" class="line_numbers"&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class="code"&gt;&lt;pre&gt;working_copy.apply_differences(from_revision.differences_with(to_revision))&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


&lt;code&gt;from_revision&lt;/code&gt; will calculate a set of differences between itself and &lt;code&gt;to_revision&lt;/code&gt;.  In Subversion speak, that would probably mean an svn log followed by an svn diff, to get all changes (copies + diffs).

	&lt;p&gt;What Piston 1.x does is copy the newer file over the original file, and then applies the changes between the last changed revision of the local files and the working copy.  This ensures changes that were made are kept in the new revision.&lt;/p&gt;


	&lt;p&gt;I know I can do it under Subversion, as I have already done it, but what about git ?  I can probably use a combination of git-format-patch and git-apply to get the job done.  That would certainly work.&lt;/p&gt;


	&lt;p&gt;I also thought about finding / using a patch implementation in Ruby.  I wonder if that would be another acceptable road ?  Anybody out there has / knows about a patch implementation in Ruby ?&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/teksol/~4/286919239" height="1" width="1"/&gt;</content>  </entry>
  <entry xml:base="http://blog.teksol.info/">
    <author>
      <name>francois</name>
    </author>
    <id>tag:blog.teksol.info,2008-05-06:5161</id>
    <published>2008-05-06T21:14:00Z</published>
    <updated>2008-05-06T21:19:37Z</updated>
    <category term="git" />
    <category term="git-svn" />
    <category term="link" />
    <category term="scm" />
    <category term="svn" />
    <link href="http://blog.teksol.info/2008/5/6/super-simple-git-rebase-explanation" rel="alternate" type="text/html" />
    <title>Super simple git-rebase explanation</title>
<content type="html">
            &lt;p&gt;&lt;a href="http://jbowes.dangerouslyinc.com/"&gt;James Bowes&lt;/a&gt; has a &lt;strong&gt;super simple&lt;/strong&gt; &lt;a href="http://www.kernel.org/pub/software/scm/git/docs/git-rebase.html"&gt;git-rebase&lt;/a&gt; explanation: &lt;a href="http://jbowes.dangerouslyinc.com/2007/01/26/git-rebase-keeping-your-branches-current/"&gt;git rebase: keeping your branches current&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;If you have any difficulty understanding the concept, or want an easy way to explain to someone, go ahead.&lt;/p&gt;


	&lt;p&gt;I’m just starting to use &lt;a href="http://www.kernel.org/pub/software/scm/git/docs/git-svn.html"&gt;git-svn&lt;/a&gt; and git-rebase, and the combination rocks.&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/teksol/~4/284912984" height="1" width="1"/&gt;</content>  </entry>
  <entry xml:base="http://blog.teksol.info/">
    <author>
      <name>francois</name>
    </author>
    <id>tag:blog.teksol.info,2008-05-03:5108</id>
    <published>2008-05-03T05:32:00Z</published>
    <updated>2008-05-03T05:47:21Z</updated>
    <category term="capistrano" />
    <category term="tips'n'tricks" />
    <link href="http://blog.teksol.info/2008/5/3/capistrano-tip-n-trick" rel="alternate" type="text/html" />
    <title>Capistrano Tip'n'Trick</title>
<content type="html">
            &lt;p&gt;If like me you didn’t know, you can do that with &lt;a href="http://www.capify.org/"&gt;Capistrano&lt;/a&gt;:&lt;/p&gt;


&lt;table class="CodeRay"&gt;&lt;tr&gt;
  &lt;td title="click to toggle" class="line_numbers"&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class="code"&gt;&lt;pre&gt;$ cap HOSTS=web0.myapp.com deploy:update_code&lt;tt&gt;
&lt;/tt&gt;cap ROLES=web,app deploy&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


	&lt;p&gt;Not terribly useful for the tasks demonstrated above, but what about this ?&lt;/p&gt;


&lt;table class="CodeRay"&gt;&lt;tr&gt;
  &lt;td title="click to toggle" class="line_numbers"&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class="code"&gt;&lt;pre&gt;$ cap ROLES=app monit:summary&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


	&lt;p&gt;Incidentally, where are these documented ?  I dimly remembered reading this somewhere once, and tried it.  Works like a charm!&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/teksol/~4/282569048" height="1" width="1"/&gt;</content>  </entry>
  <entry xml:base="http://blog.teksol.info/">
    <author>
      <name>francois</name>
    </author>
    <id>tag:blog.teksol.info,2008-04-21:5017</id>
    <published>2008-04-21T20:38:00Z</published>
    <updated>2008-04-21T20:47:31Z</updated>
    <category term="contributions" />
    <category term="open source" />
    <category term="opensource" />
    <category term="piston" />
    <link href="http://blog.teksol.info/2008/4/21/new-piston-contributor-josh-nichols" rel="alternate" type="text/html" />
    <title>New Piston Contributor: Josh Nichols</title>
<content type="html">
            &lt;p&gt;I just received 2 contributions from &lt;a href="http://technicalpickles.com/"&gt;Josh Nichols&lt;/a&gt;:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;New—repository-type option on piston import to force the repository backend to use (instead of letting Piston guess), and for cases where Piston is unable to guess: &lt;a href="http://github.com/francois/piston/commit/ea958dd2711364eab793c135e07171c9603a23e3;"&gt;ea958dd&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;Test suite reorganization: &lt;a href="http://github.com/francois/piston/commit/1cef7b69dff6ad3bd62e5127a38f2de73ee89456"&gt;1cef7b6&lt;/a&gt; and &lt;a href="http://github.com/francois/piston/commit/9cfa8f32cfb975bc1ce32746c4567b9b3915ea45"&gt;9cfa8f3&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Both contributions were accepted and are now part of Piston’s master branch.  Thank you very much, Josh, for your work.&lt;/p&gt;


	&lt;p&gt;If you want to help, do not fear !&lt;/p&gt;


&lt;table class="CodeRay"&gt;&lt;tr&gt;
  &lt;td title="click to toggle" class="line_numbers"&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class="code"&gt;&lt;pre&gt;$ git clone git://github.com/francois/piston.git&lt;tt&gt;
&lt;/tt&gt;$ # make changes&lt;tt&gt;
&lt;/tt&gt;$ git commit&lt;tt&gt;
&lt;/tt&gt;$ # fork piston's repository&lt;tt&gt;
&lt;/tt&gt;$ git remote add github git@github.com:YOURNAME/piston.git&lt;tt&gt;
&lt;/tt&gt;$ git push github master&lt;tt&gt;
&lt;/tt&gt;$ # Send me a pull request&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;
          &lt;img src="http://feeds.feedburner.com/~r/teksol/~4/274941647" height="1" width="1"/&gt;</content>  </entry>
  <entry xml:base="http://blog.teksol.info/">
    <author>
      <name>francois</name>
    </author>
    <id>tag:blog.teksol.info,2008-04-17:4946</id>
    <published>2008-04-17T20:57:00Z</published>
    <updated>2008-04-17T21:09:30Z</updated>
    <category term="cliaws" />
    <category term="gem" />
    <category term="release" />
    <link href="http://blog.teksol.info/2008/4/17/cliaws-sqs-command-line-access-to-amazon-simple-queue-service" rel="alternate" type="text/html" />
    <title>Cliaws SQS: Command-line access to Amazon Simple Queue Service</title>
<content type="html">
            &lt;p&gt;Have you ever wished you could access your &lt;a href="http://www.amazon.com/Simple-Queue-Service-home-page/b/ref=sc_fe_l_2?ie=UTF8&amp;amp;#38;node=13584001&amp;amp;#38;no=3435361"&gt;Amazon Simple Queue Service&lt;/a&gt; from the command line ?  Now you can:&lt;/p&gt;


&lt;table class="CodeRay"&gt;&lt;tr&gt;
  &lt;td title="click to toggle" class="line_numbers"&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;11&lt;tt&gt;
&lt;/tt&gt;12&lt;tt&gt;
&lt;/tt&gt;13&lt;tt&gt;
&lt;/tt&gt;14&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;15&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;16&lt;tt&gt;
&lt;/tt&gt;17&lt;tt&gt;
&lt;/tt&gt;18&lt;tt&gt;
&lt;/tt&gt;19&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;20&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;21&lt;tt&gt;
&lt;/tt&gt;22&lt;tt&gt;
&lt;/tt&gt;23&lt;tt&gt;
&lt;/tt&gt;24&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;25&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;26&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class="code"&gt;&lt;pre&gt;$ AWS_ACCESS_KEY_ID=&amp;lt;your access key&amp;gt;&lt;tt&gt;
&lt;/tt&gt;$ AWS_SECRET_ACCESS_KEY=&amp;quot;&amp;lt;the secret access key&amp;gt;&amp;quot;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;$ clisqs create my-queue&lt;tt&gt;
&lt;/tt&gt;Queue my-queue was created.&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;$ clisqs list&lt;tt&gt;
&lt;/tt&gt;my-queue&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;$ clisqs push --data &amp;quot;this is the message&amp;quot; my-queue&lt;tt&gt;
&lt;/tt&gt;Pushed 19 bytes to queue my-queue&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;$ cat README.txt | clisqs push my-queue&lt;tt&gt;
&lt;/tt&gt;Pushed 2687 bytes to queue my-queue&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;$ clisqs push my-queue README.txt&lt;tt&gt;
&lt;/tt&gt;Pushed 2687 bytes to queue my-queue&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;$ clisqs size my-queue&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;$ clisqs pop my-queue&lt;tt&gt;
&lt;/tt&gt;this is the message&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;$ clisqs delete --force my-queue&lt;tt&gt;
&lt;/tt&gt;Queue my-queue was deleted.&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


	&lt;h2&gt;Installation&lt;/h2&gt;


&lt;table class="CodeRay"&gt;&lt;tr&gt;
  &lt;td title="click to toggle" class="line_numbers"&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class="code"&gt;&lt;pre&gt;$ sudo gem install cliaws&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


	&lt;h2&gt;Direct-code access&lt;/h2&gt;


&lt;table class="CodeRay"&gt;&lt;tr&gt;
  &lt;td title="click to toggle" class="line_numbers"&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class="code"&gt;&lt;pre&gt;require &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;rubygems&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;require &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;cliaws&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class="co"&gt;Cliaws&lt;/span&gt;.sqs.push(&lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;my-queue&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;, &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;the data&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;)&lt;tt&gt;
&lt;/tt&gt;the_size = &lt;span class="co"&gt;Cliaws&lt;/span&gt;.sqs.size(&lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;my-queue&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;)&lt;tt&gt;
&lt;/tt&gt;the_message = &lt;span class="co"&gt;Cliaws&lt;/span&gt;.sqs.pop(&lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;my-queue&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;)&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


	&lt;h2&gt;S3 ?&lt;/h2&gt;


	&lt;p&gt;This gem also works with S3.  See my prior release announcement: &lt;a href="http://blog.teksol.info/2008/4/15/cliaws-command-line-access-to-s3"&gt;Cliaws: command-line access to S3&lt;/a&gt;&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/teksol/~4/272438771" height="1" width="1"/&gt;</content>  </entry>
  <entry xml:base="http://blog.teksol.info/">
    <author>
      <name>francois</name>
    </author>
    <id>tag:blog.teksol.info,2008-04-15:4886</id>
    <published>2008-04-15T01:43:00Z</published>
    <updated>2008-04-15T01:43:49Z</updated>
    <category term="cliaws" />
    <category term="gem" />
    <category term="release" />
    <link href="http://blog.teksol.info/2008/4/15/cliaws-command-line-access-to-s3" rel="alternate" type="text/html" />
    <title>Cliaws: command-line access to S3</title>
<content type="html">
            &lt;p&gt;I just released a new gem on RubyForge:  cliaws.  Using it, you have access to nice command line shortcuts:&lt;/p&gt;


&lt;table class="CodeRay"&gt;&lt;tr&gt;
  &lt;td title="click to toggle" class="line_numbers"&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class="code"&gt;&lt;pre&gt;$ AWS_ACCESS_KEY_ID=&amp;lt;your access key&amp;gt;&lt;tt&gt;
&lt;/tt&gt;$ AWS_SECRET_ACCESS_KEY=&amp;quot;&amp;lt;the secret access key&amp;gt;&amp;quot;&lt;tt&gt;
&lt;/tt&gt;$ clis3 list BUCKET/PATH-PREFIX&lt;tt&gt;
&lt;/tt&gt;$ clis3 put BUCKET/FULL/PATH/NAME /path/to/local/file&lt;tt&gt;
&lt;/tt&gt;$ clis3 get BUCKET/FULL/PATH/NAME /path/to/local/file&lt;tt&gt;
&lt;/tt&gt;$ clis3 cat BUCKET/FULL/PATH/NAME&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


	&lt;p&gt;This is not rocket science, but with the kind of work I’m doing at the moment, having quick command-line access to S3 is a boon.&lt;/p&gt;


	&lt;h2&gt;Installation&lt;/h2&gt;


&lt;table class="CodeRay"&gt;&lt;tr&gt;
  &lt;td title="click to toggle" class="line_numbers"&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class="code"&gt;&lt;pre&gt;$ gem install cliaws&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


	&lt;h2&gt;Direct-code access&lt;/h2&gt;


&lt;table class="CodeRay"&gt;&lt;tr&gt;
  &lt;td title="click to toggle" class="line_numbers"&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;11&lt;tt&gt;
&lt;/tt&gt;12&lt;tt&gt;
&lt;/tt&gt;13&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class="code"&gt;&lt;pre&gt;require &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;rubygems&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;require &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;cliaws&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class="c"&gt;# Retrieve and store in a variable&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;value = &lt;span class="co"&gt;Cliaws&lt;/span&gt;.s3.get(&lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;BUCKET/FULL/PATH/NAME&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;)&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class="c"&gt;# Retrieve and stream to specified file&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class="co"&gt;File&lt;/span&gt;.open(&lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;/path/to/local/file&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;, &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;w&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;) &lt;span class="r"&gt;do&lt;/span&gt; |f|&lt;tt&gt;
&lt;/tt&gt;  &lt;span class="co"&gt;Cliaws&lt;/span&gt;.s3.get(&lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;BUCKET/FULL/PATH/NAME&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;, f)&lt;tt&gt;
&lt;/tt&gt;&lt;span class="r"&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class="c"&gt;# Returns an Array of full names&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;contents = &lt;span class="co"&gt;Cliaws&lt;/span&gt;.s3.list(&lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;BUCKET&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;)&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


	&lt;h2&gt;Repository&lt;/h2&gt;


	&lt;p&gt;The repository is hosted on &lt;a href="http://github.com/francois/cliaws/tree/master"&gt;GitHub&lt;/a&gt;, with a mirror on &lt;a href="http://rubyforge.org/scm/?group_id=6034"&gt;RubyForge&lt;/a&gt;.&lt;/p&gt;


The repository’s URLs are:
	&lt;ul&gt;
	&lt;li&gt;&lt;a&gt;git://github.com/francois/cliaws.git&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a&gt;git://rubyforge.org/cliaws.git&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Go forth and fork !&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/teksol/~4/270375288" height="1" width="1"/&gt;</content>  </entry>
  <entry xml:base="http://blog.teksol.info/">
    <author>
      <name>francois</name>
    </author>
    <id>tag:blog.teksol.info,2008-03-26:4447</id>
    <published>2008-03-26T13:53:00Z</published>
    <updated>2008-03-26T13:54:03Z</updated>
    <category term="platform" />
    <category term="ruby" />
    <category term="windows" />
    <link href="http://blog.teksol.info/2008/3/26/is-windows-a-good-environment-for-ruby-rails-it-certainly-should" rel="alternate" type="text/html" />
    <title>Is Windows a good environment for Ruby/Rails ?  It certainly should !</title>
<content type="html">
            &lt;p&gt;I just stumbled upon &lt;a href="http://www.rubyinside.com/is-windows-a-first-class-platform-for-ruby-823.html"&gt;Is Windows a First Class Platform for Ruby?&lt;/a&gt; by &lt;a href="http://www.petercooper.co.uk/"&gt;Peter Cooper&lt;/a&gt; and &lt;a href="http://blog.mmediasys.com/2008/03/06/is-windows-a-supported-platform-for-ruby-i-guess-not/"&gt;Is Windows a supported platform for Ruby? I guess not&lt;/a&gt; by &lt;a href="http://blog.mmediasys.com/"&gt;Luis Lavena&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;I have to admit, I &lt;strong&gt;did&lt;/strong&gt; use Windows daily for 3 years before I switched permanently to &lt;a href="http://www.ubuntu.com/"&gt;Ubuntu&lt;/a&gt;, about 6 months back.  Initially, I was using &lt;a href="http://www.jetbrains.com/idea/index.html"&gt;IntelliJ’s &lt;span class="caps"&gt;IDEA&lt;/span&gt;&lt;/a&gt; as my development platform, then I switched to the &lt;a href="http://www.e-texteditor.com/"&gt;e Text Editor&lt;/a&gt;.  I never had many problems with gems that didn’t/couldn’t/wouldn’t install.  There are many kind souls in the community that keep these gems up to date.  I’m talking specifically about Tim Hunter (&lt;a href="http://rmagick.rubyforge.org/"&gt;RMagick&lt;/a&gt;), &lt;a href="http://blog.mmediasys.com/"&gt;Luis Lavena&lt;/a&gt; (&lt;a href="http://mongrel.rubyforge.org/"&gt;Mongrel&lt;/a&gt;) and others.&lt;/p&gt;


	&lt;p&gt;Just before I made the final switch, I was using Linux in a &lt;a href="http://vmware.com/"&gt;VMware&lt;/a&gt; image to run &lt;a href="http://xlsuite.com/"&gt;XLsuite&lt;/a&gt;.  The application was unbearably slow in Windows, but acceptable in a virtual machine.  I was using the e Text Editor as my editor, accessing the code through a &lt;a href="http://samba.org/"&gt;Samba&lt;/a&gt; share.&lt;/p&gt;


	&lt;p&gt;My own experience was pretty positive.  Now that I’m on Ubuntu, I wouldn’t go back though.  What made me switch ?  Better performance on the same hardware, mostly;  the novelty of the experience.  I do not dislike Windows, nor do I think Redmond is a bad place.  Windows is a fine platform.&lt;/p&gt;


	&lt;p&gt;Just to contrast, look at the excellent support &lt;a href="http://java.sun.com/"&gt;Java&lt;/a&gt; enjoys on Windows.  Windows is the 2&lt;sup&gt;nd&lt;/sup&gt; platform for Java (with &lt;a href="http://www.sun.com/software/solaris/index.jsp"&gt;Solaris&lt;/a&gt; being the 1&lt;sup&gt;st&lt;/sup&gt;).  We, the Ruby community, should be learning from &lt;a href="http://www.sun.com/"&gt;Sun&lt;/a&gt;.  There are many, many more Windows machines than Mac or Linux machines out there.  There are literally millions of people who could learn to write &lt;a href="http://ruby-lang.org/"&gt;Ruby&lt;/a&gt;, but are on Windows.  &lt;a href="http://drnicwilliams.com/"&gt;Dr Nic&lt;/a&gt; said it all:  &lt;a href="http://www.rubyinside.com/is-windows-a-first-class-platform-for-ruby-823.html#comment-35759"&gt;&amp;lt;q cite="http://www.rubyinside.com/is-windows-a-first-class-platform-for-ruby-823.html#comment-35759"&gt;&amp;hellip; People Use Windows Too&amp;lt;/q&gt;&lt;/a&gt;.  Whether you want to or not, Windows isn’t going away soon.&lt;/p&gt;


	&lt;p&gt;Personally, I have made the switch.  But just on my small team, Windows users outnumber other platforms 1 to 1.  Here’s the breakdown:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;4 Windows (2 coders, 1 designer, 1 sponsor)&lt;/li&gt;
		&lt;li&gt;2 Ubuntu (1 coder, 1 designer)&lt;/li&gt;
		&lt;li&gt;1 Mac (1 &lt;a href="http://extjs.com/"&gt;ExtJS&lt;/a&gt; coder)&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Is Windows a good platform for Ruby ?  &lt;strong&gt;Yes&lt;/strong&gt;.  Is Windows a great platform for Ruby ?  No, but there’s no reason why it shouldn’t be.  Just look at &lt;a href="http://whytheluckystiff.net/"&gt;Why&lt;/a&gt;’s work on &lt;a href="http://hacketyhack.net/"&gt;Hackety Hack&lt;/a&gt;.  I’m really impressed and happy that I will be able to show Ruby to my daughters.  The catch ?  Hackety Hack is for Windows only right now.&lt;/p&gt;


	&lt;p&gt;Please, let’s keep and increase Windows support.  Once they’re hooked, they might switch, who knows ?&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/teksol/~4/258325905" height="1" width="1"/&gt;</content>  </entry>
  <entry xml:base="http://blog.teksol.info/">
    <author>
      <name>francois</name>
    </author>
    <id>tag:blog.teksol.info,2008-03-25:4416</id>
    <published>2008-03-25T04:25:00Z</published>
    <updated>2008-03-25T13:43:04Z</updated>
    <category term="piston" />
    <link href="http://blog.teksol.info/2008/3/25/piston-2-0-progress-much-saner-logging" rel="alternate" type="text/html" />
    <title>Piston 2.0 Progress:  Much saner logging</title>
<content type="html">
            &lt;p&gt;Instead of using Logger, I’m now using &lt;a href="http://log4r.rubyforge.org/"&gt;Log4r&lt;/a&gt;.  This is a departure for me, as I initially gave myself the goal of not depending on too many libraries.  But since I’m already depending on &lt;a href="http://codeforpeople.com/lib/ruby/main/"&gt;Main&lt;/a&gt; (which itself has 2 dependencies) and &lt;a href="http://codeforpeople.com/lib/ruby/open4/"&gt;open4&lt;/a&gt;, I thought, “why not another one ?”&lt;/p&gt;


	&lt;p&gt;But this new dependency gives me much greater freedom in logging.  I’m not done coding all of this, but—verbose won’t just be a flag.  It will represent a level, and the higher the level, the more logging will be done.  Obvious, but much more interesting.&lt;/p&gt;


	&lt;p&gt;Anyway, here’s what 1.9.1 was logging for a simple svn/git pistonization:&lt;/p&gt;


&lt;table class="CodeRay"&gt;&lt;tr&gt;
  &lt;td title="click to toggle" class="line_numbers"&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;11&lt;tt&gt;
&lt;/tt&gt;12&lt;tt&gt;
&lt;/tt&gt;13&lt;tt&gt;
&lt;/tt&gt;14&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;15&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;16&lt;tt&gt;
&lt;/tt&gt;17&lt;tt&gt;
&lt;/tt&gt;18&lt;tt&gt;
&lt;/tt&gt;19&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;20&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;21&lt;tt&gt;
&lt;/tt&gt;22&lt;tt&gt;
&lt;/tt&gt;23&lt;tt&gt;
&lt;/tt&gt;24&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;25&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;26&lt;tt&gt;
&lt;/tt&gt;27&lt;tt&gt;
&lt;/tt&gt;28&lt;tt&gt;
&lt;/tt&gt;29&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;30&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;31&lt;tt&gt;
&lt;/tt&gt;32&lt;tt&gt;
&lt;/tt&gt;33&lt;tt&gt;
&lt;/tt&gt;34&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;35&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;36&lt;tt&gt;
&lt;/tt&gt;37&lt;tt&gt;
&lt;/tt&gt;38&lt;tt&gt;
&lt;/tt&gt;39&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;40&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;41&lt;tt&gt;
&lt;/tt&gt;42&lt;tt&gt;
&lt;/tt&gt;43&lt;tt&gt;
&lt;/tt&gt;44&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;45&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;46&lt;tt&gt;
&lt;/tt&gt;47&lt;tt&gt;
&lt;/tt&gt;48&lt;tt&gt;
&lt;/tt&gt;49&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;50&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;51&lt;tt&gt;
&lt;/tt&gt;52&lt;tt&gt;
&lt;/tt&gt;53&lt;tt&gt;
&lt;/tt&gt;54&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;55&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;56&lt;tt&gt;
&lt;/tt&gt;57&lt;tt&gt;
&lt;/tt&gt;58&lt;tt&gt;
&lt;/tt&gt;59&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;60&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;61&lt;tt&gt;
&lt;/tt&gt;62&lt;tt&gt;
&lt;/tt&gt;63&lt;tt&gt;
&lt;/tt&gt;64&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;65&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class="code"&gt;&lt;pre&gt;$ ruby -I lib bin/piston import http://dev.rubyonrails.org/svn/rails/plugins/ssl_requirement&lt;tt&gt;
&lt;/tt&gt;D, [2008-03-25T00:41:13.494826 #13759] DEBUG -- : Piston::Commands::Import with options {:verbose=&amp;gt;false, :force=&amp;gt;false, :quiet=&amp;gt;false, :lock=&amp;gt;false, :dry_run=&amp;gt;false}&lt;tt&gt;
&lt;/tt&gt;D, [2008-03-25T00:41:13.495078 #13759] DEBUG -- : Guessing the repository type of &amp;quot;http://dev.rubyonrails.org/svn/rails/plugins/ssl_requirement&amp;quot;&lt;tt&gt;
&lt;/tt&gt;D, [2008-03-25T00:41:13.495386 #13759] DEBUG -- : git ls-remote --heads http://dev.rubyonrails.org/svn/rails/plugins/ssl_requirement&lt;tt&gt;
&lt;/tt&gt;D, [2008-03-25T00:41:13.495543 #13759] DEBUG -- : &amp;gt; &amp;quot;git ls-remote --heads http://dev.rubyonrails.org/svn/rails/plugins/ssl_requirement&amp;quot;&lt;tt&gt;
&lt;/tt&gt;D, [2008-03-25T00:41:13.721569 #13759] DEBUG -- : &amp;gt; #&amp;lt;Process::Status: pid=13760,exited(1)&amp;gt;, success? false, status: 1&lt;tt&gt;
&lt;/tt&gt;D, [2008-03-25T00:41:13.722096 #13759] DEBUG -- : svn info http://dev.rubyonrails.org/svn/rails/plugins/ssl_requirement&lt;tt&gt;
&lt;/tt&gt;D, [2008-03-25T00:41:19.142407 #13759] DEBUG -- : Path: ssl_requirement&lt;tt&gt;
&lt;/tt&gt;URL: http://dev.rubyonrails.org/svn/rails/plugins/ssl_requirement&lt;tt&gt;
&lt;/tt&gt;Repository Root: http://dev.rubyonrails.org/svn/rails&lt;tt&gt;
&lt;/tt&gt;Repository UUID: 5ecf4fe2-1ee6-0310-87b1-e25e094e27de&lt;tt&gt;
&lt;/tt&gt;Revision: 9088&lt;tt&gt;
&lt;/tt&gt;Node Kind: directory&lt;tt&gt;
&lt;/tt&gt;Last Changed Author: bitsweat&lt;tt&gt;
&lt;/tt&gt;Last Changed Rev: 8780&lt;tt&gt;
&lt;/tt&gt;Last Changed Date: 2008-02-02 00:16:53 -0500 (Sat, 02 Feb 2008)&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;D, [2008-03-25T00:41:19.142810 #13759] DEBUG -- : Guessing the working copy type of #&amp;lt;Pathname:repository&amp;gt;&lt;tt&gt;
&lt;/tt&gt;D, [2008-03-25T00:41:19.142950 #13759] DEBUG -- : Asking Piston::Git::WorkingCopy if it understands repository&lt;tt&gt;
&lt;/tt&gt;D, [2008-03-25T00:41:19.143063 #13759] DEBUG -- : git status on repository&lt;tt&gt;
&lt;/tt&gt;D, [2008-03-25T00:41:19.143490 #13759] DEBUG -- : git status on .&lt;tt&gt;
&lt;/tt&gt;D, [2008-03-25T00:41:19.143681 #13759] DEBUG -- : git status&lt;tt&gt;
&lt;/tt&gt;D, [2008-03-25T00:41:19.143848 #13759] DEBUG -- : &amp;gt; &amp;quot;git status&amp;quot;&lt;tt&gt;
&lt;/tt&gt;D, [2008-03-25T00:41:19.166951 #13759] DEBUG -- : &amp;gt; #&amp;lt;Process::Status: pid=13772,exited(1)&amp;gt;, success? false, status: 1&lt;tt&gt;
&lt;/tt&gt;D, [2008-03-25T00:41:19.167193 #13759] DEBUG -- : # On branch my1.9.1&lt;tt&gt;
&lt;/tt&gt;nothing to commit (working directory clean)&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;D, [2008-03-25T00:41:19.167443 #13759] DEBUG -- : Initialized on repository&lt;tt&gt;
&lt;/tt&gt;D, [2008-03-25T00:41:19.167920 #13759] DEBUG -- : svn checkout --revision HEAD http://dev.rubyonrails.org/svn/rails/plugins/ssl_requirement .repository.tmp&lt;tt&gt;
&lt;/tt&gt;D, [2008-03-25T00:41:25.100301 #13759] DEBUG -- : A    .repository.tmp/test&lt;tt&gt;
&lt;/tt&gt;A    .repository.tmp/test/ssl_requirement_test.rb&lt;tt&gt;
&lt;/tt&gt;A    .repository.tmp/lib&lt;tt&gt;
&lt;/tt&gt;A    .repository.tmp/lib/ssl_requirement.rb&lt;tt&gt;
&lt;/tt&gt;A    .repository.tmp/README&lt;tt&gt;
&lt;/tt&gt;Checked out revision 9088.&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;D, [2008-03-25T00:41:25.100986 #13759] DEBUG -- : svn ls --recursive .repository.tmp&lt;tt&gt;
&lt;/tt&gt;D, [2008-03-25T00:41:30.056625 #13759] DEBUG -- : README&lt;tt&gt;
&lt;/tt&gt;lib/&lt;tt&gt;
&lt;/tt&gt;lib/ssl_requirement.rb&lt;tt&gt;
&lt;/tt&gt;test/&lt;tt&gt;
&lt;/tt&gt;test/ssl_requirement_test.rb&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;D, [2008-03-25T00:41:30.057107 #13759] DEBUG -- : Copying README to repository/README&lt;tt&gt;
&lt;/tt&gt;D, [2008-03-25T00:41:30.058074 #13759] DEBUG -- : Copying lib/ssl_requirement.rb to repository/lib/ssl_requirement.rb&lt;tt&gt;
&lt;/tt&gt;D, [2008-03-25T00:41:30.058994 #13759] DEBUG -- : Copying test/ssl_requirement_test.rb to repository/test/ssl_requirement_test.rb&lt;tt&gt;
&lt;/tt&gt;D, [2008-03-25T00:41:30.059800 #13759] DEBUG -- : svn info --revision 9088 http://dev.rubyonrails.org/svn/rails/plugins/ssl_requirement&lt;tt&gt;
&lt;/tt&gt;D, [2008-03-25T00:41:34.750474 #13759] DEBUG -- : Path: ssl_requirement&lt;tt&gt;
&lt;/tt&gt;URL: http://dev.rubyonrails.org/svn/rails/plugins/ssl_requirement&lt;tt&gt;
&lt;/tt&gt;Repository Root: http://dev.rubyonrails.org/svn/rails&lt;tt&gt;
&lt;/tt&gt;Repository UUID: 5ecf4fe2-1ee6-0310-87b1-e25e094e27de&lt;tt&gt;
&lt;/tt&gt;Revision: 9088&lt;tt&gt;
&lt;/tt&gt;Node Kind: directory&lt;tt&gt;
&lt;/tt&gt;Last Changed Author: bitsweat&lt;tt&gt;
&lt;/tt&gt;Last Changed Rev: 8780&lt;tt&gt;
&lt;/tt&gt;Last Changed Date: 2008-02-02 00:16:53 -0500 (Sat, 02 Feb 2008)&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;D, [2008-03-25T00:41:34.751037 #13759] DEBUG -- : Remembering {&amp;quot;piston:remote-revision&amp;quot;=&amp;gt;9088, &amp;quot;piston:root&amp;quot;=&amp;gt;&amp;quot;http://dev.rubyonrails.org/svn/rails/plugins/ssl_requirement&amp;quot;, &amp;quot;piston:uuid&amp;quot;=&amp;gt;&amp;quot;5ecf4fe2-1ee6-0310-87b1-e25e094e27de&amp;quot;}&lt;tt&gt;
&lt;/tt&gt;D, [2008-03-25T00:41:34.752256 #13759] DEBUG -- : Calling #after_remember on repository/.piston.yml&lt;tt&gt;
&lt;/tt&gt;D, [2008-03-25T00:41:34.752475 #13759] DEBUG -- : git add .&lt;tt&gt;
&lt;/tt&gt;D, [2008-03-25T00:41:34.752605 #13759] DEBUG -- : &amp;gt; &amp;quot;git add .&amp;quot;&lt;tt&gt;
&lt;/tt&gt;D, [2008-03-25T00:41:34.758728 #13759] DEBUG -- : &amp;gt; #&amp;lt;Process::Status: pid=13785,exited(0)&amp;gt;, success? true, status: 0&lt;tt&gt;
&lt;/tt&gt;D, [2008-03-25T00:41:34.758993 #13759] DEBUG -- : Removing temporary directory: .repository.tmp&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


	&lt;p&gt;And here’s the current master branch:&lt;/p&gt;


&lt;table class="CodeRay"&gt;&lt;tr&gt;
  &lt;td title="click to toggle" class="line_numbers"&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class="code"&gt;&lt;pre&gt;$ ruby -I lib bin/piston import http://dev.rubyonrails.org/svn/rails/plugins/ssl_requirement&lt;tt&gt;
&lt;/tt&gt; INFO main: Guessing the repository type&lt;tt&gt;
&lt;/tt&gt; INFO main: Guessing the working copy type&lt;tt&gt;
&lt;/tt&gt; INFO main: Checking out the repository&lt;tt&gt;
&lt;/tt&gt; INFO main: Copying from Piston::Revision(http://dev.rubyonrails.org/svn/rails/plugins/ssl_requirement@9088)&lt;tt&gt;
&lt;/tt&gt; INFO main: Checked out &amp;quot;http://dev.rubyonrails.org/svn/rails/plugins/ssl_requirement&amp;quot; r9088 to &amp;quot;ssl_requirement&amp;quot;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


	&lt;p&gt;Obviously, in 1.9.1, I hadn’t configured the logger at all, and &lt;strong&gt;everything&lt;/strong&gt; was logged.  Not so anymore !&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/teksol/~4/257443858" height="1" width="1"/&gt;</content>  </entry>
  <entry xml:base="http://blog.teksol.info/">
    <author>
      <name>francois</name>
    </author>
    <id>tag:blog.teksol.info,2008-03-23:4391</id>
    <published>2008-03-23T18:22:00Z</published>
    <updated>2008-03-23T18:28:37Z</updated>
    <category term="piston" />
    <category term="release" />
    <link href="http://blog.teksol.info/2008/3/23/piston-1-9-1-import-goodness" rel="alternate" type="text/html" />
    <title>Piston 1.9.1:  Import goodness</title>
<content type="html">
            &lt;p&gt;Well, with much more testing, I’m releasing another preview release of &lt;a href="http://piston.rubyforge.org/"&gt;Piston&lt;/a&gt;.  This release should import &lt;a href="http://subversion.tigris.org/"&gt;Subversion&lt;/a&gt; or &lt;a href="http://git.or.cz/"&gt;Git&lt;/a&gt; repositories into Subversion or Git working copies just fine.  There’s one slight problem, which is when you use &lt;code class="command"&gt;piston import URL&lt;/code&gt; (without a target directory), it will import into a folder named &lt;code class="dir"&gt;repository&lt;/code&gt;, which isn’t what it’s supposed to do.  I’m missing a couple of tests, is all.&lt;/p&gt;


	&lt;p&gt;How to grab this release ?  Two ways:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;code class="command"&gt;git clone git://github.com/francois/piston.git&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;Grab a &lt;a href="http://github.com/francois/piston/tarball/1.9.1"&gt;tarball&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Once you have the code, run &lt;code class="command"&gt;rake install_gem&lt;/code&gt; to install the gem.  Enjoy !&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/teksol/~4/256621483" height="1" width="1"/&gt;</content>  </entry>
  <entry xml:base="http://blog.teksol.info/">
    <author>
      <name>francois</name>
    </author>
    <id>tag:blog.teksol.info,2008-03-23:4377</id>
    <published>2008-03-23T03:25:00Z</published>
    <updated>2008-03-23T03:24:17Z</updated>
    <category term="piston" />
    <category term="progress" />
    <link href="http://blog.teksol.info/2008/3/23/piston-2-0-progress-new-integration-tests" rel="alternate" type="text/html" />
    <title>Piston 2.0 Progress:  New integration tests</title>
<content type="html">
            &lt;p&gt;I have new integration tests, and they work just beautifully.  I’m missing a couple more, but things are looking very good.&lt;/p&gt;


	&lt;p&gt;Thanks to &lt;a href="http://thisoldcoder.com/"&gt;Paul Watson&lt;/a&gt; for finding and fixing two bugs in the Git/Git case.&lt;/p&gt;


	&lt;p&gt;Finally, I have &lt;a href="http://faisal.com/"&gt;faisal&lt;/a&gt; which offered looking into adding &lt;a href="http://svk.elixus.org/"&gt;&lt;span class="caps"&gt;SVK&lt;/span&gt;&lt;/a&gt; support for the working copy.&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/teksol/~4/256337211" height="1" width="1"/&gt;</content>  </entry>
  <entry xml:base="http://blog.teksol.info/">
    <author>
      <name>francois</name>
    </author>
    <id>tag:blog.teksol.info,2008-03-17:4251</id>
    <published>2008-03-17T03:29:00Z</published>
    <updated>2008-03-17T03:37:08Z</updated>
    <category term="piston" />
    <category term="release" />
    <link href="http://blog.teksol.info/2008/3/17/piston-1-9-0-official-preview-release" rel="alternate" type="text/html" />
    <title>Piston 1.9.0:  Official Preview Release</title>
<content type="html">
            &lt;p&gt;I’m making it official.  I’m releasing 1.9.0 today:&lt;/p&gt;


	&lt;p&gt;http://github.com/francois/piston/tree/1.9.0&lt;/p&gt;


	&lt;p&gt;I’ll put up a gem tomorrow, but if you want to play with Piston now, the best way is to either clone the repository, or grab a &lt;a href="http://github.com/francois/piston/tarball/1.9.0"&gt;tarball&lt;/a&gt; directly from GitHub.&lt;/p&gt;


	&lt;p&gt;What’s implemented in this release ?&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;piston import&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;But you can import from either &lt;span class="caps"&gt;SVN&lt;/span&gt; or Git, into either &lt;span class="caps"&gt;SVN&lt;/span&gt; or Git.  All Piston metadata is stored in a .piston.yml file in the pistonized dir’s root.&lt;/p&gt;


	&lt;p&gt;If you have questions, problems, comments, go ahead and comment right here, or use &lt;a href="http://rubyforge.org/tracker/?group_id=2105"&gt;Piston’s tracker&lt;/a&gt;&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/teksol/~4/252761099" height="1" width="1"/&gt;</content>  </entry>
  <entry xml:base="http://blog.teksol.info/">
    <author>
      <name>francois</name>
    </author>
    <id>tag:blog.teksol.info,2008-03-15:4212</id>
    <published>2008-03-15T19:03:00Z</published>
    <updated>2008-04-23T20:33:05Z</updated>
    <category term="piston" />
    <link href="http://blog.teksol.info/2008/3/15/piston-2-0-progress-piston-can-import-all-four-cases" rel="alternate" type="text/html" />
    <title>Piston 2.0 Progress:  Piston can import all four cases</title>
<content type="html">
            &lt;p&gt;As I outlined in &lt;a href="http://blog.teksol.info/2008/3/6/piston-will-get-git-support"&gt;Piston will get Git support&lt;/a&gt;, the four cases below are now supported (at least for importing):&lt;/p&gt;


&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Repository&lt;/th&gt;
&lt;th&gt;Working Copy&lt;/th&gt;
&lt;th&gt;Strategy&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Subversion&lt;/td&gt;
&lt;td&gt;Subversion&lt;/td&gt;
&lt;td&gt;Use current strategy of storing data in Subversion properties&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Subversion&lt;/td&gt;
&lt;td&gt;Git&lt;/td&gt;
&lt;td&gt;Clone the Git repository, copy the files over and store the metadata as Subversion properties.  Use Git to handle the merging for Piston (Yay!)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Git&lt;/td&gt;
&lt;td&gt;Subversion&lt;/td&gt;
&lt;td&gt;svn export the data and use a hidden &lt;span class="caps"&gt;YAML&lt;/span&gt; file to store the metadata in the pistonized directory&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Git&lt;/td&gt;
&lt;td&gt;Subversion&lt;/td&gt;
&lt;td&gt;Use Git submodules perhaps ?  Or git clone + copy + &lt;span class="caps"&gt;YAML&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

	&lt;p&gt;I’m not in fact using git submodules, or anything fancy.  I’m cloning the repository, and copying manually from there.  So, nothing fancy.  But adding new repository and working copy handlers is &lt;strong&gt;so&lt;/strong&gt; easy:&lt;/p&gt;


	&lt;h3&gt;samples/import_svn_svn.rb&lt;/h3&gt;


&lt;table class="CodeRay"&gt;&lt;tr&gt;
  &lt;td title="click to toggle" class="line_numbers"&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;11&lt;tt&gt;
&lt;/tt&gt;12&lt;tt&gt;
&lt;/tt&gt;13&lt;tt&gt;
&lt;/tt&gt;14&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;15&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;16&lt;tt&gt;
&lt;/tt&gt;17&lt;tt&gt;
&lt;/tt&gt;18&lt;tt&gt;
&lt;/tt&gt;19&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;20&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;21&lt;tt&gt;
&lt;/tt&gt;22&lt;tt&gt;
&lt;/tt&gt;23&lt;tt&gt;
&lt;/tt&gt;24&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;25&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;26&lt;tt&gt;
&lt;/tt&gt;27&lt;tt&gt;
&lt;/tt&gt;28&lt;tt&gt;
&lt;/tt&gt;29&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;30&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;31&lt;tt&gt;
&lt;/tt&gt;32&lt;tt&gt;
&lt;/tt&gt;33&lt;tt&gt;
&lt;/tt&gt;34&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;35&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;36&lt;tt&gt;
&lt;/tt&gt;37&lt;tt&gt;
&lt;/tt&gt;38&lt;tt&gt;
&lt;/tt&gt;39&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class="code"&gt;&lt;pre&gt;&lt;span class="c"&gt;#!/usr/bin/env ruby&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class="c"&gt;#&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class="c"&gt;# Import an SVN repository into an SVN working copy.&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;require &lt;span class="co"&gt;File&lt;/span&gt;.dirname(&lt;span class="pc"&gt;__FILE__&lt;/span&gt;) + &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;/common&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class="iv"&gt;@root&lt;/span&gt; = &lt;span class="iv"&gt;@root&lt;/span&gt; + &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;tmp/git_git&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class="iv"&gt;@root&lt;/span&gt;.rmtree &lt;span class="r"&gt;rescue&lt;/span&gt; &lt;span class="pc"&gt;nil&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class="iv"&gt;@root&lt;/span&gt;.mkpath&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class="iv"&gt;@tmp&lt;/span&gt; = &lt;span class="iv"&gt;@root&lt;/span&gt; + &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;plugin.tmp&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class="iv"&gt;@plugin&lt;/span&gt; = &lt;span class="iv"&gt;@root&lt;/span&gt; + &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;plugin&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class="iv"&gt;@plugin&lt;/span&gt;.mkpath&lt;tt&gt;
&lt;/tt&gt;&lt;span class="co"&gt;File&lt;/span&gt;.open(&lt;span class="iv"&gt;@plugin&lt;/span&gt; + &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;README&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;, &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;wb&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;) {|f| f.puts &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;Hello World&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;}&lt;tt&gt;
&lt;/tt&gt;&lt;span class="co"&gt;File&lt;/span&gt;.open(&lt;span class="iv"&gt;@plugin&lt;/span&gt; + &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;init.rb&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;, &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;wb&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;) {|f| f.puts &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;# Some init code&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;}&lt;tt&gt;
&lt;/tt&gt;&lt;span class="co"&gt;Dir&lt;/span&gt;.chdir(&lt;span class="iv"&gt;@plugin&lt;/span&gt;) &lt;span class="r"&gt;do&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  git &lt;span class="sy"&gt;:init&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  git &lt;span class="sy"&gt;:add&lt;/span&gt;, &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;.&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  git &lt;span class="sy"&gt;:commit&lt;/span&gt;, &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;-m&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;, &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;initial commit&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class="r"&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class="iv"&gt;@wc&lt;/span&gt; = &lt;span class="iv"&gt;@root&lt;/span&gt; + &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;wc&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class="iv"&gt;@wc&lt;/span&gt;.mkpath&lt;tt&gt;
&lt;/tt&gt;&lt;span class="co"&gt;File&lt;/span&gt;.open(&lt;span class="iv"&gt;@wc&lt;/span&gt; + &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;README&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;, &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;wb&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;) {|f| f.puts &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;My local project&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;}&lt;tt&gt;
&lt;/tt&gt;&lt;span class="co"&gt;Dir&lt;/span&gt;.chdir(&lt;span class="iv"&gt;@wc&lt;/span&gt;) &lt;span class="r"&gt;do&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  git &lt;span class="sy"&gt;:init&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  git &lt;span class="sy"&gt;:add&lt;/span&gt;, &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;.&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  git &lt;span class="sy"&gt;:commit&lt;/span&gt;, &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;-m&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;, &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;initial commit&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class="r"&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;repos = &lt;span class="co"&gt;Piston&lt;/span&gt;::&lt;span class="co"&gt;Git&lt;/span&gt;::&lt;span class="co"&gt;Repository&lt;/span&gt;.new(&lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;file://&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt; + &lt;span class="iv"&gt;@plugin&lt;/span&gt;.realpath)&lt;tt&gt;
&lt;/tt&gt;commit = repos.at(&lt;span class="sy"&gt;:head&lt;/span&gt;)&lt;tt&gt;
&lt;/tt&gt;commit.checkout_to(&lt;span class="iv"&gt;@tmp&lt;/span&gt;)&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;wc = &lt;span class="co"&gt;Piston&lt;/span&gt;::&lt;span class="co"&gt;Git&lt;/span&gt;::&lt;span class="co"&gt;WorkingCopy&lt;/span&gt;.new(&lt;span class="iv"&gt;@wc&lt;/span&gt; + &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;vendor&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;)&lt;tt&gt;
&lt;/tt&gt;wc.create&lt;tt&gt;
&lt;/tt&gt;wc.copy_from(commit)&lt;tt&gt;
&lt;/tt&gt;wc.remember(commit.remember_values)&lt;tt&gt;
&lt;/tt&gt;wc.finalize&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


	&lt;h3&gt;samples/import_git_svn.rb&lt;/h3&gt;


&lt;table class="CodeRay"&gt;&lt;tr&gt;
  &lt;td title="click to toggle" class="line_numbers"&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;11&lt;tt&gt;
&lt;/tt&gt;12&lt;tt&gt;
&lt;/tt&gt;13&lt;tt&gt;
&lt;/tt&gt;14&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;15&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;16&lt;tt&gt;
&lt;/tt&gt;17&lt;tt&gt;
&lt;/tt&gt;18&lt;tt&gt;
&lt;/tt&gt;19&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;20&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;21&lt;tt&gt;
&lt;/tt&gt;22&lt;tt&gt;
&lt;/tt&gt;23&lt;tt&gt;
&lt;/tt&gt;24&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;25&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;26&lt;tt&gt;
&lt;/tt&gt;27&lt;tt&gt;
&lt;/tt&gt;28&lt;tt&gt;
&lt;/tt&gt;29&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;30&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;31&lt;tt&gt;
&lt;/tt&gt;32&lt;tt&gt;
&lt;/tt&gt;33&lt;tt&gt;
&lt;/tt&gt;34&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;35&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;36&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class="code"&gt;&lt;pre&gt;&lt;span class="c"&gt;#!/usr/bin/env ruby&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class="c"&gt;#&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class="c"&gt;# Import a Git project into a Subversion working copy.&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;require &lt;span class="co"&gt;File&lt;/span&gt;.dirname(&lt;span class="pc"&gt;__FILE__&lt;/span&gt;) + &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;/common&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class="iv"&gt;@root&lt;/span&gt; = &lt;span class="iv"&gt;@root&lt;/span&gt; + &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;tmp/git_svn&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class="iv"&gt;@root&lt;/span&gt;.rmtree &lt;span class="r"&gt;rescue&lt;/span&gt; &lt;span class="pc"&gt;nil&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class="iv"&gt;@root&lt;/span&gt;.mkpath&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class="iv"&gt;@repos&lt;/span&gt; = &lt;span class="iv"&gt;@root&lt;/span&gt; + &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;repos&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class="iv"&gt;@wc&lt;/span&gt; = &lt;span class="iv"&gt;@root&lt;/span&gt; + &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;wc&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class="iv"&gt;@plugin&lt;/span&gt; = &lt;span class="iv"&gt;@root&lt;/span&gt; + &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;plugin&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class="iv"&gt;@tmp&lt;/span&gt; = &lt;span class="iv"&gt;@root&lt;/span&gt; + &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;plugin.tmp&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;svnadmin &lt;span class="sy"&gt;:create&lt;/span&gt;, &lt;span class="iv"&gt;@repos&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;svn &lt;span class="sy"&gt;:checkout&lt;/span&gt;, &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;--quiet&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;, &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;file://&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt; + &lt;span class="iv"&gt;@repos&lt;/span&gt;.realpath, &lt;span class="iv"&gt;@wc&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class="iv"&gt;@plugin&lt;/span&gt;.mkpath&lt;tt&gt;
&lt;/tt&gt;&lt;span class="co"&gt;File&lt;/span&gt;.open(&lt;span class="iv"&gt;@plugin&lt;/span&gt; + &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;README&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;, &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;wb&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;) {|f| f.puts &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;Hello World&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;}&lt;tt&gt;
&lt;/tt&gt;&lt;span class="co"&gt;File&lt;/span&gt;.open(&lt;span class="iv"&gt;@plugin&lt;/span&gt; + &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;init.rb&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;, &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;wb&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;) {|f| f.puts &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;# Some initialization code here&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;}&lt;tt&gt;
&lt;/tt&gt;&lt;span class="co"&gt;Dir&lt;/span&gt;.chdir(&lt;span class="iv"&gt;@plugin&lt;/span&gt;) &lt;span class="r"&gt;do&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  logger.debug {&lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;CWD: &lt;/span&gt;&lt;span class="il"&gt;&lt;span class="dl"&gt;#{&lt;/span&gt;&lt;span class="co"&gt;Dir&lt;/span&gt;.getwd&lt;span class="dl"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;}&lt;tt&gt;
&lt;/tt&gt;  git &lt;span class="sy"&gt;:init&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  git &lt;span class="sy"&gt;:add&lt;/span&gt;, &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;.&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  git &lt;span class="sy"&gt;:commit&lt;/span&gt;, &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;-m&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;, &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;initial commit&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class="r"&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;repos = &lt;span class="co"&gt;Piston&lt;/span&gt;::&lt;span class="co"&gt;Git&lt;/span&gt;::&lt;span class="co"&gt;Repository&lt;/span&gt;.new(&lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;file://&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt; + &lt;span class="iv"&gt;@plugin&lt;/span&gt;.realpath)&lt;tt&gt;
&lt;/tt&gt;commit = repos.at(&lt;span class="sy"&gt;:head&lt;/span&gt;)&lt;tt&gt;
&lt;/tt&gt;commit.checkout_to(&lt;span class="iv"&gt;@tmp&lt;/span&gt;)&lt;tt&gt;
&lt;/tt&gt;wc = &lt;span class="co"&gt;Piston&lt;/span&gt;::&lt;span class="co"&gt;Svn&lt;/span&gt;::&lt;span class="co"&gt;WorkingCopy&lt;/span&gt;.new(&lt;span class="iv"&gt;@wc&lt;/span&gt; + &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;vendor&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;)&lt;tt&gt;
&lt;/tt&gt;wc.create&lt;tt&gt;
&lt;/tt&gt;wc.copy_from(commit)&lt;tt&gt;
&lt;/tt&gt;wc.remember(commit.remember_values)&lt;tt&gt;
&lt;/tt&gt;wc.finalize&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


	&lt;p&gt;Do you see the differences ?  They’re all in the setup code.  Once we hit &lt;code&gt;commit.checkout_to&lt;/code&gt;, everything else is the same.&lt;/p&gt;


	&lt;p&gt;I’m almost ready to release a release candidate.  This will be 1.9.0, and only support the import subcommand.  It will at least expose the code to more testing than just what I have.&lt;/p&gt;


	&lt;p&gt;Oh, and no more &lt;a href="http://blog.teksol.info/2007/3/22/piston-1-3-3-now-with-specifications-at-last" title="at last!"&gt;Piston 1.3.3: Now with specifications&lt;/a&gt;.  This version of Piston was tested right from the start.&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/teksol/~4/252093330" height="1" width="1"/&gt;</content>  </entry>
  <entry xml:base="http://blog.teksol.info/">
    <author>
      <name>francois</name>
    </author>
    <id>tag:blog.teksol.info,2008-03-15:4182</id>
    <published>2008-03-15T02:46:00Z</published>
    <updated>2008-03-15T02:50:39Z</updated>
    <category term="git" />
    <category term="quirks" />
    <link href="http://blog.teksol.info/2008/3/15/git-status-exit-status" rel="alternate" type="text/html" />
    <title>Git status exit status ?</title>
<content type="html">
            &lt;table class="CodeRay"&gt;&lt;tr&gt;
  &lt;td title="click to toggle" class="line_numbers"&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class="code"&gt;&lt;pre&gt;$ git status&lt;tt&gt;
&lt;/tt&gt;# On branch master&lt;tt&gt;
&lt;/tt&gt;nothing to commit (working directory clean)&lt;tt&gt;
&lt;/tt&gt;$ echo $?&lt;tt&gt;
&lt;/tt&gt;1&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


	&lt;p&gt;Shouldn’t a successful git status in a git repository return a status code of 0 ?  Doing it in a random folder returns a sensible value:&lt;/p&gt;


&lt;table class="CodeRay"&gt;&lt;tr&gt;
  &lt;td title="click to toggle" class="line_numbers"&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class="code"&gt;&lt;pre&gt;$ git status&lt;tt&gt;
&lt;/tt&gt;fatal: Not a git repository&lt;tt&gt;
&lt;/tt&gt;Failed to find a valid git directory.&lt;tt&gt;
&lt;/tt&gt;$ echo $?&lt;tt&gt;
&lt;/tt&gt;128&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


	&lt;p&gt;Can anybody shed some light on this ?&lt;/p&gt;


	&lt;p&gt;I found &lt;a href="http://www.gelato.unsw.edu.au/archives/git/0701/36671.html"&gt;Possible bug in ‘git status’ exit code is 1 instead of 0&lt;/a&gt;.  What is the rational for this ?  It goes against everything Unix ?!?&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/teksol/~4/251756312" height="1" width="1"/&gt;</content>  </entry>
</feed>
