[前][次][番号順一覧][スレッド一覧]

ruby-changes:35464

From: usa <ko1@a...>
Date: Fri, 12 Sep 2014 11:23:47 +0900 (JST)
Subject: [ruby-changes:35464] usa:r47546 (ruby_2_0_0): merge revision(s) 47248: [Backport #10161]

usa	2014-09-12 11:23:39 +0900 (Fri, 12 Sep 2014)

  New Revision: 47546

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47546

  Log:
    merge revision(s) 47248: [Backport #10161]
    
    * common.mk (Doxyfile): revert r43888, not to require preinstalled
      ruby.  [ruby-core:64488] [Bug #10161]

  Modified directories:
    branches/ruby_2_0_0/
  Modified files:
    branches/ruby_2_0_0/ChangeLog
    branches/ruby_2_0_0/common.mk
    branches/ruby_2_0_0/tool/file2lastrev.rb
    branches/ruby_2_0_0/tool/vcs.rb
    branches/ruby_2_0_0/version.h
Index: ruby_2_0_0/ChangeLog
===================================================================
--- ruby_2_0_0/ChangeLog	(revision 47545)
+++ ruby_2_0_0/ChangeLog	(revision 47546)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1
+Fri Sep 12 11:22:55 2014  Nobuyoshi Nakada  <nobu@r...>
+
+	* common.mk (Doxyfile): revert r43888, not to require preinstalled
+	  ruby.  [ruby-core:64488] [Bug #10161]
+
 Fri Sep 12 11:15:04 2014  Nobuyoshi Nakada  <nobu@r...>
 
 	* io.c (rb_io_reopen): create a new, temporary FD via rb_sysopen and
Index: ruby_2_0_0/common.mk
===================================================================
--- ruby_2_0_0/common.mk	(revision 47545)
+++ ruby_2_0_0/common.mk	(revision 47546)
@@ -206,7 +206,7 @@ $(CAPIOUT)/.timestamp: Doxyfile $(PREP) https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/common.mk#L206
 Doxyfile: $(srcdir)/template/Doxyfile.tmpl $(PREP) $(srcdir)/tool/generic_erb.rb $(RBCONFIG)
 	$(ECHO) generating $@
 	$(Q) $(MINIRUBY) $(srcdir)/tool/generic_erb.rb -o $@ $(srcdir)/template/Doxyfile.tmpl \
-	--srcdir="$(srcdir)" --miniruby="$(BASERUBY)"
+	--srcdir="$(srcdir)" --miniruby="$(MINIRUBY)"
 
 program: showflags $(PROGRAM)
 wprogram: showflags $(WPROGRAM)
Index: ruby_2_0_0/version.h
===================================================================
--- ruby_2_0_0/version.h	(revision 47545)
+++ ruby_2_0_0/version.h	(revision 47546)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1
 #define RUBY_VERSION "2.0.0"
 #define RUBY_RELEASE_DATE "2014-09-12"
-#define RUBY_PATCHLEVEL 567
+#define RUBY_PATCHLEVEL 568
 
 #define RUBY_RELEASE_YEAR 2014
 #define RUBY_RELEASE_MONTH 9
Index: ruby_2_0_0/tool/vcs.rb
===================================================================
--- ruby_2_0_0/tool/vcs.rb	(revision 47545)
+++ ruby_2_0_0/tool/vcs.rb	(revision 47546)
@@ -1,7 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/tool/vcs.rb#L1
 # vcs
 
-require 'time'
-
 ENV.delete('PWD')
 
 unless File.respond_to? :realpath
@@ -45,7 +43,11 @@ class VCS https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/tool/vcs.rb#L43
     last, changed, modified, *rest = Dir.chdir(@srcdir) {self.class.get_revisions(path)}
     last or raise "last revision not found"
     changed or raise "changed revision not found"
-    modified &&= Time.parse(modified)
+    if modified
+      /\A(\d+)-(\d+)-(\d+)\D(\d+):(\d+):(\d+(?:\.\d+)?)\s*(?:Z|([-+]\d\d)(\d\d))\z/ =~ modified or
+        raise "unknown time format - #{modified}"
+      modified = Time.mktime(*($~[1..6] + [$7 ? "#{$7}:#{$8}" : "+00:00"]))
+    end
     return last, changed, modified, *rest
   end
 
@@ -96,16 +98,16 @@ class VCS https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/tool/vcs.rb#L98
     register(".git")
 
     def self.get_revisions(path)
-      logcmd = %Q[git log -n1 --grep="^ *git-svn-id: .*@[0-9][0-9]* "]
+      logcmd = %Q[git log -n1 --date=iso --grep="^ *git-svn-id: .*@[0-9][0-9]* "]
       idpat = /git-svn-id: .*?@(\d+) \S+\Z/
       last = `#{logcmd}`[idpat, 1]
       if path
         log = `#{logcmd} "#{path}"`
         changed = log[idpat, 1]
-        modified = `git log --format=%ai -- #{path}`
       else
         changed = last
       end
+      modified = log[/^Date:\s+(.*)/, 1]
       [last, changed, modified]
     end
   end
Index: ruby_2_0_0/tool/file2lastrev.rb
===================================================================
--- ruby_2_0_0/tool/file2lastrev.rb	(revision 47545)
+++ ruby_2_0_0/tool/file2lastrev.rb	(revision 47546)
@@ -31,6 +31,9 @@ parser = OptionParser.new {|opts| https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/tool/file2lastrev.rb#L31
   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 https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/tool/file2lastrev.rb#L47
   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 https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/tool/file2lastrev.rb#L61
   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

Property changes on: ruby_2_0_0
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r47248


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]