summaryrefslogtreecommitdiff
path: root/tool/file2lastrev.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-05-31 02:28:38 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-05-31 10:55:37 +0900
commitfd658ec821f07e0a2254fcd62ce29cc644d61302 (patch)
tree4cb533bb8563fed8c311a43361fab4a7d0fa8b18 /tool/file2lastrev.rb
parente8c710b11a02c6ab82b358fc671a14f378cb1974 (diff)
downloadruby-fd658ec821f07e0a2254fcd62ce29cc644d61302.tar.gz
Define RUBY_FULL_REVISION
Only if the short revision differs from the full revision.
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 24fbaeb0d7..1e2a6fc440 100755
--- a/tool/file2lastrev.rb
+++ b/tool/file2lastrev.rb
@@ -54,9 +54,10 @@ vcs = nil
}
when :revision_h
Proc.new {|last, changed, modified, branch, title|
+ short = vcs.short_revision(last)
[
- "#define RUBY_REVISION #{vcs.short_revision(last).dump}",
- "#define RUBY_FULL_REVISION #{last.dump}",
+ "#define RUBY_REVISION #{short.inspect}",
+ ("#define RUBY_FULL_REVISION #{last.inspect}" unless short == last),
if branch
e = '..'
limit = 16