Skip to content

Commit f659abf

Browse files
committed
pw_poller: New tree selection mechanism
Firstly, use next/pending-fixes instead of riscv/fixes. Secondly, when determining tree, first look for Fixes: tags, and try to apply to fixes. If that does not work, fallback to for-next. Signed-off-by: Björn Töpel <[email protected]>
1 parent 07d58ae commit f659abf

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
lines changed

README.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ Clone the RISC-V trees::
4646
$ mkdir trees
4747
$ git clone https://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git
4848
$ cd linux
49-
$ git worktree add ../fixes -b fixes origin/fixes
49+
$ git remote add next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
50+
$ git fetch next
51+
$ git worktree add ../fixes -b fixes next/pending-fixes
5052
$ git worktree add ../for-next -b for-next origin/for-next
5153

5254
A corresponding config file for the above would be::
@@ -62,7 +64,7 @@ A corresponding config file for the above would be::
6264
6365
[trees]
6466
for-next = for-next,for-next,origin,origin/for-next
65-
fixes = fixes,fixes,origin,origin/fixes
67+
fixes = fixes,fixes,next,next/pending-fixes
6668

6769
Tests
6870
=====

pw_poller.py

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from pw import Patchwork
2222
from pw import PwSeries
2323
import core
24-
import re
24+
import netdev
2525

2626

2727
class IncompleteSeries(Exception):
@@ -103,17 +103,10 @@ def _series_determine_tree(self, s: PwSeries) -> str:
103103
s.tree_name = 'for-next'
104104
return f"Pull request for {s.tree_name}"
105105

106-
# If there's a Fixes: tag, assume the fixes tree
107-
commits = []
108-
regex = re.compile(r'^Fixes: [a-f0-9]* \(')
109-
for p in s.patches:
110-
commits += regex.findall(p.raw_patch)
111-
if commits:
112-
s.tree_name = 'fixes'
113-
else:
114-
s.tree_name = 'for-next'
115-
116-
# XXX fallback to something else?
106+
if "fixes" in self._trees and netdev.series_is_a_fix_for(s, self._trees["fixes"]):
107+
s.tree_name = "fixes"
108+
elif "for-next" in self._trees and self._trees["for-next"].check_applies(s):
109+
s.tree_name = "for-next"
117110

118111
if s.tree_name:
119112
log(f"Target tree - {s.tree_name}", "")

0 commit comments

Comments
 (0)