Add support for writing patches to a file using rbt patch --write.
Review Request #11706 — Created July 6, 2021 and submitted
rbt patch
can 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--file
to
--write
.
Tested
--write
, and--print > filename
on Python 2 and 3,
with diffs containing Unicode content. In all cases, the file content
was written/outputted correctly and consistently.Tested that neither
--write
nor
or with--revert
.
Summary | ID |
---|---|
b46df207e34c76e1e435436f1441dd69af5f3114 |
Description | From | Last Updated |
---|---|---|
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 … |
misery |
-
-
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.
See: /r/11381/
Work-Around
$ rbt patch --write=dummy --server https://reviews.reviewboard.org https://reviews.reviewboard.org/r/11706/
- Change Summary:
-
Fixed using a review request URL as the patch source without passing
--server
. - Commits:
-
Summary ID a5620a5afc648098bbd1da8a0a63dca976642d7b b46df207e34c76e1e435436f1441dd69af5f3114 - Diff:
-
Revision 2 (+96 -34)