diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-07-26 12:44:12 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-07-26 12:44:12 +0000 |
commit | 11f69dccf3d9dd5e70f0f34546aab10b1f733ae1 (patch) | |
tree | f3ac622eedaf7556ac307b59c49d312a9f73b885 | |
parent | ae91976d561e3855753b936fa9ac6048f64e30bd (diff) | |
download | ruby-11f69dccf3d9dd5e70f0f34546aab10b1f733ae1.tar.gz |
vcs.rb: commit
* tool/vcs.rb (commit): do commit, reset svn revision to sync git
mirror.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | defs/gmake.mk | 14 | ||||
-rw-r--r-- | tool/vcs.rb | 13 |
2 files changed, 14 insertions, 13 deletions
diff --git a/defs/gmake.mk b/defs/gmake.mk index 3698f33521..d961e27f77 100644 --- a/defs/gmake.mk +++ b/defs/gmake.mk @@ -136,22 +136,10 @@ $(TIMESTAMPDIR)/.exec.time: $(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 diff --git a/tool/vcs.rb b/tool/vcs.rb index d54094a409..ec75840746 100644 --- a/tool/vcs.rb +++ b/tool/vcs.rb @@ -317,6 +317,10 @@ class VCS end end end + + def commit + system(*%W"#{COMMAND} commit") + end end class GIT < self @@ -456,5 +460,14 @@ class VCS 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 |