parameters: (changelog)
docstring: Convert a oneline log iterator to formatted strings.
  
      :param changelog: An iterator of one line log entries like
          that given by _iter_log_oneline.
      :return: An iterator over (release, formatted changelog) tuples.
docstring_summary: Convert a oneline log iterator to formatted strings.
docstring_tokens: Convert a oneline log iterator to formatted strings .
function: def _iter_changelog(changelog):
      """Convert a oneline log iterator to formatted strings.
  
      :param changelog: An iterator of one line log entries like
          that given by _iter_log_oneline.
      :return: An iterator over (release, formatted changelog) tuples.
      """
      first_line = True
      current_release = None
      yield current_release, "CHANGES\n=======\n\n"
      for hash, tags, msg in changelog:
          if tags:
              current_release = _get_highest_tag(tags)
              underline = len(current_release) * '-'
              if not first_line:
                  yield current_release, '\n'
              yield current_release, (
                  "%(tag)s\n%(underline)s\n\n" %
                  dict(tag=current_release, underline=underline))
  
          if not msg.startswith("Merge "):
              if msg.endswith("."):
                  msg = msg[:-1]
              msg = _clean_changelog_message(msg)
              yield current_release, "* %(msg)s\n" % dict(msg=msg)
          first_line = False
function_tokens: def _iter_changelog ( changelog ) : first_line = True current_release = None yield current_release , "CHANGES\n=======\n\n" for hash , tags , msg in changelog : if tags : current_release = _get_highest_tag ( tags ) underline = len ( current_release ) * '-' if not first_line : yield current_release , '\n' yield current_release , ( "%(tag)s\n%(underline)s\n\n" % dict ( tag = current_release , underline = underline ) ) if not msg . startswith ( "Merge " ) : if msg . endswith ( "." ) : msg = msg [ : - 1 ] msg = _clean_changelog_message ( msg ) yield current_release , "* %(msg)s\n" % dict ( msg = msg ) first_line = False