mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
ae27382632
commit
e1aabbd397
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue