diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-17 13:56:40 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-17 13:56:40 +0000 |
commit | e1aabbd397d3bb0a202dc9df156cb00a6a30b330 (patch) | |
tree | 4620ed704c5c4c6677dd9afc07a9c5b6c7ec4ba5 /tool/file2lastrev.rb | |
parent | ae27382632423a09095715842c6af2bcb6a3dc62 (diff) | |
download | ruby-e1aabbd397d3bb0a202dc9df156cb00a6a30b330.tar.gz |
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
Diffstat (limited to 'tool/file2lastrev.rb')
-rwxr-xr-x | tool/file2lastrev.rb | 7 |
1 files changed, 6 insertions, 1 deletions
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 |