summaryrefslogtreecommitdiff
path: root/tool/file2lastrev.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-22 06:36:46 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-22 06:36:46 +0000
commitf024d46f1155b0e9e6d767636f0ce8a9ca2efc65 (patch)
tree7dfdfa4aede4b96c1ff0360862df56b6647e641e /tool/file2lastrev.rb
parent3229456d40be9219f1476855c945f84b9d30f00b (diff)
tool/vcs.rb: no time.rb
* common.mk (Doxyfile): revert r43888, not to require preinstalled ruby. [ruby-core:64488] [Bug #10161] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/file2lastrev.rb')
-rwxr-xr-xtool/file2lastrev.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/tool/file2lastrev.rb b/tool/file2lastrev.rb
index 56e1b9f..616c5f7 100755
--- a/tool/file2lastrev.rb
+++ b/tool/file2lastrev.rb
@@ -31,6 +31,9 @@ parser = OptionParser.new {|opts|
opts.on("--doxygen", "Doxygen format") do
self.output = :doxygen
end
+ opts.on("--modified", "modified time") do
+ self.output = :modified
+ end
opts.on("-q", "--suppress_not_found") do
@suppress_not_found = true
end
@@ -44,7 +47,7 @@ rescue VCS::NotFoundError => e
abort "#{File.basename(Program)}: #{e.message}" unless @suppress_not_found
else
begin
- last, changed = vcs.get_revisions(ARGV.shift)
+ last, changed, modified = vcs.get_revisions(ARGV.shift)
rescue => e
abort "#{File.basename(Program)}: #{e.message}" unless @suppress_not_found
exit false
@@ -58,6 +61,8 @@ when :revision_h
puts "#define RUBY_REVISION #{changed.to_i}"
when :doxygen
puts "r#{changed}/r#{last}"
+when :modified
+ puts modified.strftime('%Y-%m-%dT%H:%M:%S%z')
else
raise "unknown output format `#{@output}'"
end