10 Commits

Author SHA1 Message Date
Simon Glass
f387937b46 patman: Drop hard-coded patchwork server
Since there is now a new server at patchwork.u-boot.org allow using this
if selected in the ~/.patman file.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-08-20 07:41:17 -06:00
Simon Glass
5edcf586be patman: Enhance patchwork interface to support Cseries
Add various new requests to the Patchwork class, so we can obtain the
required information. This includes cover letters and comments.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-24 05:26:46 +01:00
Simon Glass
908e026e15 patman: Update status command support cover-letter info
Add support to the status module for reading and supporting cover
letters, including comments. Plumb this through to the patchwork module.
The actual support in the latter is not yet integrated.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-24 05:26:46 +01:00
Simon Glass
1d8bb45a2a patman: Provide an option to run in single-threaded mode
Patman normally sends multiple concurrent requests to the patchwork
server, as this is faster. Provide an option to disable this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-01 20:09:03 -06:00
Simon Glass
761d34ca46 patman: Switch over to asyncio
Now that all the pieces are in place, switch over from using an executor
to using asyncio.

While we are here, import defaultdict to avoid needing to specify its
module.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-01 20:09:03 -06:00
Simon Glass
4967b8e7c8 patman: Add more information to Patch
The cover letter has some information on each patch, so allow this to be
stored in the Patch object.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-01 20:09:03 -06:00
Simon Glass
f64e147d83 patman: Adjust how the fake request() function is provided
Instead of passing the URL and function to each call, put the fake
into the Patchwork object instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-01 20:09:03 -06:00
Simon Glass
ffb56ff956 patman: Add reading of series and patch status
Expand the patchwork module so that it can match the current
requirements of the 'patman status' command, i.e. reading the state of a
series and the patches associated with it.

Since the format of each patchwork response is a little tricky to
understand, add examples in comments at the top of each function.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-01 20:09:03 -06:00
Simon Glass
5df55c4a06 patman: Move Patch and Review to patchwork module
These relate to information obtained from the patchwork server, so move
their definition into the new patchwork module.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-01 20:09:03 -06:00
Simon Glass
ca29eb5390 patman: Create a module for handling patchwork
At present the patchwork implementation is very simple, just consisting
of a function which calls the REST API.

We want to create a fake patchwork for use in tests. So start a new
module to encapsulate communication with the patchwork server.

Use asyncio since it is easier to handle lots of concurrent requests
from different parts of the code.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-01 20:09:03 -06:00