Fix switching to Custom repositories and missing hosting services.

Review Request #4762 — Created Oct. 16, 2013 and updated

Information

zav
Review Board
26ce4cf...

Reviewers

When switching the hosting service of a repository from a service to
Custom, the repository would stay on the hosting service. This was due
to a repository still being associated with a HostingServiceAccount. We
now set that to None when switching.

There was also an issue loading the administration page for repositories
when a hosting service was missing (due to an extension not being
enabled). If a repository had a hosting service account, it was assumed
that it could load that account, and that would fail, breaking the
listing of repositories. We're now a little more careful in this
particular code path.