summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2019-07-26 16:06:54 +0800
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-07-26 16:06:54 +0800
commit071bf889706d13879c323d61fd2e757ff32c8bda (patch)
tree7d64d7610c7be1c4c69066abbd912bf663c50333
parent348c9687bf0454fce787e0d4886fe244831b0a84 (diff)
Improve the commits list for cherry-picking from default gems.
* Ignore Merge commit from the commit lists before trying to pick commit. * Show the commits list at first.
-rw-r--r--tool/sync_default_gems.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb
index aa98f60ca1..599d6b3281 100644
--- a/tool/sync_default_gems.rb
+++ b/tool/sync_default_gems.rb
@@ -240,12 +240,15 @@ def sync_default_gems_with_commits(gem, range)
IO.popen(%W"git log --format=%H,%s #{range}") do |f|
commits = f.read.split("\n").reverse.map{|commit| commit.split(',')}
+
+ # Ignore Merge commit for ruby core repository.
+ commits.delete_if{|_, subject| subject =~ /^Merge/}
+
+ puts "Try to pick these commits:"
+ puts commits.map{|commit| commit.join(": ")}.join("\n")
+
commits.each do |sha, subject|
puts "Pick #{sha} from #{$repositories[gem.to_sym]}."
- if subject =~ /^Merge/
- puts "Skip #{sha}. Because It was merge commit"
- next
- end
`git cherry-pick #{sha}`
unless $?.success?