Log repositories with a non-existing default branch
Summary:
There are cases when repositories mirrored into Diffusion change their default branch name (e.g. from master to main) and delete the previous default branch.
In such cases, Diffusion already renders an error message in the UI.
As a Phorge admin, I am interested in getting aware of such issues so I could fix repository settings.
Thus also add an error to the error log in such cases.
Closes T16215
Test Plan:
1. Have an existing Diffusion Repository set up to mirror an external, canonical codebase with its main branch named "master"
2. Go to https://phabricator.wikimedia.org/source/somereponame/manage/branches/, click "Edit Branches", change the default branch from "master" to a non-existing branch
3. Go to https://phabricator.wikimedia.org/source/somereponame/repository/master/ and get an error message in the UI (no change) and in the logs (due to this patchset)
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16215
Differential Revision: https://we.phorge.it/D26263