Use SCMTool IDs for tool selection in the repository form.

Review Request #10805 — Created Nov. 21, 2019 and updated

chipx86
Review Board
release-3.0.x
3db5f4b...
reviewboard

The Tool field for repositories historically has used database IDs to
represent each possible choice, which would then be used to look up the
appropriate database entry. Long-term, we know that we want to move away
from database entries and to a registry of SCMTool IDs. Short-term, we
will have a need for mapping choices to SCMTool-specific information,
which database IDs aren't going to be very suitable for.

This change moves the field and tracking to use SCMTool IDs exclusively,
and entirely away from database IDs. This does require maintaining a map
of SCMTool IDs to Tool models, which we'll be replacing down the road
with a registry.

Unit tests passed.

Tested loading and saving multiple repositories with different SCMTools,
with and without hosting services.

Inspected the HTML to make sure all the proper state was there.

Switched values for the Tool field to make sure that fields updated
correctly.

Description From Last Updated

E265 block comment should start with '# '

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Checks run (2 succeeded)

flake8 passed.
JSHint passed.
david
  1. Ship It!
  2. 
      
Loading...