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

vcs.rb: refresh after dcommit

* tool/vcs.rb (VCS::GIT#commit): refresh until sync after dcommit.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2017-08-26 21:02:23 +00:00
parent 6de143f63d
commit 6582a2f6f1

View file

@ -465,7 +465,13 @@ class VCS
rev = cmd_read(%W"#{COMMAND} svn info"+[STDERR=>[:child, :out]])[/^Last Changed Rev: (\d+)/, 1]
ret = system(COMMAND, "svn", "dcommit")
if ret and rev
cmd_read(%W"#{COMMAND} svn reset -r#{rev}")
old = [cmd_read(%W"#{COMMAND} log -1 --format=%H").chomp]
old << cmd_read(%W"#{COMMAND} svn reset -r#{rev}")[/^r#{rev} = (\h+)/, 1]
3.times do
sleep 2
system(*%W"#{COMMAND} pull --no-edit --rebase")
break unless old.include?(cmd_read(%W"#{COMMAND} log -1 --format=%H").chomp)
end
end
ret
end