Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15345485
D21514.id51208.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
10 KB
Referenced Files
None
Subscribers
None
D21514.id51208.diff
View Options
diff --git a/src/applications/audit/query/PhabricatorCommitSearchEngine.php b/src/applications/audit/query/PhabricatorCommitSearchEngine.php
--- a/src/applications/audit/query/PhabricatorCommitSearchEngine.php
+++ b/src/applications/audit/query/PhabricatorCommitSearchEngine.php
@@ -54,8 +54,8 @@
$query->withUnreachable($map['unreachable']);
}
- if ($map['unpublished'] !== null) {
- $query->withUnpublished($map['unpublished']);
+ if ($map['permanent'] !== null) {
+ $query->withPermanent($map['permanent']);
}
if ($map['ancestorsOf']) {
@@ -132,15 +132,15 @@
'Find or exclude unreachable commits which are not ancestors of '.
'any branch, tag, or ref.')),
id(new PhabricatorSearchThreeStateField())
- ->setLabel(pht('Unpublished'))
- ->setKey('unpublished')
+ ->setLabel(pht('Permanent'))
+ ->setKey('permanent')
->setOptions(
pht('(Show All)'),
- pht('Show Only Unpublished Commits'),
- pht('Hide Unpublished Commits'))
+ pht('Show Only Permanent Commits'),
+ pht('Hide Permanent Commits'))
->setDescription(
pht(
- 'Find or exclude unpublished commits which are not ancestors of '.
+ 'Find or exclude permanent commits which are ancestors of '.
'any permanent branch, tag, or ref.')),
id(new PhabricatorSearchStringListField())
->setLabel(pht('Ancestors Of'))
diff --git a/src/applications/diffusion/query/DiffusionCommitQuery.php b/src/applications/diffusion/query/DiffusionCommitQuery.php
--- a/src/applications/diffusion/query/DiffusionCommitQuery.php
+++ b/src/applications/diffusion/query/DiffusionCommitQuery.php
@@ -15,7 +15,7 @@
private $statuses;
private $packagePHIDs;
private $unreachable;
- private $unpublished;
+ private $permanent;
private $needAuditRequests;
private $needAuditAuthority;
@@ -154,8 +154,8 @@
return $this;
}
- public function withUnpublished($unpublished) {
- $this->unpublished = $unpublished;
+ public function withPermanent($permanent) {
+ $this->permanent = $permanent;
return $this;
}
@@ -859,18 +859,18 @@
}
}
- if ($this->unpublished !== null) {
- if ($this->unpublished) {
+ if ($this->permanent !== null) {
+ if ($this->permanent) {
$where[] = qsprintf(
$conn,
- '(commit.importStatus & %d) = 0',
- PhabricatorRepositoryCommit::IMPORTED_CLOSEABLE);
+ '(commit.importStatus & %d) = %d',
+ PhabricatorRepositoryCommit::IMPORTED_PERMANENT,
+ PhabricatorRepositoryCommit::IMPORTED_PERMANENT);
} else {
$where[] = qsprintf(
$conn,
- '(commit.importStatus & %d) = %d',
- PhabricatorRepositoryCommit::IMPORTED_CLOSEABLE,
- PhabricatorRepositoryCommit::IMPORTED_CLOSEABLE);
+ '(commit.importStatus & %d) = 0',
+ PhabricatorRepositoryCommit::IMPORTED_PERMANENT);
}
}
diff --git a/src/applications/repository/engine/PhabricatorRepositoryCommitRef.php b/src/applications/repository/engine/PhabricatorRepositoryCommitRef.php
--- a/src/applications/repository/engine/PhabricatorRepositoryCommitRef.php
+++ b/src/applications/repository/engine/PhabricatorRepositoryCommitRef.php
@@ -5,7 +5,7 @@
private $identifier;
private $epoch;
private $branch;
- private $canCloseImmediately;
+ private $isPermanent;
private $parents = array();
public function setIdentifier($identifier) {
@@ -35,13 +35,13 @@
return $this->branch;
}
- public function setCanCloseImmediately($can_close_immediately) {
- $this->canCloseImmediately = $can_close_immediately;
+ public function setIsPermanent($is_permanent) {
+ $this->isPermanent = $is_permanent;
return $this;
}
- public function getCanCloseImmediately() {
- return $this->canCloseImmediately;
+ public function getIsPermanent() {
+ return $this->isPermanent;
}
public function setParents(array $parents) {
diff --git a/src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php b/src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php
--- a/src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php
+++ b/src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php
@@ -101,7 +101,7 @@
$repository,
$ref->getIdentifier(),
$ref->getEpoch(),
- $ref->getCanCloseImmediately(),
+ $ref->getIsPermanent(),
$ref->getParents(),
$task_priority);
@@ -250,7 +250,7 @@
$refs[$identifier] = id(new PhabricatorRepositoryCommitRef())
->setIdentifier($identifier)
->setEpoch($epoch)
- ->setCanCloseImmediately(true);
+ ->setIsPermanent(true);
if ($upper_bound === null) {
$upper_bound = $identifier;
@@ -354,7 +354,7 @@
$branch_refs = $this->discoverStreamAncestry(
new PhabricatorMercurialGraphStream($repository, $commit),
$commit,
- $close_immediately = true);
+ $is_permanent = true);
$this->didDiscoverRefs($branch_refs);
@@ -371,7 +371,7 @@
private function discoverStreamAncestry(
PhabricatorRepositoryGraphStream $stream,
$commit,
- $close_immediately) {
+ $is_permanent) {
$discover = array($commit);
$graph = array();
@@ -424,7 +424,7 @@
$refs[] = id(new PhabricatorRepositoryCommitRef())
->setIdentifier($commit)
->setEpoch($epoch)
- ->setCanCloseImmediately($close_immediately)
+ ->setIsPermanent($is_permanent)
->setParents($stream->getParents($commit));
}
@@ -507,8 +507,8 @@
}
/**
- * Sort branches so we process closeable branches first. This makes the
- * whole import process a little cheaper, since we can close these commits
+ * Sort branches so we process permanent branches first. This makes the
+ * whole import process a little cheaper, since we can publish these commits
* the first time through rather than catching them in the refs step.
*
* @task internal
@@ -538,7 +538,7 @@
PhabricatorRepository $repository,
$commit_identifier,
$epoch,
- $close_immediately,
+ $is_permanent,
array $parents,
$task_priority) {
@@ -570,8 +570,8 @@
$commit->setRepositoryID($repository->getID());
$commit->setCommitIdentifier($commit_identifier);
$commit->setEpoch($epoch);
- if ($close_immediately) {
- $commit->setImportStatus(PhabricatorRepositoryCommit::IMPORTED_CLOSEABLE);
+ if ($is_permanent) {
+ $commit->setImportStatus(PhabricatorRepositoryCommit::IMPORTED_PERMANENT);
}
$data = new PhabricatorRepositoryCommitData();
diff --git a/src/applications/repository/engine/PhabricatorRepositoryRefEngine.php b/src/applications/repository/engine/PhabricatorRepositoryRefEngine.php
--- a/src/applications/repository/engine/PhabricatorRepositoryRefEngine.php
+++ b/src/applications/repository/engine/PhabricatorRepositoryRefEngine.php
@@ -9,7 +9,7 @@
private $newPositions = array();
private $deadPositions = array();
- private $closeCommits = array();
+ private $permanentCommits = array();
private $rebuild;
public function setRebuild($rebuild) {
@@ -24,7 +24,7 @@
public function updateRefs() {
$this->newPositions = array();
$this->deadPositions = array();
- $this->closeCommits = array();
+ $this->permanentCommits = array();
$repository = $this->getRepository();
$viewer = $this->getViewer();
@@ -96,8 +96,8 @@
$this->updateCursors($cursor_group, $refs, $type, $all_closing_heads);
}
- if ($this->closeCommits) {
- $this->setCloseFlagOnCommits($this->closeCommits);
+ if ($this->permanentCommits) {
+ $this->setPermanentFlagOnCommits($this->permanentCommits);
}
$save_cursors = $this->getCursorsForUpdate($all_cursors);
@@ -217,9 +217,9 @@
return $this;
}
- private function markCloseCommits(array $identifiers) {
+ private function markPermanentCommits(array $identifiers) {
foreach ($identifiers as $identifier) {
- $this->closeCommits[$identifier] = $identifier;
+ $this->permanentCommits[$identifier] = $identifier;
}
return $this;
}
@@ -377,7 +377,7 @@
$identifier,
$exclude);
- $this->markCloseCommits($new_identifiers);
+ $this->markPermanentCommits($new_identifiers);
}
}
}
@@ -507,10 +507,10 @@
}
/**
- * Mark a list of commits as closeable, and queue workers for those commits
+ * Mark a list of commits as permanent, and queue workers for those commits
* which don't already have the flag.
*/
- private function setCloseFlagOnCommits(array $identifiers) {
+ private function setPermanentFlagOnCommits(array $identifiers) {
$repository = $this->getRepository();
$commit_table = new PhabricatorRepositoryCommit();
$conn = $commit_table->establishConnection('w');
@@ -552,7 +552,7 @@
}
}
- $closeable_flag = PhabricatorRepositoryCommit::IMPORTED_CLOSEABLE;
+ $permanent_flag = PhabricatorRepositoryCommit::IMPORTED_PERMANENT;
$published_flag = PhabricatorRepositoryCommit::IMPORTED_PUBLISH;
$all_commits = ipull($all_commits, null, 'commitIdentifier');
@@ -568,9 +568,9 @@
}
$import_status = $row['importStatus'];
- if (!($import_status & $closeable_flag)) {
- // Set the "closeable" flag.
- $import_status = ($import_status | $closeable_flag);
+ if (!($import_status & $permanent_flag)) {
+ // Set the "permanent" flag.
+ $import_status = ($import_status | $permanent_flag);
// See T13580. Clear the "published" flag, so publishing executes
// again. We may have previously performed a no-op "publish" on the
diff --git a/src/applications/repository/storage/PhabricatorRepositoryCommit.php b/src/applications/repository/storage/PhabricatorRepositoryCommit.php
--- a/src/applications/repository/storage/PhabricatorRepositoryCommit.php
+++ b/src/applications/repository/storage/PhabricatorRepositoryCommit.php
@@ -36,7 +36,7 @@
const IMPORTED_PUBLISH = 8;
const IMPORTED_ALL = 11;
- const IMPORTED_CLOSEABLE = 1024;
+ const IMPORTED_PERMANENT = 1024;
const IMPORTED_UNREACHABLE = 2048;
private $commitData = self::ATTACHABLE;
@@ -467,7 +467,7 @@
}
public function isPermanentCommit() {
- return (bool)$this->isPartiallyImported(self::IMPORTED_CLOSEABLE);
+ return (bool)$this->isPartiallyImported(self::IMPORTED_PERMANENT);
}
public function newCommitAuthorView(PhabricatorUser $viewer) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 11, 10:38 AM (2 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7520615
Default Alt Text
D21514.id51208.diff (10 KB)
Attached To
Mode
D21514: Rename "IMPORTED_CLOSEABLE" to "IMPORTED_PERMANENT" to clarify the meaning of the flag
Attached
Detach File
Event Timeline
Log In to Comment