Recent versions of Python complain about the license being in the
classifiers part. Use a 'license' property instead.
Signed-off-by: Simon Glass <sjg@chromium.org>
The pager makes it easier to review large number of comments. Add it
around the output.
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>
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>
When comments are shown below patches it can be hard to see the patch
subject. Use yellow instead of blue, since it stands out better.
Pass the colour object into show_responses() rather than creating a new
one, since that is tidier.
Signed-off-by: Simon Glass <sjg@chromium.org>
This test uses the find_new_responses() function which combines
accessing patchwork and processing the results.
Since the test is aimed at testing processing, adjust it to call
process_reviews() instead.
Signed-off-by: Simon Glass <sjg@chromium.org>
This function does patchwork calls and then processes the results. Move
the processing out so we can (later) test it separately.
Signed-off-by: Simon Glass <sjg@chromium.org>
This function has three phases:
- collecting things from patchwork
- doing some processing
- showing the results to the user / creating a branch
Refactor into two functions so we can eventually have the patchwork part
fully separated out.
Signed-off-by: Simon Glass <sjg@chromium.org>
This function actually shows the status and does some other things.
Rename it to better reflect its purpose.
Signed-off-by: Simon Glass <sjg@chromium.org>
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>
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>
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>
The control module includes much of the implementation patman's
features. As a first step to separating this out, move the sending code
into its own file.
Provide support for the -X flag, which preserves the working directory
used by tests. Also support -N which shows captured output for tests.
Finally, allow selection of a particular test to run.
Signed-off-by: Simon Glass <sjg@chromium.org>
Much of this was written before the other Python tools and they have
evolved. Make a few updates:
- Rather than calling sys.exit(), return the exit code from the control
module and use it in __main__
- Set up tout as it is used in some places
- We now have quite a few tests, so update the comment about that
Signed-off-by: Simon Glass <sjg@chromium.org>
When running tests there is no situation in which we want ANSI output as
it makes it much harder to see what is going on in logs, tests, etc.
Provide a way to disable this.
Signed-off-by: Simon Glass <sjg@chromium.org>
There is no point in spinning up multiple processes if there is only one
test to execute. Add a check for this.
Signed-off-by: Simon Glass <sjg@chromium.org>
It is useful to have a pager when outputting a lot of text. Add support
for this in the terminal library, making use of a context manager.
Also add a function to indicate whether the output device is a terminal
or not, while we are here, to avoid duplicating this code.
Signed-off-by: Simon Glass <sjg@chromium.org>
The current implemention does not handle background colours very well
at present.
- It outputs an incorrect code in some cases, leading to wrong colours
- Some functions lack a control for the background
Tidy this up so that background colours can be used in more places.
Signed-off-by: Simon Glass <sjg@chromium.org>
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
"Operating System :: OS Independent",
]
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.