Add support to marking commits as UNREACHABLE for Mercurial
When previously known commits have been destroyed in a Mercurial repository, Phabricator does not end up marking the commits as unreachable. This results in daemon tasks which continuously fail and retry.
This updates PhabricatorRepositoryDiscoveryEngine and PhabricatorManagementRepositoryMarkReachableWorkflow to include support of marking commits as unreachable for Mercurial repositories.
The PhabricatorMercurialGraphStream also needed updated to support a stream with no starting commit.
- I set up a hosted Mercurial repository.
- I removed the head commit from the on-disk repository state.
- I attempted to load the repository page and saw an exception due to a missing commit.
- I went to /manage for the repository and scheduled an update of the repository.
- After an updated performed, I went to the repository main page and saw there was no exception and the history view properly did not have the commit I had removed.
- I checked the phd logs and verified there were no exceptions related to the repository.
- I ran the ./bin/repository mark-reachable command on the Mercurial repository and it reported that it marked the commit as unreachable.
- I pushed the same commit back upstream and verified that the commit was found and displayed in the history view of the repository page and mark-unreachable did not identify it as being unreachable.
Reviewers: Blessed Reviewers, epriestley
Reviewed By: Blessed Reviewers, epriestley
Subscribers: Korvin, epriestley
Maniphest Tasks: T13634
Differential Revision: https://secure.phabricator.com/D21715