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

ruby-changes:49987

From: nobu <ko1@a...>
Date: Tue, 30 Jan 2018 13:17:38 +0900 (JST)
Subject: [ruby-changes:49987] nobu:r62105 (trunk): vcs.rb: checkout the current branch before rebase

nobu	2018-01-30 13:17:32 +0900 (Tue, 30 Jan 2018)

  New Revision: 62105

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62105

  Log:
    vcs.rb: checkout the current branch before rebase

  Modified files:
    trunk/tool/vcs.rb
Index: tool/vcs.rb
===================================================================
--- tool/vcs.rb	(revision 62104)
+++ tool/vcs.rb	(revision 62105)
@@ -487,6 +487,7 @@ class VCS https://github.com/ruby/ruby/blob/trunk/tool/vcs.rb#L487
     def commit
       rev = cmd_read(%W"#{COMMAND} svn info"+[STDERR=>[:child, :out]])[/^Last Changed Rev: (\d+)/, 1]
       com = cmd_read(%W"#{COMMAND} svn find-rev r#{rev}").chomp
+      head = cmd_read(%W"#{COMMAND} symbolic-ref --short HEAD").chomp
 
       commits = cmd_read([COMMAND, "log", "--reverse", "--format=%H %ae %ce", "#{com}..@"], "rb").split("\n")
       commits.each_with_index do |l, i|
@@ -496,6 +497,7 @@ class VCS https://github.com/ruby/ruby/blob/trunk/tool/vcs.rb#L497
         dcommit << "--add-author-from" unless a == c
         dcommit << r
         system(*dcommit) or return false
+        system(COMMAND, "checkout", head) or return false
         system(COMMAND, "rebase") or return false
       end
 

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

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