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

ruby-changes:56490

From: Hiroshi <ko1@a...>
Date: Sun, 14 Jul 2019 21:53:52 +0900 (JST)
Subject: [ruby-changes:56490] Hiroshi SHIBATA: be082e2800 (master): Try to sync with commit history for default gems.

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

From be082e28003543eff5ff07cf5261dbf7b6278a50 Mon Sep 17 00:00:00 2001
From: Hiroshi SHIBATA <hsbt@r...>
Date: Sun, 14 Jul 2019 16:56:39 +0900
Subject: Try to sync with commit history for default gems.


diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb
index 34cdfae..9d30892 100644
--- a/tool/sync_default_gems.rb
+++ b/tool/sync_default_gems.rb
@@ -228,6 +228,17 @@ def sync_default_gems(gem) https://github.com/ruby/ruby/blob/trunk/tool/sync_default_gems.rb#L228
   end
 end
 
+def sync_default_gems_with_commits(gem, range)
+  puts "Sync #{$repositories[gem.to_sym]} with commit history."
+
+  IO.popen(%W"git remote") do |f|
+    unless f.read.split.include?(gem)
+      `git remote add #{gem} git@g...:#{$repositories[gem.to_sym]}.git`
+      `git fetch #{gem}`
+    end
+  end
+end
+
 def sync_lib(repo)
   unless File.directory?("../#{repo}")
     abort "Expected '../#{repo}' (#{File.expand_path("../#{repo}")}) to be a directory, but it wasn't."
@@ -278,5 +289,9 @@ when "up" https://github.com/ruby/ruby/blob/trunk/tool/sync_default_gems.rb#L289
 when "all"
   $repositories.keys.each{|gem| sync_default_gems(gem.to_s)}
 else
-  sync_default_gems(ARGV[0])
+  if ARGV[1]
+    sync_default_gems_with_commits(ARGV[0], ARGV[1])
+  else
+    sync_default_gems(ARGV[0])
+  end
 end
-- 
cgit v0.10.2


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

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