• 
      

    Clean up and improve upon the rbt patch JSON output.

    Review Request #12173 — Created March 17, 2022 and submitted — Latest diff uploaded

    Information

    RBTools
    master

    Reviewers

    The rbt patch --json output 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_num will now be set to the
    patch number. This can help with debugging the application of multiple
    patches.

    The total number of patches is now recorded in total_patches, rather
    than n_patches.

    review_request has been renamed to review_request_id, and
    review_request_url has been added. review_request_id is now
    an integer, rather than a string.

    If the working directory is clean, we now warn, rather than erroring
    out. Previously, the error would cause status to be failed, even if
    the patch was successful. Reducing this to a warning avoids this
    problem.

    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.

    Commits

    Files