mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
vcs.rb: no ext/date in vcs.rb
* 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:
parent
1407e52ba4
commit
72c1b322c7
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue