1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 23:02:42 +01:00

Enable query activediff timestamp

Summary: people want to get the info about how long the revision has been active since the last time the authoer ran 'arc diff'.

Test Plan: call it from conduit console

Reviewers: vrana, epriestley

Reviewed By: epriestley

CC: Girish, aran, epriestley

Differential Revision: https://secure.phabricator.com/D2885
This commit is contained in:
Jason Ge 2012-06-28 15:26:00 -07:00
parent b10428fe60
commit 081c3a24b0

View file

@ -34,13 +34,14 @@ final class DifferentialRevisionQuery {
private $pathIDs = array();
private $status = 'status-any';
const STATUS_ANY = 'status-any';
const STATUS_OPEN = 'status-open';
const STATUS_ACCEPTED = 'status-accepted';
const STATUS_CLOSED = 'status-closed'; // NOTE: Same as 'committed'.
const STATUS_COMMITTED = 'status-committed'; // TODO: Remove.
const STATUS_ABANDONED = 'status-abandoned';
private $status = 'status-any';
const STATUS_ANY = 'status-any';
const STATUS_OPEN = 'status-open';
const STATUS_ACCEPTED = 'status-accepted';
const STATUS_NEEDS_REVIEW = 'status-needs-review';
const STATUS_CLOSED = 'status-closed'; // NOTE: Same as 'committed'.
const STATUS_COMMITTED = 'status-committed'; // TODO: Remove.
const STATUS_ABANDONED = 'status-abandoned';
private $authors = array();
private $draftAuthors = array();
@ -692,6 +693,14 @@ final class DifferentialRevisionQuery {
ArcanistDifferentialRevisionStatus::ACCEPTED,
));
break;
case self::STATUS_NEEDS_REVIEW:
$where[] = qsprintf(
$conn_r,
'status IN (%Ld)',
array(
ArcanistDifferentialRevisionStatus::NEEDS_REVIEW,
));
break;
case self::STATUS_ACCEPTED:
$where[] = qsprintf(
$conn_r,