• 
      

    Modernize rbt patch and rework it for full DVCS support.

    Review Request #10818 — Created Jan. 6, 2020 and submitted

    Information

    RBTools
    release-2.0.x
    592bc45...

    Reviewers

    rbt patch now has full support for patching, outputting, reverting,
    and committing single-diff review requests and multi-commit review
    requests. When working with Review Board 3.0 or lower, it behaves as it
    did before, applying the patch either locally or as a commit based on
    the review request's summary and author information.

    When working with a multi-commit review request, patches can be applied
    sequentially (the default) or squashed, which only makes a difference
    when committing. Subsets of commits can also be applied. The ordering of
    those commits on the review request are always respected.

    Reverting will always apply in the reverse order, ensuring that they're
    backed out correctly. When committing the reverted patches, each commit
    message will begin with [Reverted].

    As part of a modernization effort, all output is now done through
    exceptions or logging statements, and the text is localized. While we're
    not set up for localization today, the patch code does have a lot of
    messages that differ depending on the number of patches, so it made
    sense to begin using this here. There are plans to move to a better
    approach for command-driven output, which would replace some of this
    logging code, but that will be done separately.

    Tested this months ago when the code was originally written. This needs
    some additional real-world testing, and is being put up for review to
    help with that effort.

    Description From Last Updated

    "patch and its" -> "patches and their"

    daviddavid

    This comment isn't super grammatical.

    daviddavid

    This comment should be updated.

    daviddavid

    "we'll be committed" -> "we'll be committing"

    daviddavid
    david
    1. Code looks good. Some comments on documentation:

    2. rbtools/commands/patch.py (Diff revision 1)
       
       
      Show all issues

      "patch and its" -> "patches and their"

    3. rbtools/commands/patch.py (Diff revision 1)
       
       
      Show all issues

      This comment isn't super grammatical.

    4. rbtools/commands/patch.py (Diff revision 1)
       
       
      Show all issues

      This comment should be updated.

    5. rbtools/commands/patch.py (Diff revision 1)
       
       
      Show all issues

      "we'll be committed" -> "we'll be committing"

    6. 
        
    chipx86
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-2.0.x (dda9fa4)