• 
      

    Allow repository names to be 255 characters long

    Review Request #10153 — Created Sept. 21, 2018 and submitted

    Information

    Review Board
    release-3.0.x
    ad41851...

    Reviewers

    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 …

    daviddavid

    Can you put the bug number into the "Bugs" field?

    daviddavid

    Please wrap your description to 72 columns.

    daviddavid

    Can you rewrite your summary to be in the imperitive mood, i.e., as if it were a command or an …

    brenniebrennie

    The command in your testing done (... evolve --execute) doesnt need to have different code blocks on each line. e.g. …

    brenniebrennie

    Because this is a new evolution, it should go at the end of the sequence list rather than in the …

    daviddavid

    E501 line too long (275 > 79 characters)

    reviewbotreviewbot

    W391 blank line at end of file

    reviewbotreviewbot

    W291 trailing whitespace

    reviewbotreviewbot

    W291 trailing whitespace

    reviewbotreviewbot

    W291 trailing whitespace

    reviewbotreviewbot

    W292 no newline at end of file

    reviewbotreviewbot

    Python strings have this cool feature that you can split them over multiple lines like so: my_str = ( 'this …

    brenniebrennie

    Can you change this to Testing Repository.name with 255 characters? Having the specific thing being tested first is helpful for …

    chipx86chipx86
    david
    1. 
        
    2. Show all issues

      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.

    3. Show all issues

      Because this is a new evolution, it should go at the end of the sequence list rather than in the middle.

    4. 
        
    praiseA
    praiseA
    praiseA
    david
    1. Two tiny issues left relating to the review request info:

    2. Show all issues

      Can you put the bug number into the "Bugs" field?

      1. I put that yesterday. Does it not show for you?

    3. Show all issues

      Please wrap your description to 72 columns.

    4. 
        
    praiseA
    praiseA
    Review request changed
    Commit:
    ee4ce125f8c72c5683788812b3a2c999ef2121aa
    d3bfc897e5b12312f26cb829603dd1f13c68fedf

    Checks run (1 failed, 1 succeeded)

    flake8 failed.
    JSHint passed.

    flake8

    praiseA
    praiseA
    Review request changed
    Commit:
    d3bfc897e5b12312f26cb829603dd1f13c68fedf
    f69234f192e389ab4965a451c5bb7a51b50d42f7

    Checks run (1 failed, 1 succeeded)

    flake8 failed.
    JSHint passed.

    flake8

    praiseA
    brennie
    1. 
        
    2. Show all issues

      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")

    3. Show all issues

      The command in your testing done (... evolve --execute) doesnt need to have different code blocks on each line.
      e.g.

      The code block can `begin on one line
      and end on the next.`
      
    4. reviewboard/scmtools/tests/test_repository.py (Diff revision 6)
       
       
       
       
       
       
       
       
       
      Show all issues

      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).

    5. 
        
    praiseA
    brennie
    1. Ship It!
    2. 
        
    chipx86
    1. Looks great!

    2. Show all issues

      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.

    3. 
        
    praiseA
    mike_conley
    1. This looks great! Thanks!

    2. 
        
    david
    1. Ship It!
    2. 
        
    praiseA
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-3.0.x (c1a2766)