1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 14:00:56 +01:00

Run a commit discovery daemon only once

Summary:
Discover commits then return; useful when initializing new repositories
in unit tests.

By which I mean "when initializing a new repository in my unit test that
I'm working on".

Test Plan: Using this in a PhabricatorTestCase.

Reviewers: epriestley, aran

Reviewed By: epriestley

CC: aran, edward, epriestley

Differential Revision: 948
This commit is contained in:
Edward Speyer 2011-09-19 17:57:09 -07:00
parent 9d4793b27f
commit 6737ae4828

View file

@ -36,6 +36,11 @@ abstract class PhabricatorRepositoryCommitDiscoveryDaemon
}
}
final public function runOnce() {
$this->repository = $this->loadRepository();
$this->discoverCommits();
}
protected function isKnownCommit($target) {
if (isset($this->commitCache[$target])) {
return true;