[WIP] Add support for multi-commit review requests.
Review Request #6618 — Created Nov. 21, 2014 and discarded
Information | |
---|---|
brennie | |
Review Board | |
master | |
|
|
Reviewers | |
reviewboard, students | |
Add the a
diffviewer.Commit
model. EachCommit
belongs to a
DiffSet
(which may have many commits) and may have manyFileDiff
s.
However, an old-fashioned review request (of squashed changes) will
not have anyCommit
s associated with it.Add a foreign key on the
FileDiff
model which links it to a
Commit
. EveryFileDiff
still corresponds to aDiffSet
, but they
now can optionally correspond to aCommit
.Add a
RelationCounterField
on theDiffSet
model to keep track of
the number ofCommits
corresponding to theDiffSet
. This way, the
DiffSet
can 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: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+48 -1) |

-
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
-
-
-
reviewboard/diffviewer/models.py (Diff revision 2) We use
whatever_count
instead ofnum_whatevers
for all other counter fields, so we should stick with that for this one. -
reviewboard/diffviewer/models.py (Diff revision 2) We usually swap this around to be named like
COMMIT_TYPE_MERGE
andCOMMIT_TYPE_CHANGE
. -
reviewboard/diffviewer/models.py (Diff revision 2) 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 aCharField
for 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
CharField
here. -
reviewboard/diffviewer/models.py (Diff revision 2) 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: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Depends On: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Commit: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Diff: |
Revision 3 (+54 -1) |

-
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: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 4 (+54 -1) |

-
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: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 5 (+60 -1) |

-
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: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 6 (+92 -3) |

-
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
-
reviewboard/webapi/resources/commit.py (Diff revision 6) Col: 1 E302 expected 2 blank lines, found 1