summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-17 13:56:40 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-17 13:56:40 +0000
commite1aabbd397d3bb0a202dc9df156cb00a6a30b330 (patch)
tree4620ed704c5c4c6677dd9afc07a9c5b6c7ec4ba5
parentae27382632423a09095715842c6af2bcb6a3dc62 (diff)
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
-rwxr-xr-xtool/file2lastrev.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/tool/file2lastrev.rb b/tool/file2lastrev.rb
index de4b928..9202e8d 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