summaryrefslogtreecommitdiff
path: root/tool/file2lastrev.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-17 12:56:10 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-17 12:56:10 +0000
commit63491598c6870c3097833d2a4666f38098b6b238 (patch)
tree1d192150ecd73eacda6255dcde096efd15ea5ca8 /tool/file2lastrev.rb
parent8cfce15387f3ff9d922e60b3ff53cf874215fdf5 (diff)
version.h: include branch name
* tool/file2lastrev.rb, tool/vcs.rb (get_revisions): define RUBY_BRANCH_NAME from the current branch name. * version.h (RUBY_REVISION_STR): include the current branch name not "trunk" always. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/file2lastrev.rb')
-rwxr-xr-xtool/file2lastrev.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/tool/file2lastrev.rb b/tool/file2lastrev.rb
index 616c5f7..de4b928 100755
--- a/tool/file2lastrev.rb
+++ b/tool/file2lastrev.rb
@@ -47,7 +47,7 @@ rescue VCS::NotFoundError => e
abort "#{File.basename(Program)}: #{e.message}" unless @suppress_not_found
else
begin
- last, changed, modified = vcs.get_revisions(ARGV.shift)
+ last, changed, modified, branch = vcs.get_revisions(ARGV.shift)
rescue => e
abort "#{File.basename(Program)}: #{e.message}" unless @suppress_not_found
exit false
@@ -58,7 +58,8 @@ case @output
when :changed, nil
puts changed
when :revision_h
- puts "#define RUBY_REVISION #{changed.to_i}"
+ puts "#define RUBY_REVISION #{changed || 0}"
+ puts "#define RUBY_BRANCH_NAME #{branch.dump}" if branch
when :doxygen
puts "r#{changed}/r#{last}"
when :modified