brennie got a fish trophy!
Add resources for interacting with DiffCommits
Review Request #9889 — Created May 2, 2018 and submitted
The
DraftDiffCommitResource
allows new commits to be uploaded to a
review request draft with history support and theDiffCommitResource
allows fetching information about created commits.
Ran unit tests.
Description | From | Last Updated |
---|---|---|
E501 line too long (81 > 79 characters) |
reviewbot | |
F401 'django.utils.six' imported but unused |
reviewbot | |
F821 undefined name 'diff_commit' |
reviewbot | |
F821 undefined name 'diff_commit' |
reviewbot | |
F821 undefined name 'diff_commit' |
reviewbot | |
F841 local variable 'review_request' is assigned to but never used |
reviewbot | |
E303 too many blank lines (2) |
reviewbot | |
E231 missing whitespace after ',' |
reviewbot | |
F841 local variable 'commit' is assigned to but never used |
reviewbot | |
E303 too many blank lines (2) |
reviewbot | |
F841 local variable 'draft' is assigned to but never used |
reviewbot | |
F841 local variable 'draft' is assigned to but never used |
reviewbot | |
F811 redefinition of unused 'test_get_links_dvcs_enabled' from line 268 |
reviewbot | |
F841 local variable 'draft' is assigned to but never used |
reviewbot | |
E302 expected 2 blank lines, found 1 |
reviewbot | |
E501 line too long (81 > 79 characters) |
reviewbot | |
F401 'django.utils.six' imported but unused |
reviewbot | |
F821 undefined name 'diff_commit' |
reviewbot | |
F821 undefined name 'diff_commit' |
reviewbot | |
F821 undefined name 'diff_commit' |
reviewbot | |
F841 local variable 'review_request' is assigned to but never used |
reviewbot | |
E303 too many blank lines (2) |
reviewbot | |
E231 missing whitespace after ',' |
reviewbot | |
F841 local variable 'commit' is assigned to but never used |
reviewbot | |
E303 too many blank lines (2) |
reviewbot | |
F841 local variable 'draft' is assigned to but never used |
reviewbot | |
F841 local variable 'draft' is assigned to but never used |
reviewbot | |
F811 redefinition of unused 'test_get_links_dvcs_enabled' from line 268 |
reviewbot | |
F841 local variable 'draft' is assigned to but never used |
reviewbot | |
E302 expected 2 blank lines, found 1 |
reviewbot | |
F401 'reviewboard.diffviewer.models.DiffSet' imported but unused |
reviewbot | |
E303 too many blank lines (2) |
reviewbot | |
This isn't in the function signature. |
chipx86 | |
Missing a docstring. |
chipx86 | |
Too many blank lines. |
chipx86 | |
The and .. or form was used in the past due to lack of the inline conditional support in earlier … |
chipx86 | |
"ID" |
chipx86 | |
We shouldn't use literals in summaries. Same below. |
chipx86 | |
You can just use ObjectDoesNotExist here. |
chipx86 | |
rsp |
chipx86 | |
"solely" |
chipx86 | |
Everything is indented 1 space in the body. |
chipx86 | |
Why can't we just tack on ?commit-id=... onto the URL? Are we dealing with dynamic content in the link that … |
chipx86 | |
Let's explicitly compare obj against None, since the former's gotten us into trouble before with valid but falsy-evaluating objects. |
chipx86 | |
Can you pass these params as keyword arguments, to help with readability? |
chipx86 | |
Trailing comma is turning this into a tuple. Same with other descriptions. |
chipx86 | |
Are we guaranteed that this is going to be compatible all the time with the args we put in? I'm … |
chipx86 | |
Can you make an explicit logger? |
chipx86 | |
Same comments as above. |
chipx86 | |
Incomplete docstring. |
chipx86 | |
Needs 2 blank lines between sections. |
chipx86 | |
Can you use a keyword argument for True? I have no idea what this is from reading this code. This … |
chipx86 | |
Too many blank lines. |
chipx86 | |
These can be combined. |
chipx86 | |
These too. |
chipx86 | |
Need tests for requesting patch content. |
chipx86 | |
Swap these. |
chipx86 | |
Blank line between these. |
chipx86 | |
E501 line too long (83 > 79 characters) |
reviewbot | |
E127 continuation line over-indented for visual indent |
reviewbot | |
F401 'reviewboard.diffviewer.models.DiffSet' imported but unused |
reviewbot | |
F841 local variable 'diffset' is assigned to but never used |
reviewbot | |
While here, can you change this to "Return" instead of "Returns?" |
chipx86 | |
Can you say "without commit history support" ? |
chipx86 | |
Can you change this to ReviewRequestDraft.publish? |
chipx86 | |
I think this can be reverted. The file isn't otherwise modified, and the blank line is there to keep the … |
chipx86 | |
No need for the else:. That will be implied given the return in the if. It'll be nice to flatten … |
chipx86 | |
Swap these so they're in alphabetical order. |
chipx86 | |
Typo: "sytem" -> "system" |
chipx86 | |
You don't need to set this. It will be 'commits', based on name. |
chipx86 | |
Should be DictFieldType. |
chipx86 | |
The type path must be updated for the new submodule. Same with any others in this change. |
chipx86 | |
Should be consistent between here and the previous function with regard to the blank line. |
chipx86 | |
Same here. |
chipx86 | |
Missing period. |
chipx86 | |
You can combine these lines and wrap at a . |
chipx86 | |
Missing period. |
chipx86 | |
Typo: "Aditional" -> "Additional" |
chipx86 | |
Can you pass these as keyword arguments? |
chipx86 | |
Typo: "curren" -> "current". |
chipx86 | |
These should be in alphabetical order. |
chipx86 | |
No newline. |
chipx86 | |
Missing a trailing comma. |
chipx86 | |
No trailing comma. |
chipx86 | |
Typo: "curren" -> "current" |
chipx86 | |
Sentence-o: "filter our the" -> "filter the" |
chipx86 | |
Missing @webapi_test_template. |
chipx86 | |
Missing @webapi_test_template. |
chipx86 | |
Alphabetical order. |
chipx86 | |
Alphabetical order. |
chipx86 | |
This should be the full type path. |
chipx86 | |
django, not djblets. |
chipx86 | |
This was here before, but can you swap these? |
chipx86 | |
Typo: "of" -> "or" |
chipx86 | |
Can we leave these to the default serialization so that these date fields are represented the same as all other … |
chipx86 | |
Typo: "specifcally" -> "specifically" |
chipx86 | |
This shouldn't be needed, since you define model_parent_key above and the default implementation just fetches that from the object. |
chipx86 | |
Maybe add "in order to post to this resource" at the end of the sentence. |
chipx86 | |
Missing trailing comma. |
chipx86 | |
Still missing @webapi_test_template. |
chipx86 | |
Still missing @webapi_test_template |
chipx86 | |
F401 'dateutil.parser.isoparse' imported but unused |
reviewbot | |
F401 'reviewboard.diffviewer.models.DiffCommit' imported but unused |
reviewbot |
- Change Summary:
-
Flake8
- Diff:
-
Revision 2 (+1675 -27)
Checks run (1 failed, 1 succeeded)
flake8
- Commit:
-
d386c5cd2618b1c382f86d6d6b93f005f3f87d74ddfec95aff77a82810d82ead65f2320f341cb952
- Diff:
-
Revision 3 (+1677 -27)
Checks run (2 succeeded)
- Change Summary:
-
Nest draft diff commit resource under draft diff.
Allow creation of empty diffs. - Commit:
-
ddfec95aff77a82810d82ead65f2320f341cb952cca60c9f7b49cf020b701c87922ab46220b48d63
- Diff:
-
Revision 4 (+1808 -69)
- Change Summary:
-
flake8 fixups
- Commit:
-
cca60c9f7b49cf020b701c87922ab46220b48d63b7d26e370530aa30d3311e6a4f8946a05c9fd1fd
- Diff:
-
Revision 5 (+1807 -69)
Checks run (2 succeeded)
- Change Summary:
-
Fix some unit test failures. Serialize Diffset.diff_commit_count.
- Commit:
-
b7d26e370530aa30d3311e6a4f8946a05c9fd1fd80dae83a097b9718f49f3c7bfb1eb0d347fefdda
- Diff:
-
Revision 6 (+1841 -69)
- Change Summary:
-
Flake8 fixups
- Commit:
-
80dae83a097b9718f49f3c7bfb1eb0d347fefdda5d84065654c896465bdc821464def60513dbcd15
- Diff:
-
Revision 7 (+1840 -69)
Checks run (2 succeeded)
- Change Summary:
-
Remove unit tests that should have been removed when resource nesting changed.
- Commit:
-
5d84065654c896465bdc821464def60513dbcd15b1b9e794fc66040f62dedc60ec403616aa3e20a0
- Diff:
-
Revision 8 (+1789 -69)
Checks run (2 succeeded)
- Change Summary:
-
Do not serialize diff_commit_count -- it is unnecessary.
- Commit:
-
b1b9e794fc66040f62dedc60ec403616aa3e20a05df8b7f7cbb2b0e3de53b010a236637e01936207
- Diff:
-
Revision 9 (+1756 -69)
Checks run (2 succeeded)
- Change Summary:
-
Fix unit test failures I thought I fixed earlier
- Commit:
-
5df8b7f7cbb2b0e3de53b010a236637e01936207469c80901ce5b33252e62b06a88da0ceccc4e8bd
- Diff:
-
Revision 10 (+1749 -69)
Checks run (2 succeeded)
-
-
-
-
-
The
and .. or
form was used in the past due to lack of the inline conditional support in earlier versions of Python. We should just use the inline form here. -
-
-
-
-
-
-
Why can't we just tack on
?commit-id=...
onto the URL? Are we dealing with dynamic content in the link that could interfere with that? -
Let's explicitly compare
obj
againstNone
, since the former's gotten us into trouble before with valid but falsy-evaluating objects. -
-
-
Are we guaranteed that this is going to be compatible all the time with the args we put in?
I'm tempted to say let's not provide the URL, but rather mention the resource we care about (maybe referencing the link name on the appropriate resource). Callers should not be hard-coding URLs anyway.
-
-
-
-
-
Can you use a keyword argument for
True
? I have no idea what this is from reading this code.This applies to all occurrences in the change.
-
-
-
-
-
-
- Change Summary:
-
Addressed issues and rebased.
- Commit:
-
469c80901ce5b33252e62b06a88da0ceccc4e8bd2b33344865ae2441d22baf9e70be12f2c75da568
- Diff:
-
Revision 11 (+1900 -69)
- Change Summary:
-
Flake8
- Commit:
-
2b33344865ae2441d22baf9e70be12f2c75da5683a8fa3d8ae80674c0571d79b29756eb3b5060136
- Diff:
-
Revision 12 (+1901 -69)
Checks run (2 succeeded)
- Change Summary:
-
Update revision after creation of empty diffset.
- Commit:
-
3a8fa3d8ae80674c0571d79b29756eb3b506013676cddc14b207db1c81ec5ba6de8061d9d2ac658a
- Diff:
-
Revision 13 (+1903 -68)
Checks run (2 succeeded)
- Change Summary:
-
Add unit tests for the last revision.
- Commit:
-
76cddc14b207db1c81ec5ba6de8061d9d2ac658add3d6d75c3489c09429e005d7eb09837a05a0e05
- Diff:
-
Revision 14 (+1928 -69)
- Change Summary:
-
Flake8
- Commit:
-
dd3d6d75c3489c09429e005d7eb09837a05a0e054b62e014f3b43ae9d3f80c43782c3a02f7b1a52c
- Diff:
-
Revision 15 (+1927 -69)
Checks run (2 succeeded)
- Change Summary:
-
Allow parent diff in subsequent commits
- Commit:
-
4b62e014f3b43ae9d3f80c43782c3a02f7b1a52cd1d3f7858022c5cfda0a5ff53f6c778a626cfda5
- Diff:
-
Revision 16 (+1966 -69)
Checks run (2 succeeded)
- Change Summary:
-
Addressed Christian's feedback.
- Commit:
-
d1d3f7858022c5cfda0a5ff53f6c778a626cfda5c0b700800a0acd74cf7f54beea88b8035e08b226
- Diff:
-
Revision 17 (+1966 -69)
Checks run (2 succeeded)
- Change Summary:
-
address feedback
- Commit:
-
c0b700800a0acd74cf7f54beea88b8035e08b226d79ea8ea8a89b776461fb1e85c7ad62246739580
- Diff:
-
Revision 18 (+1918 -69)
- Commit:
-
d79ea8ea8a89b776461fb1e85c7ad622467395803118383a3714171a43636e2f2f5f6eca52f9ef47
- Diff:
-
Revision 19 (+1916 -69)