1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

vcs.rb: checkout the current branch before rebase

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-01-30 04:17:32 +00:00
parent d7d2225e4b
commit c3ce3b4744

View file

@ -487,6 +487,7 @@ class VCS
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
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