<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -6,6 +6,7 @@
 Bacon is a small RSpec clone weighing less than 350 LoC but
 nevertheless providing all essential features.
 
+
 == Whirl-wind tour
 
     require 'bacon'</diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -11,43 +11,35 @@ task :predist =&gt; [:chmod, :changelog, :rdoc]
 
 
 desc &quot;Make an archive as .tar.gz&quot;
-task :dist =&gt; :test do
-  sh &quot;export DARCS_REPO=#{File.expand_path &quot;.&quot;}; &quot; +
-     &quot;darcs dist -d bacon-#{get_darcs_tree_version}&quot;
+task :dist =&gt; [:test, :predist] do
+  sh &quot;git archive --format=tar --prefix=#{release}/ HEAD^{tree} &gt;#{release}.tar&quot;
+  sh &quot;pax -waf #{release}.tar -s ':^:#{release}/:' RDOX ChangeLog doc&quot;
+  sh &quot;gzip -f -9 #{release}.tar&quot;
 end
 
-# Helper to retrieve the &quot;revision number&quot; of the darcs tree.
-def get_darcs_tree_version
-  unless File.directory? &quot;_darcs&quot;
+# Helper to retrieve the &quot;revision number&quot; of the git tree.
+def git_tree_version
+  if File.directory?(&quot;.git&quot;)
+    @tree_version ||= `git describe`.strip.sub('-', '.')
+    @tree_version &lt;&lt; &quot;.0&quot;  unless @tree_version.count('.') == 2
+  else
     $: &lt;&lt; &quot;lib&quot;
     require 'bacon'
-    return Bacon::VERSION
+    @tree_version = Bacon::VERSION
   end
+  @tree_version
+end
 
-  changes = `darcs changes`
-  count = 0
-  tag = &quot;0.0&quot;
-
-  changes.each(&quot;\n\n&quot;) { |change|
-    head, title, desc = change.split(&quot;\n&quot;, 3)
-
-    if title =~ /^  \*/
-      # Normal change.
-      count += 1
-    elsif title =~ /tagged (.*)/
-      # Tag.  We look for these.
-      tag = $1
-      break
-    else
-      warn &quot;Unparsable change: #{change}&quot;
-    end
-  }
+def gem_version
+  git_tree_version.gsub(/-.*/, '')
+end
 
-  tag + &quot;.&quot; + count.to_s
+def release
+  &quot;bacon-#{git_tree_version}&quot;
 end
 
 def manifest
-  `darcs query manifest 2&gt;/dev/null`.split(&quot;\n&quot;).map { |f| f.gsub(/\A\.\//, '') }
+  `git ls-files`.split(&quot;\n&quot;) - [&quot;.gitignore&quot;]
 end
 
 
@@ -58,7 +50,20 @@ end
 
 desc &quot;Generate a ChangeLog&quot;
 task :changelog do
-  sh &quot;darcs changes --repo=#{ENV[&quot;DARCS_REPO&quot;] || &quot;.&quot;} &gt;ChangeLog&quot;
+  File.open(&quot;ChangeLog&quot;, &quot;w&quot;) { |out|
+    `git log -z`.split(&quot;\0&quot;).map { |chunk|
+      author = chunk[/Author: (.*)/, 1].strip
+      date = chunk[/Date: (.*)/, 1].strip
+      desc, detail = $'.strip.split(&quot;\n&quot;, 2)
+      detail ||= &quot;&quot;
+      detail = detail.gsub(/.*darcs-hash:.*/, '')
+      detail.rstrip!
+      out.puts &quot;#{date}  #{author}&quot;
+      out.puts &quot;  * #{desc.strip}&quot;
+      out.puts detail  unless detail.empty?
+      out.puts
+    }
+  }
 end
 
 
@@ -67,7 +72,7 @@ task &quot;RDOX&quot; do
   sh &quot;bin/bacon -Ilib --automatic --specdox &gt;RDOX&quot;
 end
 
-desc &quot;Run all the fast tests&quot;
+desc &quot;Run all the tests&quot;
 task :test do
   ruby &quot;bin/bacon -Ilib --automatic --quiet&quot;
 end
@@ -87,7 +92,7 @@ rescue LoadError
 else
   spec = Gem::Specification.new do |s|
     s.name            = &quot;bacon&quot;
-    s.version         = get_darcs_tree_version
+    s.version         = gem_version
     s.platform        = Gem::Platform::RUBY
     s.summary         = &quot;a small RSpec clone&quot;
 
@@ -95,10 +100,10 @@ else
 Bacon is a small RSpec clone weighing less than 350 LoC but
 nevertheless providing all essential features.
 
-http://chneukirchen.org/repos/bacon
+http://github.com/chneukirchen/bacon
     EOF
 
-    s.files           = manifest + %w(RDOX)
+    s.files           = manifest + %w(RDOX ChangeLog)
     s.bindir          = 'bin'
     s.executables     &lt;&lt; 'bacon'
     s.require_path    = 'lib'</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -32,7 +32,7 @@ describe &quot;Bacon&quot; do
     lambda { should.satisfy { 1 == 1 } }.should succeed
     lambda { should.satisfy { 1 } }.should succeed
 
-    lambda { should.satisfy { 1 == 2 } }.should fail
+    lambda { should.satisfy { 1 != 1 } }.should fail
     lambda { should.satisfy { false } }.should fail
     lambda { should.satisfy { false } }.should fail
 </diff>
      <filename>test/spec_bacon.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d3c7562b4b1157ba99ac6f307df77ea88dce37d0</id>
    </parent>
  </parents>
  <author>
    <name>Christian Neukirchen</name>
    <email>chneukirchen@gmail.com</email>
  </author>
  <url>http://github.com/chneukirchen/bacon/commit/f8fcd2ed8d42cbb1f8f1317a0a6269a8435d0520</url>
  <id>f8fcd2ed8d42cbb1f8f1317a0a6269a8435d0520</id>
  <committed-date>2008-11-30T02:13:33-08:00</committed-date>
  <authored-date>2008-11-30T02:13:33-08:00</authored-date>
  <message>Last fixes</message>
  <tree>f3eb216295d5c787374bb15e8aad3f925e13300c</tree>
  <committer>
    <name>Christian Neukirchen</name>
    <email>chneukirchen@gmail.com</email>
  </committer>
</commit>
