From e1aabbd397d3bb0a202dc9df156cb00a6a30b330 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 17 Jan 2015 13:56:40 +0000 Subject: 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- tool/file2lastrev.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tool/file2lastrev.rb') diff --git a/tool/file2lastrev.rb b/tool/file2lastrev.rb index de4b928606..9202e8d637 100755 --- a/tool/file2lastrev.rb +++ b/tool/file2lastrev.rb @@ -59,7 +59,12 @@ when :changed, nil 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 -- cgit v1.2.3