[WIP] Add support for multi-commit review requests.
Review Request #6618 — Created Nov. 21, 2014 and discarded
Add the a
diffviewer.Commitmodel. EachCommitbelongs to a
DiffSet(which may have many commits) and may have manyFileDiffs.
However, an old-fashioned review request (of squashed changes) will
not have anyCommits associated with it.Add a foreign key on the
FileDiffmodel which links it to a
Commit. EveryFileDiffstill corresponds to aDiffSet, but they
now can optionally correspond to aCommit.Add a
RelationCounterFieldon theDiffSetmodel to keep track of
the number ofCommitscorresponding to theDiffSet. This way, the
DiffSetcan easily be checked if it is a multi-commit review request
or not.Add evolution (
new_commit_fields.py) for new fields onFileDiff
andDiffSet.TODO:
- Add an API endpoint so that multiple commits can be attached a review
request
| Description | From | Last Updated |
|---|---|---|
|
Col: 38 W292 no newline at end of file |
|
|
|
Two blank lines. |
|
|
|
We use whatever_count instead of num_whatevers for all other counter fields, so we should stick with that for this one. |
|
|
|
We usually swap this around to be named like COMMIT_TYPE_MERGE and COMMIT_TYPE_CHANGE. |
|
|
|
There are some crucial differences between how TEXT (TextField) and VARCHAR(x) (CharField(max_length=x)) columns are stored. If we ever want to … |
|
|
|
This should take a choices= argument that limits it to one of the commit types. It helps with validation and … |
|
|
|
Col: 1 E302 expected 2 blank lines, found 1 |
|
- Change Summary:
-
Formatting.
- Commit:
-
f3a0c3cd25c2a0ab2ff8a3127237dab1ed49ce210d1b6b485a308a03ae25d6874f50522165407aa2
-
Tool: PEP8 Style Checker Processed Files: reviewboard/diffviewer/models.py reviewboard/diffviewer/evolutions/add_commit_fields.py reviewboard/diffviewer/evolutions/__init__.py Tool: Pyflakes Processed Files: reviewboard/diffviewer/models.py reviewboard/diffviewer/evolutions/add_commit_fields.py reviewboard/diffviewer/evolutions/__init__.py
-
-
-
We use
whatever_countinstead ofnum_whateversfor all other counter fields, so we should stick with that for this one. -
-
There are some crucial differences between how
TEXT(TextField) andVARCHAR(x)(CharField(max_length=x)) columns are stored. If we ever want to do any queries on authors or committers (I can see us wanting to do that), then we're going to want to use aCharFieldfor performance.I think it's safe to say that an author or committer will always be a reasonable size (< 256 chars, probably < 128 chars). Given that, I think we can use a
CharFieldhere. -
This should take a
choices=argument that limits it to one of the commit types. It helps with validation and display in the admin UI.
- Change Summary:
-
Depend on
r/6642. Evolution cleanly applies. Fix Christian's issues. - Description:
-
Add the a
diffviewer.Commitmodel. EachCommitbelongs to aDiffSet(which may have many commits) and may have manyFileDiffs.However, an old-fashioned review request (of squashed changes) will not have any Commits associated with it.Add a foreign key on the
FileDiffmodel which links it to aCommit. EveryFileDiffstill corresponds to aDiffSet, but theynow can optionally correspond to a Commit.Add a
RelationCounterFieldon theDiffSetmodel to keep track ofthe number of Commitscorresponding to theDiffSet. This way, theDiffSetcan easily be checked if it is a multi-commit review requestor not. Add evolution (
new_commit_fields.py) for new fields onFileDiffand DiffSet.- NB: The evolution does not currently cleanly apply because of a bug in
- django-evolution. - TODO:
- Add an API endpoint so that multiple commits can be attached a review request - Depends On:
-
- Commit:
0d1b6b485a308a03ae25d6874f50522165407aa2f8cfd3d0026c569ab262820b9b888fe5c1d5634e
-
Tool: Pyflakes Processed Files: reviewboard/diffviewer/models.py reviewboard/diffviewer/evolutions/add_commit_fields.py reviewboard/diffviewer/evolutions/__init__.py Tool: PEP8 Style Checker Processed Files: reviewboard/diffviewer/models.py reviewboard/diffviewer/evolutions/add_commit_fields.py reviewboard/diffviewer/evolutions/__init__.py
- Change Summary:
-
Fix model
- Commit:
-
f8cfd3d0026c569ab262820b9b888fe5c1d5634ef961b3b22921e2baa84bd6cc30e6234dc8651556
-
Tool: Pyflakes Processed Files: reviewboard/diffviewer/models.py reviewboard/diffviewer/evolutions/add_commit_fields.py reviewboard/diffviewer/evolutions/__init__.py Tool: PEP8 Style Checker Processed Files: reviewboard/diffviewer/models.py reviewboard/diffviewer/evolutions/add_commit_fields.py reviewboard/diffviewer/evolutions/__init__.py
- Change Summary:
-
Add commit_ordinal field to allow commits to be ordered within a DiffSet
- Commit:
-
f961b3b22921e2baa84bd6cc30e6234dc8651556785dc534b222aa080108ea49fdb3ba5baa847228
-
Tool: Pyflakes Processed Files: reviewboard/diffviewer/models.py reviewboard/diffviewer/evolutions/add_commit_fields.py reviewboard/diffviewer/evolutions/__init__.py Tool: PEP8 Style Checker Processed Files: reviewboard/diffviewer/models.py reviewboard/diffviewer/evolutions/add_commit_fields.py reviewboard/diffviewer/evolutions/__init__.py
- Change Summary:
-
Work on commit endpoint
- Commit:
-
785dc534b222aa080108ea49fdb3ba5baa8472288dd0fb9b6771704d7ea82b01b4dfd512bae67c4b
-
Tool: Pyflakes Processed Files: reviewboard/diffviewer/models.py reviewboard/diffviewer/evolutions/add_commit_fields.py reviewboard/webapi/resources/__init__.py reviewboard/diffviewer/evolutions/__init__.py reviewboard/webapi/resources/commit.py Tool: PEP8 Style Checker Processed Files: reviewboard/diffviewer/models.py reviewboard/diffviewer/evolutions/add_commit_fields.py reviewboard/webapi/resources/__init__.py reviewboard/diffviewer/evolutions/__init__.py reviewboard/webapi/resources/commit.py -
Tool: Pyflakes Processed Files: reviewboard/diffviewer/models.py reviewboard/diffviewer/evolutions/add_commit_fields.py reviewboard/diffviewer/evolutions/__init__.py Tool: PEP8 Style Checker Processed Files: reviewboard/diffviewer/models.py reviewboard/diffviewer/evolutions/add_commit_fields.py reviewboard/diffviewer/evolutions/__init__.py