summaryrefslogtreecommitdiff
path: root/tool/vcs.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-30 04:17:32 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-30 04:17:32 +0000
commitc3ce3b47443fa7d35503dbccf42ddbebb7e50eea (patch)
treec6ec4cb11d83ea0d9a1334d71f06e0fc58aeac42 /tool/vcs.rb
parentd7d2225e4bc20a696c12808a45bde8392a43e0dc (diff)
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
Diffstat (limited to 'tool/vcs.rb')
-rw-r--r--tool/vcs.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/tool/vcs.rb b/tool/vcs.rb
index e710448..7e06f3d 100644
--- a/tool/vcs.rb
+++ b/tool/vcs.rb
@@ -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