• 
      

    Preserve custom repository extra data when saving the repo form.

    Review Request #10814 — Created Dec. 28, 2019 and submitted — Latest diff uploaded

    Information

    Review Board
    release-3.0.x
    18fc249...

    Reviewers

    The repository form used to fully wipe the Repository.extra_data
    field, which meant that any custom data would be gone, including any set
    within the Internal State section of the form. That really meant that,
    unlike most other objects, this extra_data was useless for storing
    custom information.

    This change improves this greatly by preserving any custom content in
    this field. We no longer wipe the field completely, but rather only wipe
    keys that correspond to the SCMTool or hosting service previously used
    for the repository, or information relevant to the bug tracker, leaving
    all else behind.

    It is important to note that keys that start with bug_tracker,
    SCMTool, or hosting service prefix are all likely to be removed when
    saving the form, so custom keys should not use those prefixes.

    Unit tests pass.

    Saving several repositories, changing hosting services and SCMTools
    and custom keys. Verified the stored extra_data appeared correct
    in all cases.