summaryrefslogtreecommitdiff
path: root/tool/vcs.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tool/vcs.rb')
-rw-r--r--tool/vcs.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/tool/vcs.rb b/tool/vcs.rb
index 128dfe592e..ca9c8964b5 100644
--- a/tool/vcs.rb
+++ b/tool/vcs.rb
@@ -480,10 +480,13 @@ class VCS
s.sub!(/^git-svn-id: .*@(\d+) .*\n+\z/, '')
rev = $1
s.gsub!(/^ {8}/, '') if /^(?! {8}|$)/ !~ s
+ s.sub!(/\n\n\z/, "\n")
if /\A(\d+)-(\d+)-(\d+)/ =~ time
date = Time.new($1.to_i, $2.to_i, $3.to_i).strftime("%a, %d %b %Y")
end
- w.puts "r#{rev} | #{author} | #{time} (#{date}) | #{s.count("\n")} lines\n\n"
+ lines = s.count("\n")
+ lines = "#{lines} line#{lines == 1 ? '' : 's'}"
+ w.puts "r#{rev} | #{author} | #{time} (#{date}) | #{lines}\n\n"
w.puts s, sep
end
end