Post review requests with history when supported
Review Request #9911 — Created May 4, 2018 and submitted
When the Review Board server has the
review_request.supports_history
capability, we will default to posting with history. Using history can
be forced with the new-H/--with-history
flag, which will cause an
error if the server does not support it.Traditional-style squashed review requests are still supported: they can
be posted with-S/--squash-history
.Review requests that were created with history will always be updated
with history and review requests not created with history will,
likewise, never be updated with history. Since review requests in
Review Board exist in one state or the other, attempting to post would
result in an error, so we do not let users attempt such posts.If the server does not support history, the
-S
and-H
options are
ignored.
Posted this review request.
Posted a review request with multiple commits to my devserver.
Description | From | Last Updated |
---|---|---|
E302 expected 2 blank lines, found 1 |
reviewbot | |
F821 undefined name 'query_args' |
reviewbot | |
F841 local variable 'query_args' is assigned to but never used |
reviewbot | |
Docstring? |
david | |
XXX is meaningless without some kind of detail. Why is this comment here? |
david | |
typo: Attrirbutes |
david | |
commandline -> command line |
david | |
Creates or updates, and uploads -> Create or update, and upload |
david | |
Commandline -> Command line |
david | |
It was already like this, but commandline -> command line. |
david | |
Can we wrap the arg value in parens? |
david | |
commandline -> command line |
david | |
commandline -> command line |
david | |
Wrapping is a little weird here. |
david | |
E501 line too long (81 > 79 characters) |
reviewbot | |
Can we call this supports_commit_history and the method below get_commit_history? Helps to namespace them so we're not having confusion down … |
chipx86 | |
It'd be nice to document what's in here/where it comes from. |
chipx86 | |
Byte string prefix? |
chipx86 | |
Can we simplify the language and say "cannot both be provided" instead of "mutually exclusive?" The latter's going to be … |
chipx86 | |
These would be nice to implement though. In fact, having history enabled by default and not allowing filtering is going … |
chipx86 | |
I don't really like doing this sort of thing. It'd be much nicer to have some proper checks with proper … |
chipx86 | |
Mind changing the wording here and below to properly say "review request URL" instead of "review URL?" |
chipx86 | |
This was correct before. |
chipx86 | |
Typo: "hvae" -> "have". |
chipx86 | |
Can you call this review_request_id and review_request_url? |
chipx86 | |
Too many "the review" parts in here. |
chipx86 | |
Can we make additional_fields a list of strings? Wishing we did that with only_links and only_fields in the API calls, … |
chipx86 | |
E501 line too long (80 > 79 characters) |
reviewbot | |
E501 line too long (83 > 79 characters) |
reviewbot | |
E501 line too long (80 > 79 characters) |
reviewbot | |
F821 undefined name 'review_url' |
reviewbot | |
E203 whitespace before ',' |
reviewbot | |
E501 line too long (84 > 79 characters) |
reviewbot | |
Two blank lines. |
chipx86 | |
Alphabetical order. |
chipx86 | |
Alphabetical order. |
chipx86 | |
This should mention the conditions for NotImplementedError and the formats (or references to something) for the revisions and results. |
chipx86 | |
Let's use constants for these, to help with readability and consistency. |
chipx86 | |
These should be the same import group. |
chipx86 | |
Blank line between these. |
chipx86 | |
These can start on the raise line. |
chipx86 | |
We're repeating tests unnecessarily. How about: if server_supports_history: if review_request: with_history = review_request.created_with_history if self.options.with_history: ... else: with_history = self._should_post_with_history(...) … |
chipx86 | |
This must be logging.warning. Can you test this case? |
chipx86 | |
bool |
chipx86 | |
You can do: only_fields = [ ... ] + additional_fields |
chipx86 | |
These can be combined into one statement. |
chipx86 | |
Are we checking for emptiness, or None? If the former, we don't even need the check, as it'll be handled … |
chipx86 | |
No trailing comma on the last argument. ) should be up against the last value. |
chipx86 | |
Let's set to None in an else. |
chipx86 | |
Use +=. It's faster. |
chipx86 | |
F821 undefined name 'Noen' |
reviewbot | |
F821 undefined name 'Noen' |
reviewbot | |
We don't have these for the others, unfortunately, but can you add a #: ... doc comment for this one? |
chipx86 | |
Should _FIELD_SEP be a byte string? We split a byte string using _NUL and then try to further split using … |
chipx86 | |
This wasn't updated to be get_commit_history. Make sure the latest iteration of changes has been fully tested. |
chipx86 | |
rbtools.clients.errors.SCMError. |
chipx86 | |
Need to add with_parent_diff here. |
david | |
These seem like artificial limitations that should probably not exist |
david | |
The long command-line arg is just --include |
david | |
The long command-line arg is just --exclude |
david | |
These error messages seem highly internal. Is this really what we want to show to a user? (When might this … |
david | |
Grammar here is weird. How about "One of "diff_history" or "squashed_diff" must be provided to "Post.post_request()." |
david |
- Change Summary:
-
Flake8 fixups
- Commit:
-
795a076120a20c1954ad67a3a27087d92431a0f20d9d0eb27f39c7554a7182b47ad0bbf9be1d2485
Checks run (2 succeeded)
- Change Summary:
-
Addressed David's issues
- Commit:
-
0d9d0eb27f39c7554a7182b47ad0bbf9be1d248565b213b64b51007ce8126df404584aee1d538ba3
Checks run (2 succeeded)
- Change Summary:
-
Use TQDM to show a progress bar.
- Commit:
-
65b213b64b51007ce8126df404584aee1d538ba302cd04b60aef289049af8c39215bf1b28032178d
Checks run (2 succeeded)
- Change Summary:
-
Include parent diff for first commit.
- Commit:
-
02cd04b60aef289049af8c39215bf1b28032178dea75b0c4650d784adca7da9d4887e0d5edbc04bf
Checks run (2 succeeded)
- Change Summary:
-
Send parent diff with all commits
- Commit:
-
ea75b0c4650d784adca7da9d4887e0d5edbc04bf482266166cb32af5b32fde7cbef6ef02831b7a51
- Commit:
-
482266166cb32af5b32fde7cbef6ef02831b7a5187778e749e91f77c60adfcc0c83f57cc3a12b67a
Checks run (2 succeeded)
-
-
Can we call this
supports_commit_history
and the method belowget_commit_history
? Helps to namespace them so we're not having confusion down the road for any reason. -
-
-
Can we simplify the language and say "cannot both be provided" instead of "mutually exclusive?" The latter's going to be easier for non-English speakers.
-
These would be nice to implement though. In fact, having history enabled by default and not allowing filtering is going to break a whole lot of people. Is this a temporary restriction? What prevents us from being able to filter these?
-
I don't really like doing this sort of thing. It'd be much nicer to have some proper checks with proper errors than an assertion that a lot of people working with RBTools wrappers and such are going to be confused by if they manage to hit it.
-
Mind changing the wording here and below to properly say "review request URL" instead of "review URL?"
-
-
-
-
- Change Summary:
-
addressed Christian's issues.
- Commit:
-
87778e749e91f77c60adfcc0c83f57cc3a12b67af7d491d310797df6e4a7796a7a93251c29e446cb
- Commit:
-
f7d491d310797df6e4a7796a7a93251c29e446cb63b62cee047ad872ae47a9f0ff26fcc2dbff9da0
Checks run (2 succeeded)
- Commit:
-
63b62cee047ad872ae47a9f0ff26fcc2dbff9da0e22a7f73d7e3b0a1d8e77edf427532aa3b8e1185
Checks run (2 succeeded)
- Change Summary:
-
Fix posting with -u
- Commit:
-
e22a7f73d7e3b0a1d8e77edf427532aa3b8e11855ba26797395602ef059824ec051919b8e1697764
Checks run (2 succeeded)
-
-
-
-
-
-
-
-
We're repeating tests unnecessarily. How about:
if server_supports_history: if review_request: with_history = review_request.created_with_history if self.options.with_history: ... else: with_history = self._should_post_with_history(...) else: with_history = False
it's not as flat, so.. I dunno, tradeoffs. Throwing it out there.
-
-
-
-
-
Are we checking for emptiness, or
None
? If the former, we don't even need the check, as it'll be handled for thefor
loop. -
-
-
- Change Summary:
-
addressed Christian's issues.
- Commit:
-
5ba26797395602ef059824ec051919b8e169776402a0177b1d44fcc695b2786c89d66c9eaa2a8091
- Change Summary:
-
More feedback addressed
- Commit:
-
02a0177b1d44fcc695b2786c89d66c9eaa2a80910a35f0643ca7661532466bfb7c7bc85d8975a271
- Commit:
-
0a35f0643ca7661532466bfb7c7bc85d8975a2711a0d32a42a2742d9028bd403e3fd3a922ee4f87a
Checks run (2 succeeded)
-
-
We don't have these for the others, unfortunately, but can you add a
#: ...
doc comment for this one? -
Should
_FIELD_SEP
be a byte string? We split a byte string using_NUL
and then try to further split using this. -
This wasn't updated to be
get_commit_history
.Make sure the latest iteration of changes has been fully tested.
-
- Change Summary:
-
Addressed feedback.
- Commit:
-
1a0d32a42a2742d9028bd403e3fd3a922ee4f87adb94fcbd7e104c61dda0b105e4903ebffa2cab8b