1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-07 20:38:32 +01:00
phorge-phorge/src/applications/repository/daemon
Christopher Speck 09c3c7d879 Add support to marking commits as UNREACHABLE for Mercurial
Summary:
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.

Refs T13634

Test Plan:
1. I set up a hosted Mercurial repository.
2. I removed the head commit from the on-disk repository state.
3. I attempted to load the repository page and saw an exception due to a missing commit.
4. I went to `/manage` for the repository and scheduled an update of the repository.
5. 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.
6. I checked the phd logs and verified there were no exceptions related to the repository.
7. I ran the `./bin/repository mark-reachable` command on the Mercurial repository and it reported that it marked the commit as unreachable.
8. 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
2021-09-04 19:05:08 -04:00
..
PhabricatorGitGraphStream.php Further correct and disambigutate ref selectors passed to Git on the CLI 2021-01-20 12:07:14 -08:00
PhabricatorMercurialGraphStream.php Add support to marking commits as UNREACHABLE for Mercurial 2021-09-04 19:05:08 -04:00
PhabricatorRepositoryGraphStream.php Move Git discovery into DiscoveryEngine 2014-01-17 11:48:53 -08:00
PhabricatorRepositoryPullLocalDaemon.php Update some Phabricator behaviors for changes to Futures 2020-04-03 12:28:16 -07:00
PhabricatorRepositoryPullLocalDaemonModule.php Allow the PullLocal daemon to hibernate, and wake it when repositories need an update 2017-03-23 10:52:28 -07:00