Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions git_pw/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,23 @@ def _tabulate(
writer.writerow([ensure_str(i) for i in item])
return result.getvalue()
elif fmt == 'yaml':

tempout = []
patch = ()
for entry in output:

if entry[0] == 'Patches':
l1 = [entry[1]]
patch = ('Patches',l1)

elif len(patch) != 0 and entry[0] == '':
elem = entry[1]
patch[1].append(elem)
else:
tempout.append(entry)
output = tempout
output.append(patch)

data = [
{headers[i].lower(): entry[i] for i in range(len(headers))}
for entry in output
Expand Down