ruby-changes:47310
From: nobu <ko1@a...>
Date: Wed, 26 Jul 2017 21:44:18 +0900 (JST)
Subject: [ruby-changes:47310] nobu:r59425 (trunk): vcs.rb: commit
nobu 2017-07-26 21:44:12 +0900 (Wed, 26 Jul 2017) New Revision: 59425 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59425 Log: vcs.rb: commit * tool/vcs.rb (commit): do commit, reset svn revision to sync git mirror. Modified files: trunk/defs/gmake.mk trunk/tool/vcs.rb Index: tool/vcs.rb =================================================================== --- tool/vcs.rb (revision 59424) +++ tool/vcs.rb (revision 59425) @@ -317,6 +317,10 @@ class VCS https://github.com/ruby/ruby/blob/trunk/tool/vcs.rb#L317 end end end + + def commit + system(*%W"#{COMMAND} commit") + end end class GIT < self @@ -456,5 +460,14 @@ class VCS https://github.com/ruby/ruby/blob/trunk/tool/vcs.rb#L460 end end end + + def commit + 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}") + end + ret + end end end Index: defs/gmake.mk =================================================================== --- defs/gmake.mk (revision 59424) +++ defs/gmake.mk (revision 59425) @@ -136,22 +136,10 @@ $(TIMESTAMPDIR)/.exec.time: https://github.com/ruby/ruby/blob/trunk/defs/gmake.mk#L136 $(Q) mkdir exec $(Q) exit > $@ -ifneq (,) -else ifeq ($(VCS),svn) -VCSCOMMIT = $(VCS) commit $(SVNCOMMITOPTIONS) -else ifeq ($(VCS),git svn) -VCSCOMMIT = $(VCS) dcommit $(GITSVNCOMMITOPTIONS) -VCSWAIT = sleep 2 # wait for svn to git sync -else ifeq ($(VCS),git) -VCSCOMMIT := $(VCS) push $(GITCOMMITOPTIONS) -endif -ifneq ($(VCSCOMMIT),) .PHONY: commit commit: $(if $(filter commit,$(MAKECMDGOALS)),$(filter-out commit,$(MAKECMDGOALS))) - @$(CHDIR) "$(srcdir)" && LC_TIME=C exec $(VCSCOMMIT) - $(Q)$(VCSWAIT) + @$(BASERUBY) -C "$(srcdir)" -I./tool -rvcs -e 'VCS.detect(".").commit' $(Q)$(MAKE) $(mflags) Q=$(Q) REVISION_FORCE=PHONY update-src srcs all-incs -endif ifeq ($(words $(filter update-gems extract-gems,$(MAKECMDGOALS))),2) extract-gems: update-gems -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/