[macruby-changes] [1328] MacRuby/branches/experimental
source_changes at macosforge.org
source_changes at macosforge.org
Sat Apr 4 06:50:15 PDT 2009
Revision: 1328
http://trac.macosforge.org/projects/ruby/changeset/1328
Author: eloy.de.enige at gmail.com
Date: 2009-04-04 06:50:14 -0700 (Sat, 04 Apr 2009)
Log Message:
-----------
Added rubyspec:sync:upstream:patches task.
Modified Paths:
--------------
MacRuby/branches/experimental/.gitignore
MacRuby/branches/experimental/rakelib/rubyspec.rake
Modified: MacRuby/branches/experimental/.gitignore
===================================================================
--- MacRuby/branches/experimental/.gitignore 2009-04-04 13:23:50 UTC (rev 1327)
+++ MacRuby/branches/experimental/.gitignore 2009-04-04 13:50:14 UTC (rev 1328)
@@ -10,4 +10,5 @@
revision.h
y.tab.c
include/ruby/config.h
-spec/ruby
\ No newline at end of file
+spec/ruby
+spec/frozen/upstream_patches
\ No newline at end of file
Modified: MacRuby/branches/experimental/rakelib/rubyspec.rake
===================================================================
--- MacRuby/branches/experimental/rakelib/rubyspec.rake 2009-04-04 13:23:50 UTC (rev 1327)
+++ MacRuby/branches/experimental/rakelib/rubyspec.rake 2009-04-04 13:50:14 UTC (rev 1328)
@@ -51,6 +51,10 @@
end
namespace :sync do
+ def upstream_rev
+ @upstream_rev ||= ENV['REV'] || File.read('spec/frozen/upstream')
+ end
+
UPSTREAM_OPTIONS = {
:branch => "merge_upstream",
:exclude => %w{ upstream macruby.mspec tags/macruby },
@@ -59,9 +63,8 @@
desc "Synchronize a checkout with spec/frozen (upstream)"
task :upstream do
- rev = ENV['REV'] || File.read('spec/frozen/upstream')
- puts "\nSwitching to a `#{UPSTREAM_OPTIONS[:branch]}' branch with current revision of spec/frozen: #{rev}"
- Dir.chdir(spec_ruby) { git_checkout(rev, UPSTREAM_OPTIONS[:branch]) }
+ puts "\nSwitching to a `#{UPSTREAM_OPTIONS[:branch]}' branch with current revision of spec/frozen: #{upstream_rev}"
+ Dir.chdir(spec_ruby) { git_checkout(upstream_rev, UPSTREAM_OPTIONS[:branch]) }
dir = ENV['DIR'] || spec_ruby
sh "rm -rf #{dir}/**"
@@ -76,6 +79,19 @@
end
end
+ namespace :upstream do
+ desc "Creates all individual patches in spec/frozen/upstream_patches since upstream revision of spec/frozen: #{upstream_rev}"
+ task :patches do
+ patch_dir = File.expand_path('spec/frozen/upstream_patches')
+ create_patches = "git format-patch --numbered --output-directory #{patch_dir} #{upstream_rev}"
+
+ Dir.chdir(spec_ruby) do
+ git_checkout('master')
+ sh create_patches
+ end
+ end
+ end
+
desc "Remove the `#{UPSTREAM_OPTIONS[:branch]}' branch and switch to the `master' branch (cleans all untracked files!)"
task :remove_upstream do
puts "\nRemoving the `#{UPSTREAM_OPTIONS[:branch]}' branch and all untracked files!"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090404/5b5b95df/attachment-0001.html>
More information about the macruby-changes
mailing list