def parse
      rewind
      @changes = nil
      @buffer = []
      @release_log = []
      state = :gathering_current_history
      significance = nil
      each_line do |line|
        if state == :gathering_current_history
          case line
          when /^== ([0-9]+\.[0-9]+\.[0-9]+)(.*)/
            state = :gathering_previous_release_log
            @release_log << line
            @buffer << line
            @current_version = $1
            if $2 =~ %r{ (.*) - [0-9]{4}/[0-9]{2}/[0-9]{2}}
              @current_release_name = $1
            end
          when /^=== (.*)$/
            significance = significance_for $1
          when /^\* (.+)$/
            if significance
              changes[significance] << $1
            else
              raise ParseError.new "no significance preceeding history entry '#{$1}'"
            end
          when /^\s*$/, /^== In Git$/
            #noop
          else
            raise ParseError.new("invalid history format: #{line}")
          end
        elsif state == :gathering_previous_release_log
          if line =~ /^== ([0-9]+\.[0-9]+\.[0-9]+)(.*)/
            state = :gathering_remainder
          else
            @release_log << line
          end
          @buffer << line
        else
          @buffer << line
        end
      end
      @release_log = @release_log.join
      @parsed = true
    end
def parse
      rewind
      @changes = nil
      @buffer = []
      @release_log = []
      state = :gathering_current_history
      significance = nil
      each_line do |line|
        if state == :gathering_current_history
          case line
          when /^== ([0-9]+\.[0-9]+\.[0-9]+)(.*)/
            state = :gathering_previous_release_log
            @release_log << line
            @buffer << line
            @current_version = $1
            if $2 =~ %r{ (.*) - [0-9]{4}/[0-9]{2}/[0-9]{2}}
              @current_release_name = $1
            end
          when /^=== (.*)$/
            significance = significance_for $1
          when /^\* (.+)$/
            if significance
              changes[significance] << $1
            else
              raise ParseError.new "no significance preceeding history entry '#{$1}'"
            end
          when /^\s*$/, /^== In Git$/
            #noop
          else
            raise ParseError.new("invalid history format: #{line}")
          end
        elsif state == :gathering_previous_release_log
          if line =~ /^== ([0-9]+\.[0-9]+\.[0-9]+)(.*)/
            state = :gathering_remainder
          else
            @release_log << line
          end
          @buffer << line
        else
          @buffer << line
        end
      end
      @release_log = @release_log.join
      @parsed = true
    end
Parse the entire history file. There's generally no
 need to call this method -- it should be called automatically
 when needed.