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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user