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

ruby-changes:37224

From: nobu <ko1@a...>
Date: Sat, 17 Jan 2015 22:56:49 +0900 (JST)
Subject: [ruby-changes:37224] nobu:r49305 (trunk): file2lastrev.rb: limit branch names

nobu	2015-01-17 22:56:40 +0900 (Sat, 17 Jan 2015)

  New Revision: 49305

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

  Log:
    file2lastrev.rb: limit branch names
    
    * tool/file2lastrev.rb (revision_h): limit branch names upto 16
      chars, and replace extra part with ".." not to exceed the limit.

  Modified files:
    trunk/tool/file2lastrev.rb
Index: tool/file2lastrev.rb
===================================================================
--- tool/file2lastrev.rb	(revision 49304)
+++ tool/file2lastrev.rb	(revision 49305)
@@ -59,7 +59,12 @@ when :changed, nil https://github.com/ruby/ruby/blob/trunk/tool/file2lastrev.rb#L59
   puts changed
 when :revision_h
   puts "#define RUBY_REVISION #{changed || 0}"
-  puts "#define RUBY_BRANCH_NAME #{branch.dump}" if branch
+  if branch
+    e = '..'
+    limit = 16
+    name = branch.sub(/\A(.{0,#{limit-e.size}}).{#{e.size+1},}/o) {$1+e}
+    puts "#define RUBY_BRANCH_NAME #{name.dump}"
+  end
 when :doxygen
   puts "r#{changed}/r#{last}"
 when :modified

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

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