Skip to content

Commit

Permalink
f prev
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
kuba-moo committed Nov 30, 2023
1 parent 0dcc367 commit 6cf3e36
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion trivial-net-brancher.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ def pwe_get_pending(pw, config) -> List:
def apply_pending_patches(pw, config, tree) -> None:
log_open_sec("Get pending submissions from patchwork")
things = pwe_get_pending(pw, config)
log(f"Have {len(things)} pending things from patchwork")
log_end_sec()

log_open_sec("Applying pending submissions")
Expand All @@ -115,13 +116,18 @@ def apply_pending_patches(pw, config, tree) -> None:
applied_prs = set()
for entry in things:
series_id = pwe_series_id_or_none(entry)
if series_id in seen_series:
continue

if entry.get('pull_url', None):
log_open_sec("Pulling: " + entry["name"])
try:
tree.pull(entry["pull_url"], reset=False)
applied_prs.add(entry["id"])
except PullError:
pass
elif series_id and series_id not in seen_series:
else:
log_open_sec("Applying: " + entry["series"][0]["name"])
seen_series.add(series_id)
mbox_url = entry["series"][0]["mbox"]
data = pw.get_mbox_direct(mbox_url)
Expand All @@ -131,6 +137,7 @@ def apply_pending_patches(pw, config, tree) -> None:
applied_series.add(series_id)
except PatchApplyError:
pass
log_end_sec()
log_end_sec()


Expand Down

0 comments on commit 6cf3e36

Please sign in to comment.