Enhance the diff file attachment resource a bit.
Review Request #13603 — Created March 4, 2024 and submitted
This change makes two enhancements to the diff file attachment resource.
First, a new source_file argument allows uploading a file for the source
version of the FileDiff. In most cases we can allow the server to fetch
it from the repository, but in the case where there's a parent diff, the
uploading client needs to provide both the source and modified versions.Second, I did run into a case where I successfully uploaded two files
for the same FileDiff, which caused errors later on. A new API error has
been added for this case.
- Ran unit tests.
- Posted binary file changes that used a parent diff and successfully
uploaded both the source and modified versions.
Summary | ID |
---|---|
c758222eb441e6b6c36473de0e0e547aaaa72f97 |
Description | From | Last Updated |
---|---|---|
Can we make this keyword-only? (Ideally both, but at least this one.) |
chipx86 | |
This is missing a return value. |
chipx86 | |
Should state that these are now keyword-only. |
chipx86 | |
We should add version info here and in the method's docstring. |
chipx86 | |
This is missing version info. |
chipx86 | |
This is set above as modified. |
chipx86 |
-
-
reviewboard/attachments/forms.py (Diff revision 1) Can we make this keyword-only? (Ideally both, but at least this one.)
-
-
reviewboard/attachments/forms.py (Diff revision 1) We should add version info here and in the method's docstring.
-
reviewboard/webapi/resources/diff_file_attachment.py (Diff revision 1) This is missing version info.
-
reviewboard/webapi/resources/diff_file_attachment.py (Diff revision 1) This is set above as
modified
.
Commits: |
|
|||||||
---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+238 -14) |
Checks run (2 succeeded)
-
-
reviewboard/attachments/forms.py (Diff revisions 1 - 2) Should state that these are now keyword-only.