def format_commit_lines(web_url, repo, base, tip):
 if web_url:
  rev_base_url = (web_url.rstrip('/') + '/rev/')
 commit_summaries = []
 for rev in range(base, tip):
  rev_node = repo.changelog.node(rev)
  rev_ctx = repo.changectx(rev_node)
  one_liner = rev_ctx.description().split('\n')[0]
  if web_url:
   summary_url = (rev_base_url + str(rev_ctx))
   summary = '* [{summary}]({url})'.format(summary=one_liner, url=summary_url)
  else:
   summary = '* {summary}'.format(summary=one_liner)
  commit_summaries.append(summary)
 return '\n'.join((summary for summary in commit_summaries))

def format_commit_lines ( web_url , repo , base , tip ) : if web_url : rev_base_url = ( web_url . rstrip ( '/' ) + '/rev/' ) commit_summaries = [ ] for rev in range ( base , tip ) : rev_node = repo . changelog . node ( rev ) rev_ctx = repo . changectx ( rev_node ) one_liner = rev_ctx . description ( ) . split ( '\n' ) [ 0 ] if web_url : summary_url = ( rev_base_url + str ( rev_ctx ) ) summary = '* [{summary}]({url})' . format ( summary = one_liner , url = summary_url ) else : summary = '* {summary}' . format ( summary = one_liner ) commit_summaries . append ( summary ) return '\n' . join ( ( summary for summary in commit_summaries ) )
format the per-commit information for the message .