Add support for writing patches to a file using rbt patch --write.
Review Request #11706 — Created July 6, 2021 and submitted
rbt patchcan now write patches to a local file by passing
--write=<filename>. This works just like
a file, but avoids any possibility of unwanted output being written.
This cannot be used along with
--revert. Either will exit
early with an error.
This change is based on https://reviews.reviewboard.org/r/11676/ by
André Klitzing, and was updated to remove some legacy handling of diff
content Unicode strings and to rename the option from
--print > filenameon Python 2 and 3,
with diffs containing Unicode content. In all cases, the file content
was written/outputted correctly and consistently.
Tested that neither
Thanks! It works for me... but has one issue. $ rbt patch --write=dummy https://reviews.reviewboard.org/r/11706/ ERROR: Unable to find a Review ...
Thanks! It works for me... but has one issue.
$ rbt patch --write=dummy https://reviews.reviewboard.org/r/11706/ ERROR: Unable to find a Review Board server for this source code tree.
$ rbt patch --write=dummy --server https://reviews.reviewboard.org https://reviews.reviewboard.org/r/11706/
Fixed using a review request URL as the patch source without passing
Revision 2 (+96 -34)