From 2fa1ce8e6bc8c1916c129855faef7cc003d8d53e Mon Sep 17 00:00:00 2001 From: Alex Young Date: Tue, 25 Feb 2014 16:35:51 +0000 Subject: [PATCH] Tweak changelog generation not to skip commits since last tag --- Rakefile | 24 +++++++++++++++++------- debian/changelog | 17 +++++++++++++++++ 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/Rakefile b/Rakefile index 01c4c4d..1672c5c 100644 --- a/Rakefile +++ b/Rakefile @@ -55,12 +55,12 @@ maketask :clean file "debian/changelog" => ".hg/last-message.txt" do latesttag_cmd = "hg log -l1 --template '{latesttag}'" latesttag = `#{latesttag_cmd}`.strip - log_cmd = "hg log -r #{latesttag}:0 --style xml" + log_cmd = "hg log --style xml" projname = "flexnbd" File.open("debian/changelog", "w") do |changelog| IO.popen( log_cmd, "r" ) do |io| - listener = HGChangelog::Listener.new changelog, projname + listener = HGChangelog::Listener.new changelog, projname, latesttag REXML::Document.parse_stream io, listener io.close end @@ -94,7 +94,10 @@ BEGIN { end def to_s - template = <<-TEMPLATE + if @lines.empty? + "" + else + template = <<-TEMPLATE <%= @projname %> (<%= @tag %>-<%= @rev %>) stable; urgency=low <% for line in @lines -%> @@ -103,9 +106,10 @@ BEGIN { -- <%= @author_name %> <<%= @email %>> <%= render_date %> - TEMPLATE + TEMPLATE - ERB.new(template, nil, "-").result(binding) + ERB.new(template, nil, "-").result(binding) + end end def render_date @@ -116,9 +120,10 @@ BEGIN { class Listener - def initialize out, projname + def initialize out, projname, start_tag @out = out @projname = projname + @start_tag = start_tag end def method_missing(sym,*args,&blk) @@ -128,6 +133,9 @@ BEGIN { case name when "logentry" @rev = attrs['revision'] + if !@entry # first time; collect stuffs for everything since last tag + @entry = ChangelogEntry.new @projname, @start_tag, @rev + end when "author" @email = attrs['email'] when "tag" @@ -149,7 +157,9 @@ BEGIN { when "author" @author_name = @text when "tag" - @entry = ChangelogEntry.new @projname, @text, @rev + if @text != "tip" # again, we want to skip the first one + @entry = ChangelogEntry.new @projname, @text, @rev + end when "msg" @message = @text when "date" diff --git a/debian/changelog b/debian/changelog index c64164a..18aae02 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,20 @@ +flexnbd (0.1.1-435) stable; urgency=low + + * proxy: Turn on TCP_CORK + * proxy: Turn on TCP_NODELAY for the proxy->upstream leg + * client: cork/uncork around NBD_REQUEST_READ responses + * sockutil: Add a tcp_cork helper + * Remove a compile-time optional selection of O_DIRECT (was never used) + * Call srand() to make sure request handles are properly randomised + * Merge + * Add some build-depends which make doc needs + * Remove unreachable code to make -Wunreachable-code on clang useful. + * Depend on either libev4 or libev3, whichever is available + * Add asciidoc as a Build-Depends + * Update Rakefile to generate debian/changelog. + + -- nick Tue, 25 Feb 2014 16:00:48 +0000 + flexnbd (0.1.1-422) stable; urgency=low * Update the Makefile to work with dpkg-buildpackage