Skip to content

Commit ed1c1f9

Browse files
committed
merge revision(s) r47248: [Backport ruby#10161]
* common.mk (Doxyfile): revert r43888, not to require preinstalled ruby. [ruby-core:64488] [Bug ruby#10161] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@47518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent e315e5e commit ed1c1f9

File tree

5 files changed

+20
-8
lines changed

5 files changed

+20
-8
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Wed Sep 10 22:58:25 2014 Nobuyoshi Nakada <[email protected]>
2+
3+
* common.mk (Doxyfile): revert r43888, not to require preinstalled
4+
ruby. [ruby-core:64488] [Bug #10161]
5+
16
Wed Sep 10 03:29:48 2014 Nobuyoshi Nakada <[email protected]>
27

38
* io.c (io_close): ignore only "closed stream" IOError and

common.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ $(CAPIOUT)/.timestamp: Doxyfile $(PREP)
204204
Doxyfile: $(srcdir)/template/Doxyfile.tmpl $(PREP) $(srcdir)/tool/generic_erb.rb $(RBCONFIG)
205205
$(ECHO) generating $@
206206
$(Q) $(MINIRUBY) $(srcdir)/tool/generic_erb.rb -o $@ $(srcdir)/template/Doxyfile.tmpl \
207-
--srcdir="$(srcdir)" --miniruby="$(BASERUBY)"
207+
--srcdir="$(srcdir)" --miniruby="$(MINIRUBY)"
208208

209209
program: showflags $(PROGRAM)
210210
wprogram: showflags $(WPROGRAM)

tool/file2lastrev.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ def self.output=(output)
3131
opts.on("--doxygen", "Doxygen format") do
3232
self.output = :doxygen
3333
end
34+
opts.on("--modified", "modified time") do
35+
self.output = :modified
36+
end
3437
opts.on("-q", "--suppress_not_found") do
3538
@suppress_not_found = true
3639
end
@@ -44,7 +47,7 @@ def self.output=(output)
4447
abort "#{File.basename(Program)}: #{e.message}" unless @suppress_not_found
4548
else
4649
begin
47-
last, changed = vcs.get_revisions(ARGV.shift)
50+
last, changed, modified = vcs.get_revisions(ARGV.shift)
4851
rescue => e
4952
abort "#{File.basename(Program)}: #{e.message}" unless @suppress_not_found
5053
exit false
@@ -58,6 +61,8 @@ def self.output=(output)
5861
puts "#define RUBY_REVISION #{changed.to_i}"
5962
when :doxygen
6063
puts "r#{changed}/r#{last}"
64+
when :modified
65+
puts modified.strftime('%Y-%m-%dT%H:%M:%S%z')
6166
else
6267
raise "unknown output format `#{@output}'"
6368
end

tool/vcs.rb

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# vcs
22

3-
require 'time'
4-
53
ENV.delete('PWD')
64

75
unless File.respond_to? :realpath
@@ -45,7 +43,11 @@ def get_revisions(path)
4543
last, changed, modified, *rest = Dir.chdir(@srcdir) {self.class.get_revisions(path)}
4644
last or raise VCS::NotFoundError, "last revision not found"
4745
changed or raise VCS::NotFoundError, "changed revision not found"
48-
modified &&= Time.parse(modified)
46+
if modified
47+
/\A(\d+)-(\d+)-(\d+)\D(\d+):(\d+):(\d+(?:\.\d+)?)\s*(?:Z|([-+]\d\d)(\d\d))\z/ =~ modified or
48+
raise "unknown time format - #{modified}"
49+
modified = Time.mktime(*($~[1..6] + [$7 ? "#{$7}:#{$8}" : "+00:00"]))
50+
end
4951
return last, changed, modified, *rest
5052
end
5153

@@ -96,16 +98,16 @@ class GIT < self
9698
register(".git")
9799

98100
def self.get_revisions(path)
99-
logcmd = %Q[git log -n1 --grep="^ *git-svn-id: .*@[0-9][0-9]* "]
101+
logcmd = %Q[git log -n1 --date=iso --grep="^ *git-svn-id: .*@[0-9][0-9]* "]
100102
idpat = /git-svn-id: .*?@(\d+) \S+\Z/
101103
last = `#{logcmd}`[idpat, 1]
102104
if path
103105
log = `#{logcmd} "#{path}"`
104106
changed = log[idpat, 1]
105-
modified = `git log --format=%ai -- #{path}`
106107
else
107108
changed = last
108109
end
110+
modified = log[/^Date:\s+(.*)/, 1]
109111
[last, changed, modified]
110112
end
111113
end

version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#define RUBY_VERSION "2.1.2"
22
#define RUBY_RELEASE_DATE "2014-09-10"
3-
#define RUBY_PATCHLEVEL 232
3+
#define RUBY_PATCHLEVEL 233
44

55
#define RUBY_RELEASE_YEAR 2014
66
#define RUBY_RELEASE_MONTH 9

0 commit comments

Comments
 (0)