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

ruby-changes:47548

From: nobu <ko1@a...>
Date: Sun, 27 Aug 2017 06:02:28 +0900 (JST)
Subject: [ruby-changes:47548] nobu:r59664 (trunk): vcs.rb: refresh after dcommit

nobu	2017-08-27 06:02:23 +0900 (Sun, 27 Aug 2017)

  New Revision: 59664

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

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

  Modified files:
    trunk/tool/vcs.rb
Index: tool/vcs.rb
===================================================================
--- tool/vcs.rb	(revision 59663)
+++ tool/vcs.rb	(revision 59664)
@@ -465,7 +465,13 @@ class VCS https://github.com/ruby/ruby/blob/trunk/tool/vcs.rb#L465
       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

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

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