* tool/vcs.rb (VCS::GIT#export_changelog): do not require date
  extension library so that miniruby can run.
  [ruby-core:78641] [Bug #13032]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2016-12-14 08:25:56 +00:00
Родитель 1407e52ba4
Коммит 72c1b322c7
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -1,6 +1,5 @@
# vcs
require 'fileutils'
require 'time'
# This library is used by several other tools/ scripts to detect the current
# VCS in use (e.g. SVN, Git) or to interact with that VCS.
@ -446,7 +445,9 @@ class VCS
s.sub!(/^git-svn-id: .*@(\d+) .*\n+\z/, '')
rev = $1
s.gsub!(/^ {8}/, '') if /^(?! {8}|$)/ !~ s
date = Time.strptime(time, "%Y-%m-%d %T %z").strftime("%a, %d %b %y")
if /\A(\d+)-(\d+)-(\d+)/ =~ time
date = Time.new($1.to_i, $2.to_i, $3.to_i).strftime("%a, %d %b %Y")
end
w.puts "r#{rev} | #{author} | #{time} (#{date}) | #{s.count("\n")} lines\n\n"
w.puts s, sep
end