Preserve custom repository extra data when saving the repo form.
Review Request #10814 — Created Dec. 27, 2019 and submitted
The repository form used to fully wipe the
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_datawas useless for storing
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
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
in all cases.