[前][次][番号順一覧][スレッド一覧]

ruby-changes:68547

From: Benoit <ko1@a...>
Date: Thu, 21 Oct 2021 04:43:36 +0900 (JST)
Subject: [ruby-changes:68547] 207a5a5bc1 (master): Update to ruby/mspec@08e1275

https://git.ruby-lang.org/ruby.git/commit/?id=207a5a5bc1

From 207a5a5bc13018344dc2ab7913fdcaeaeca01292 Mon Sep 17 00:00:00 2001
From: Benoit Daloze <eregontp@g...>
Date: Wed, 20 Oct 2021 21:41:45 +0200
Subject: Update to ruby/mspec@08e1275

---
 spec/mspec/tool/sync/sync-rubyspec.rb | 9 +++++++++
 spec/mspec/tool/tag_from_output.rb    | 7 ++++---
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/spec/mspec/tool/sync/sync-rubyspec.rb b/spec/mspec/tool/sync/sync-rubyspec.rb
index 7f3dc0e611..b4c79d2afc 100644
--- a/spec/mspec/tool/sync/sync-rubyspec.rb
+++ b/spec/mspec/tool/sync/sync-rubyspec.rb
@@ -57,6 +57,10 @@ class RubyImplementation https://github.com/ruby/ruby/blob/trunk/spec/mspec/tool/sync/sync-rubyspec.rb#L57
     File.basename(git_url, ".git")
   end
 
+  def repo_path
+    "#{__dir__}/#{repo_name}"
+  end
+
   def repo_org
     File.basename(File.dirname(git_url))
   end
@@ -152,6 +156,11 @@ def rebase_commits(impl) https://github.com/ruby/ruby/blob/trunk/spec/mspec/tool/sync/sync-rubyspec.rb#L156
         raise "#{days_since_last_merge.floor} days since last merge, probably wrong commit"
       end
 
+      puts "Checking if the last merge is consistent with upstream files"
+      rubyspec_commit = `git log -n 1 --format='%s' #{last_merge}`.chomp.split('@', 2)[-1]
+      sh "git", "checkout", last_merge
+      sh "git", "diff", "--exit-code", rubyspec_commit, "--", ":!.github"
+
       puts "Rebasing..."
       sh "git", "branch", "-D", rebased if branch?(rebased)
       sh "git", "checkout", "-b", rebased, impl.name
diff --git a/spec/mspec/tool/tag_from_output.rb b/spec/mspec/tool/tag_from_output.rb
index fba52ec26c..ebe13434c2 100755
--- a/spec/mspec/tool/tag_from_output.rb
+++ b/spec/mspec/tool/tag_from_output.rb
@@ -15,9 +15,10 @@ NUMBER = /^\d+\)$/ https://github.com/ruby/ruby/blob/trunk/spec/mspec/tool/tag_from_output.rb#L15
 ERROR_OR_FAILED = / (ERROR|FAILED)$/
 SPEC_FILE = /^(\/.+_spec\.rb)\:\d+/
 
-output.slice_before(NUMBER).select { |number, error_line, *rest|
-  number =~ NUMBER and error_line =~ ERROR_OR_FAILED
-}.each { |number, error_line, *rest|
+output.slice_before(NUMBER).select { |number, *rest|
+  number =~ NUMBER and rest.any? { |line| line =~ ERROR_OR_FAILED }
+}.each { |number, *rest|
+  error_line = rest.find { |line| line =~ ERROR_OR_FAILED }
   description = error_line.match(ERROR_OR_FAILED).pre_match
 
   spec_file = rest.find { |line| line =~ SPEC_FILE }
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]