Clean up and improve upon the rbt patch JSON output.
Review Request #12173 — Created March 17, 2022 and submitted
rbt patch --jsonoutput has had some cleanups designed to help
identify failed patches, to avoid failure on warnings, and to add
consistency with other JSON updates.
When a patch fails to apply,
failed_patch_numwill now be set to the
patch number. This can help with debugging the application of multiple
The total number of patches is now recorded in
review_requesthas been renamed to
review_request_urlhas been added.
an integer, rather than a string.
If the working directory is clean, we now warn, rather than erroring
out. Previously, the error would cause
failed, even if
the patch was successful. Reducing this to a warning avoids this
Tested applying patches and triggering the various errors. Checked to
make sure I was getting the payloads I expected in each case.
Tested with an unclean working directory. Verified I got a warning, but
it still completed successfully.