Page MenuHomePhabricator

D12361.diff
No OneTemporary

D12361.diff

diff --git a/src/applications/differential/controller/DifferentialRevisionViewController.php b/src/applications/differential/controller/DifferentialRevisionViewController.php
--- a/src/applications/differential/controller/DifferentialRevisionViewController.php
+++ b/src/applications/differential/controller/DifferentialRevisionViewController.php
@@ -786,7 +786,7 @@
->setViewer($this->getRequest()->getUser())
->withStatus(DifferentialRevisionQuery::STATUS_OPEN)
->withUpdatedEpochBetween($recent, null)
- ->setOrder(DifferentialRevisionQuery::ORDER_PATH_MODIFIED)
+ ->setOrder(DifferentialRevisionQuery::ORDER_MODIFIED)
->setLimit(10)
->needFlags(true)
->needDrafts(true)
diff --git a/src/applications/differential/query/DifferentialRevisionQuery.php b/src/applications/differential/query/DifferentialRevisionQuery.php
--- a/src/applications/differential/query/DifferentialRevisionQuery.php
+++ b/src/applications/differential/query/DifferentialRevisionQuery.php
@@ -44,14 +44,6 @@
private $order = 'order-modified';
const ORDER_MODIFIED = 'order-modified';
const ORDER_CREATED = 'order-created';
- /**
- * This is essentially a denormalized copy of the revision modified time that
- * should perform better for path queries with a LIMIT. Critically, when you
- * browse "/", every revision in that repository for all time will match so
- * the query benefits from being able to stop before fully materializing the
- * result set.
- */
- const ORDER_PATH_MODIFIED = 'order-path-modified';
private $needRelationships = false;
private $needActiveDiffs = false;
@@ -894,14 +886,6 @@
'type' => 'int',
);
break;
- case self::ORDER_PATH_MODIFIED:
- $columns[] = array(
- 'table' => 'p',
- 'column' => 'epoch',
- 'value' => $cursor->getDateCreated(),
- 'type' => 'int',
- );
- break;
}
$columns[] = array(
@@ -932,12 +916,6 @@
return 'id';
}
return 'r.id';
- case self::ORDER_PATH_MODIFIED:
- if (!$this->pathIDs) {
- throw new Exception(
- 'To use ORDER_PATH_MODIFIED, you must specify withPath().');
- }
- return 'p.epoch';
default:
throw new Exception("Unknown query order constant '{$this->order}'.");
}
diff --git a/src/applications/diffusion/controller/DiffusionBrowseController.php b/src/applications/diffusion/controller/DiffusionBrowseController.php
--- a/src/applications/diffusion/controller/DiffusionBrowseController.php
+++ b/src/applications/diffusion/controller/DiffusionBrowseController.php
@@ -199,7 +199,7 @@
->withPath($repository->getID(), $path_id)
->withStatus(DifferentialRevisionQuery::STATUS_OPEN)
->withUpdatedEpochBetween($recent, null)
- ->setOrder(DifferentialRevisionQuery::ORDER_PATH_MODIFIED)
+ ->setOrder(DifferentialRevisionQuery::ORDER_MODIFIED)
->setLimit(10)
->needRelationships(true)
->needFlags(true)

File Metadata

Mime Type
text/plain
Expires
Oct 17 2024, 12:39 PM (4 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6722080
Default Alt Text
D12361.diff (3 KB)

Event Timeline