Patman is a useful tool for creating, checking sending out patches. It automates the creation of patches, simplifies checking them and handles cover letters and change logs.
However once patches are sent and reviewers add Reviewed-by tags, etc., these must be manually added into the commits using git before the next version of the series is sent. Also, the only way to look at patches is in the web interface. It would be nice if patman could talk to Patchwork and collect the review tags itself. Even better if it could show the review comments in a command-line view patch-by-patch to speed up addressing comments. This series adds these features to patman, talking directly to the Patchwork REST API. While pwclient seems like it could handle some of this, or at least provide a library to patman, the documentation[1] doesn't really explain what the commands do and it doesn't seem to work with the current Patchwork (e.g. pwclient git-am requires a patch number but Patchwork seems to use an ID now). With these changes it is possible to type 'patman status' and see a list of new review tags. It is also possible to create a new branch with those tags and list out the review comments as small snippets on the command line. I have been using these features for a little while and they seem useful, so herewith a series. Some of the patches here clean up style problems in patman and other minor problems. See the last four patches for the main changes. You can find it at u-boot-dm/patman-working[2] [1] https://patchwork.readthedocs.io/projects/pwclient/en/latest/usage/ [2] https://gitlab.denx.de/u-boot/custodians/u-boot-dm/-/tree/patman-working Changes in v3: - Rename GetMetaData() function to snake case - Fix incorrect commenting on a line in prepare_patches() - Allow tags to be inserted in the middle of the commit message Changes in v2: - Adjust the algorithm to handle patch/commit mismatch - Correct Python style problems - Use REST API instead of web pages - Many changes to the whole series, including new patches - Use of REST API instead of the web site Simon Glass (29): patman: Correct operation of -n azure/gitLab/travis: Add pygit2 as a dependency for tests patman: Update how tests are run patman: Fix whitespace errors in func_test patman: Use capture_sys_output() consistently patman: Fix remaining pylint3 warnings in func_test patman: Allow linking a series with patchwork patman: Fix indenting in patchstream patman: Fix constant style in patchstream patman: Rename functions in patchstream patman: Rename variables in patchstream patman: Drop unused args in patchstream patman: Fix up argument/return docs in patchstream patman: Move warning collection to a function patman: Attach warnings to individual patches patman: Convert 'Series-xxx' tag errors into warnings patman: Drop unused signoff member patman: Add a test for PatchStream tags patman: Add some tests for warnings patman: Convert testBasic() to use an interator patman: Fix spelling of plural for warning patman: Don't ignore lines starting with hash patman: Allow showing a Commit as a string patman: Improve handling of files patman: Detect missing upstream in CountCommitsToBranch patman: Support checking for review tags in patchwork patman: Support updating a branch with review tags patman: Support parsing of review snippets patman: Support listing comments from patchwork .azure-pipelines.yml | 2 +- .gitlab-ci.yml | 2 +- .travis.yml | 1 + tools/buildman/control.py | 6 +- tools/patman/README | 110 +++- tools/patman/checkpatch.py | 18 +- tools/patman/commit.py | 5 + tools/patman/control.py | 71 ++- tools/patman/func_test.py | 983 +++++++++++++++++++++++++++++--- tools/patman/gitutil.py | 10 +- tools/patman/main.py | 42 +- tools/patman/patchstream.py | 485 +++++++++++----- tools/patman/series.py | 8 +- tools/patman/status.py | 482 ++++++++++++++++ tools/patman/terminal.py | 21 +- tools/patman/test_checkpatch.py | 6 +- 16 files changed, 1981 insertions(+), 271 deletions(-) create mode 100644 tools/patman/status.py -- 2.29.1.341.ge80a0c044ae-goog