parameters: (branches, csv, print_merged, print_notmerged, print_stats)
docstring: prints out list of branches with specified details (using
          human-readable (or CSV) format. It is possible to specify,
          which branches should be printed (merged, notmerged) and
          also print out summary statistics
docstring_summary: prints out list of branches with specified details (using
          human-readable (or CSV) format. It is possible to specify,
          which branches should be printed (merged, notmerged) and
          also print out summary statistics
docstring_tokens: prints out list of branches with specified details ( using human - readable ( or CSV ) format . It is possible to specify which branches should be printed ( merged notmerged ) and also print out summary statistics
function: def branch_print(branches, csv, print_merged, print_notmerged, print_stats):
      """ prints out list of branches with specified details (using
          human-readable (or CSV) format. It is possible to specify,
          which branches should be printed (merged, notmerged) and
          also print out summary statistics """
  
      # counters used for statistics
      merged = 0
      notmerged = 0
  
      # compact list of merged/notmerged branches
      merged_str = ""
      notmerged_str = ""
      for branch in branches:
          if branch.status == Branch.MERGED:
              merged = merged + 1
              if not print_merged:
                  continue
              if csv:
                  print("%s,merged,%s" % (branch.name, branch.last_commit) )
              else:
                  merged_str = merged_str + " " + branch.name
          else:
              # NOT MERGED
              notmerged = notmerged + 1
              if not print_notmerged:
                  continue
              if csv:
                  print("%s,notmerged,%s" % (branch.name, branch.last_commit) )
              else:
                  notmerged_str = notmerged_str + " " + branch.name
  
      if not csv:
          if print_merged:
              print("Merged branches    : %s" % (merged_str))
          if print_notmerged:
              print("NOT merged branches: %s" % (notmerged_str))
  
      if print_stats:
          print("#----------")
          print("#Merged    : %d" % merged)
          print("#Not merged: %d" % notmerged)
function_tokens: def branch_print ( branches , csv , print_merged , print_notmerged , print_stats ) : # counters used for statistics merged = 0 notmerged = 0 # compact list of merged/notmerged branches merged_str = "" notmerged_str = "" for branch in branches : if branch . status == Branch . MERGED : merged = merged + 1 if not print_merged : continue if csv : print ( "%s,merged,%s" % ( branch . name , branch . last_commit ) ) else : merged_str = merged_str + " " + branch . name else : # NOT MERGED notmerged = notmerged + 1 if not print_notmerged : continue if csv : print ( "%s,notmerged,%s" % ( branch . name , branch . last_commit ) ) else : notmerged_str = notmerged_str + " " + branch . name if not csv : if print_merged : print ( "Merged branches    : %s" % ( merged_str ) ) if print_notmerged : print ( "NOT merged branches: %s" % ( notmerged_str ) ) if print_stats : print ( "#----------" ) print ( "#Merged    : %d" % merged ) print ( "#Not merged: %d" % notmerged )