Allow repository names to be 255 characters long
Review Request #10153 — Created Sept. 21, 2018 and submitted
When creating a repository, the name field previously allowed the name to
be 65 characters long. Once the name got to 65 characters, you would not
be able to type any additional characters.Now, you are allowed to specify a name that is less than or equal to 255
characters long.
- Ran
./reviewboard/manage.py evolve --execute evolve
to update
the database - Restarted my server
- Manually Tested by
- Clicked on the add button for Repositories
- Specified a name that was 255 characters long
- Clicked save
- Got no Errors
- Verified that the name shown in my list of repositories was
255 characters long
- Added a unit test to verify creating a repository name with 255
characters works, and does not produce errors
Description | From | Last Updated |
---|---|---|
We'll need the summary/description/testing done to be more fleshed out, and follow our formatting guidelines: https://www.notion.so/reviewboard/Writing-Good-Change-Descriptions-10529e7c207743fa8ca90153d4b21fea These fields get turned … |
david | |
Can you put the bug number into the "Bugs" field? |
david | |
Please wrap your description to 72 columns. |
david | |
Can you rewrite your summary to be in the imperitive mood, i.e., as if it were a command or an … |
brennie | |
The command in your testing done (... evolve --execute) doesnt need to have different code blocks on each line. e.g. … |
brennie | |
Because this is a new evolution, it should go at the end of the sequence list rather than in the … |
david | |
E501 line too long (275 > 79 characters) |
reviewbot | |
W391 blank line at end of file |
reviewbot | |
W291 trailing whitespace |
reviewbot | |
W291 trailing whitespace |
reviewbot | |
W291 trailing whitespace |
reviewbot | |
W292 no newline at end of file |
reviewbot | |
Python strings have this cool feature that you can split them over multiple lines like so: my_str = ( 'this … |
brennie | |
Can you change this to Testing Repository.name with 255 characters? Having the specific thing being tested first is helpful for … |
chipx86 |
-
-
We'll need the summary/description/testing done to be more fleshed out, and follow our formatting guidelines: https://www.notion.so/reviewboard/Writing-Good-Change-Descriptions-10529e7c207743fa8ca90153d4b21fea
These fields get turned into the commit message, and the goal is to have people be able to understand a change from them.
-
reviewboard/scmtools/evolutions/__init__.py (Diff revision 1) Because this is a new evolution, it should go at the end of the sequence list rather than in the middle.
Summary: |
|
|||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: |
|
|||||||||||||||||||||
Testing Done: |
|
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+10 -1) |
Checks run (2 succeeded)
Testing Done: |
|
---|
Testing Done: |
|
|||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Bugs: |
|
|||||||||||||||||||||||||||
Diff: |
Revision 3 (+10 -1) |
Checks run (2 succeeded)
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 4 (+18 -1) |
Checks run (1 failed, 1 succeeded)
flake8
-
reviewboard/scmtools/tests/test_repository.py (Diff revision 4) E501 line too long (275 > 79 characters)
-
Description: |
|
||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Testing Done: |
|
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 5 (+21 -1) |
Checks run (1 failed, 1 succeeded)
flake8
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 6 (+21 -1) |
Checks run (2 succeeded)
-
-
Can you rewrite your summary to be in the imperitive mood, i.e., as if it were a command or an order.
If you substitute your summary into the following sentence it should make sense:
"This patch will <summary>"
(e.g., start the summary at "Allow")
-
The command in your testing done (
... evolve --execute
) doesnt need to have differentcode blocks
on each line.
e.g.The code block can `begin on one line and end on the next.`
-
reviewboard/scmtools/tests/test_repository.py (Diff revision 6) Python strings have this cool feature that you can split them over multiple lines like so:
my_str = ( 'this is my really cool ' 'multi-line ' 'and very long ' 'string.' )
So we can format this as:
self.repository = Repository.objects.create( name='abcd' 'def' 'ghi' # ... )``` *However*, we can also generate a very long string by doing: ```python self.repository = Repository.objects.create( name='a' * 255, # ... )
which is shorter and more concise (and we know the string in question is 255 characters long without calculating it to verify the test).
Summary: |
|
||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Testing Done: |
|
||||||||||||||||||
Commit: |
|
||||||||||||||||||
Diff: |
Revision 7 (+19 -1) |
Checks run (2 succeeded)
-
Looks great!
-
reviewboard/scmtools/tests/test_repository.py (Diff revision 7) Can you change this to
Testing Repository.name with 255 characters
? Having the specific thing being tested first is helpful for matching up tests with what's being tested.The function can also just be
test_repository_name_with_255_characters
.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 8 (+19 -1) |