Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/query/DiffusionCommitQuery.php
Show All 9 Lines | final class DiffusionCommitQuery | ||||
private $identifiers; | private $identifiers; | ||||
private $repositoryIDs; | private $repositoryIDs; | ||||
private $repositoryPHIDs; | private $repositoryPHIDs; | ||||
private $identifierMap; | private $identifierMap; | ||||
private $responsiblePHIDs; | private $responsiblePHIDs; | ||||
private $statuses; | private $statuses; | ||||
private $packagePHIDs; | private $packagePHIDs; | ||||
private $unreachable; | private $unreachable; | ||||
private $unpublished; | private $permanent; | ||||
private $needAuditRequests; | private $needAuditRequests; | ||||
private $needAuditAuthority; | private $needAuditAuthority; | ||||
private $auditIDs; | private $auditIDs; | ||||
private $auditorPHIDs; | private $auditorPHIDs; | ||||
private $epochMin; | private $epochMin; | ||||
private $epochMax; | private $epochMax; | ||||
private $importing; | private $importing; | ||||
▲ Show 20 Lines • Show All 122 Lines • ▼ Show 20 Lines | public function withPackagePHIDs(array $package_phids) { | ||||
return $this; | return $this; | ||||
} | } | ||||
public function withUnreachable($unreachable) { | public function withUnreachable($unreachable) { | ||||
$this->unreachable = $unreachable; | $this->unreachable = $unreachable; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function withUnpublished($unpublished) { | public function withPermanent($permanent) { | ||||
$this->unpublished = $unpublished; | $this->permanent = $permanent; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function withStatuses(array $statuses) { | public function withStatuses(array $statuses) { | ||||
$this->statuses = $statuses; | $this->statuses = $statuses; | ||||
return $this; | return $this; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 687 Lines • ▼ Show 20 Lines | if ($this->unreachable !== null) { | ||||
} else { | } else { | ||||
$where[] = qsprintf( | $where[] = qsprintf( | ||||
$conn, | $conn, | ||||
'(commit.importStatus & %d) = 0', | '(commit.importStatus & %d) = 0', | ||||
PhabricatorRepositoryCommit::IMPORTED_UNREACHABLE); | PhabricatorRepositoryCommit::IMPORTED_UNREACHABLE); | ||||
} | } | ||||
} | } | ||||
if ($this->unpublished !== null) { | if ($this->permanent !== null) { | ||||
if ($this->unpublished) { | if ($this->permanent) { | ||||
$where[] = qsprintf( | $where[] = qsprintf( | ||||
$conn, | $conn, | ||||
'(commit.importStatus & %d) = 0', | '(commit.importStatus & %d) = %d', | ||||
PhabricatorRepositoryCommit::IMPORTED_CLOSEABLE); | PhabricatorRepositoryCommit::IMPORTED_PERMANENT, | ||||
PhabricatorRepositoryCommit::IMPORTED_PERMANENT); | |||||
} else { | } else { | ||||
$where[] = qsprintf( | $where[] = qsprintf( | ||||
$conn, | $conn, | ||||
'(commit.importStatus & %d) = %d', | '(commit.importStatus & %d) = 0', | ||||
PhabricatorRepositoryCommit::IMPORTED_CLOSEABLE, | PhabricatorRepositoryCommit::IMPORTED_PERMANENT); | ||||
PhabricatorRepositoryCommit::IMPORTED_CLOSEABLE); | |||||
} | } | ||||
} | } | ||||
return $where; | return $where; | ||||
} | } | ||||
protected function didFilterResults(array $filtered) { | protected function didFilterResults(array $filtered) { | ||||
if ($this->identifierMap) { | if ($this->identifierMap) { | ||||
▲ Show 20 Lines • Show All 114 Lines • Show Last 20 Lines |