Return binary flag when with filediffs and allow querying by the binary flag.
Review Request #10729 — Created Sept. 26, 2019 and updated
RB Tools required getting the binary status of each filediff so it
could determine which files need an accompanying file upload. This
allows RB Tools to query the backend for the filediffs for a diff. The
filediffs returned will contain the binart flag. An optional flag is
also provide for querying only for filediffs that have the binary flag
set to either true or false.
Included unit test for these changes.
Summary | ID |
---|---|
2cb39d374b5799e821a07e734ed6a614904bf64c | |
4b1e111fed1df7c8cd8ae27b89c8f7b1f9dec0b5 | |
9ae87d7ca6a8c5bad33d32df78baae77f8abde4b | |
2371a6a041e2ca4c3c9147b85eac56039872fea2 | |
46a4cabcc5cf318a5fefe46ebb5b98b5789628b2 | |
9da99cd37e3d89ecd9ea02bd65a4ff646ae5a9c2 | |
90b4f57a8285cd9be9d847410144002529972775 | |
3047b4be526f39ded08bf118b14930d5252f3b79 | |
bd8db61615a5ce70d82438900eb6dff63a7c105d | |
0cea0271d77078b30ee22e45bbb1356d111b7dbb |
Description | From | Last Updated |
---|---|---|
Typo in summary: "amd" |
|
|
This is including some strange delete/re-add of some changes. Can you look into what happened, try to revert those? |
|
|
Can you flesh out the description and testing done? See https://www.notion.so/reviewboard/Writing-Good-Change-Descriptions-10529e7c207743fa8ca90153d4b21fea |
|
|
Can you add unit tests for both the query parameter and the new field in the output? |
|
|
Let's keep these in alphabetical order |
|
|
This needs a period at the end. |
|
|
Please use single quotes rather than double. |
|
|
This can be simplified down to: qs = qs.filter(binary=(param == 'true')) |
|
|
"is binary" or "is a binary file". |
|
|
This should be updated to talk about the new binary query parameter. |
|
|
Instead of doing this, you can add a binary=False keyword arugment to get_queryset() and the API field will do the … |
|
|
E501 line too long (80 > 79 characters) |
![]() |
|
E501 line too long (80 > 79 characters) |
![]() |
|
E501 line too long (80 > 79 characters) |
![]() |
|
E501 line too long (80 > 79 characters) |
![]() |
|
E501 line too long (86 > 79 characters) |
![]() |
|
E501 line too long (80 > 79 characters) |
![]() |
|
E501 line too long (83 > 79 characters) |
![]() |
|
E501 line too long (80 > 79 characters) |
![]() |
-
-
Can you flesh out the description and testing done? See https://www.notion.so/reviewboard/Writing-Good-Change-Descriptions-10529e7c207743fa8ca90153d4b21fea
-
-
-
reviewboard/webapi/resources/filediff.py (Diff revision 1) Please use single quotes rather than double.
-
reviewboard/webapi/resources/filediff.py (Diff revision 1) This can be simplified down to:
qs = qs.filter(binary=(param == 'true'))
Commits: |
|
|||||||
---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+20 -2) |
Checks run (2 succeeded)
Description: |
|
---|
-
-
-
-
reviewboard/webapi/resources/filediff.py (Diff revision 2) Instead of doing this, you can add a
binary=False
keyword arugment toget_queryset()
and the API field will do the rest.
-
-
-
reviewboard/webapi/resources/filediff.py (Diff revision 2) This should be updated to talk about the new
binary
query parameter.
Summary: |
|
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Commits: |
|
|||||||||
Diff: |
Revision 3 (+5911 -5893) |
Checks run (1 failed, 1 succeeded)
flake8
Commits: |
|
|||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 4 (+5913 -5895) |
Checks run (1 failed, 1 succeeded)
flake8
Commits: |
|
|||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 5 (+13587 -13451) |
Checks run (1 failed, 1 succeeded)
flake8
Commits: |
|
|||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 6 (+13609 -13455) |
Checks run (1 failed, 1 succeeded)
flake8
Commits: |
|
|||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 7 (+13614 -13458) |
Checks run (1 failed, 1 succeeded)
flake8
Commits: |
|
|||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 8 (+13618 -13460) |
Checks run (1 failed, 1 succeeded)
flake8
Description: |
|
|||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Testing Done: |
|