Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F28200708
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
77 KB
Subscribers
None
View Options
diff --git a/resources/sql/patches/20130507.releephrqsimplifycols.sql b/resources/sql/patches/20130507.releephrqsimplifycols.sql
new file mode 100644
index 000000000..ef8c8b588
--- /dev/null
+++ b/resources/sql/patches/20130507.releephrqsimplifycols.sql
@@ -0,0 +1,8 @@
+ALTER TABLE {$NAMESPACE}_releeph.releeph_request
+ DROP COLUMN requestCommitIdentifier,
+ DROP COLUMN requestCommitOrdinal,
+ DROP COLUMN status,
+ DROP COLUMN committedByUserPHID,
+ DROP KEY `requestIdentifierBranch`,
+ ADD CONSTRAINT
+ UNIQUE KEY `requestIdentifierBranch` (`requestCommitPHID`, `branchID`);
diff --git a/src/applications/releeph/conduit/work/ConduitAPI_releephwork_nextrequest_Method.php b/src/applications/releeph/conduit/work/ConduitAPI_releephwork_nextrequest_Method.php
index c17dbbdcb..1e9d373bc 100644
--- a/src/applications/releeph/conduit/work/ConduitAPI_releephwork_nextrequest_Method.php
+++ b/src/applications/releeph/conduit/work/ConduitAPI_releephwork_nextrequest_Method.php
@@ -1,208 +1,221 @@
<?php
final class ConduitAPI_releephwork_nextrequest_Method
extends ConduitAPI_releeph_Method {
private $project;
private $branch;
public function getMethodStatus() {
return self::METHOD_STATUS_UNSTABLE;
}
public function getMethodDescription() {
return
"Return info required to cut a branch, ".
"and pick and revert ReleephRequests";
}
public function defineParamTypes() {
return array(
'branchPHID' => 'required int',
'seen' => 'required list<string, bool>',
);
}
public function defineReturnType() {
return '';
}
public function defineErrorTypes() {
return array(
'ERR-NOT-PUSHER' =>
'You are not listed as a pusher for thie Releeph project!',
);
}
protected function execute(ConduitAPIRequest $request) {
$seen = $request->getValue('seen');
$branch = id(new ReleephBranch())
->loadOneWhere('phid = %s', $request->getValue('branchPHID'));
$project = $branch->loadReleephProject();
$needs_pick = array();
$needs_revert = array();
$releeph_requests = $branch->loadReleephRequests($request->getUser());
foreach ($releeph_requests as $candidate) {
$phid = $candidate->getPHID();
if (idx($seen, $phid)) {
continue;
}
$should = $candidate->shouldBeInBranch();
$in = $candidate->getInBranch();
if ($should && !$in) {
$needs_pick[] = $candidate;
}
if (!$should && $in) {
$needs_revert[] = $candidate;
}
}
/**
* Sort both needs_pick and needs_revert in ascending commit order, as
* discovered by Phabricator (using the `id` column to perform that
* ordering).
*
* This is easy for $needs_pick as the ordinal is stored. It is hard for
* reverts, as we have to look that information up.
*/
- $needs_pick = msort($needs_pick, 'getRequestCommitOrdinal');
+ $needs_pick = $this->sortPicks($needs_pick);
$needs_revert = $this->sortReverts($needs_revert);
/**
* Do reverts first in reverse order, then the picks in original-commit
* order.
*
* This seems like the correct thing to do, but there may be a better
* algorithm for the releephwork.nextrequest Conduit call that orders
* things better.
*
* We could also button-mash our way through everything that failed (at the
* end of the run) to try failed things again.
*/
$releeph_request = null;
$action = null;
if ($needs_revert) {
$releeph_request = last($needs_revert);
$action = 'revert';
$commit_id = $releeph_request->getCommitIdentifier();
$commit_phid = $releeph_request->getCommitPHID();
} elseif ($needs_pick) {
$releeph_request = head($needs_pick);
$action = 'pick';
- $commit_id = $releeph_request->getRequestCommitIdentifier();
- $commit_phid = $releeph_request->getRequestCommitPHID();
+ $commit = $releeph_request->loadPhabricatorRepositoryCommit();
+ $commit_id = $commit->getCommitIdentifier();
+ $commit_phid = $commit->getPHID();
} else {
// Return early if there's nothing to do!
return array();
}
// Build the response
$phids = array();
$phids[] = $commit_phid;
$diff_phid = null;
$diff_rev_id = null;
$diff_rev = $releeph_request->loadDifferentialRevision();
if ($diff_rev) {
$diff_phid = $diff_rev->getPHID();
$phids[] = $diff_phid;
$diff_rev_id = $diff_rev->getID();
}
$phids[] = $releeph_request->getPHID();
$handles = id(new PhabricatorObjectHandleData($phids))
->setViewer($request->getUser())
->loadHandles();
$diff_name = null;
if ($diff_rev) {
$diff_name = $handles[$diff_phid]->getName();
}
// Calculate the new-author information (if any)
$new_author = null;
$new_author_phid = null;
switch ($project->getDetail('commitWithAuthor')) {
case ReleephProject::COMMIT_AUTHOR_NONE:
break;
case ReleephProject::COMMIT_AUTHOR_FROM_DIFF:
if ($diff_rev) {
$new_author_phid = $diff_rev->getAuthorPHID();
} else {
$pr_commit = $releeph_request->loadPhabricatorRepositoryCommit();
if ($pr_commit) {
$new_author_phid = $pr_commit->getAuthorPHID();
}
}
break;
case ReleephProject::COMMIT_AUTHOR_REQUESTOR:
$new_author_phid = $releeph_request->getRequestUserPHID();
break;
}
return array(
'requestID' => $releeph_request->getID(),
'requestPHID' => $releeph_request->getPHID(),
'requestName' => $handles[$releeph_request->getPHID()]->getName(),
'requestorPHID' => $releeph_request->getRequestUserPHID(),
'action' => $action,
'diffRevID' => $diff_rev_id,
'diffName' => $diff_name,
'commitIdentifier' => $commit_id,
'commitPHID' => $commit_phid,
'commitName' => $handles[$commit_phid]->getName(),
'needsRevert' => mpull($needs_revert, 'getID'),
'needsPick' => mpull($needs_pick, 'getID'),
'newAuthorPHID' => $new_author_phid,
);
}
+ private function sortPicks(array $releeph_requests) {
+ $surrogate = array();
+ foreach ($releeph_requests as $rq) {
+ // TODO: it's likely that relying on the `id` column to provide
+ // trunk-commit-order is thoroughly broken.
+ $ordinal = (int) $rq->loadPhabricatorRepositoryCommit()->getID();
+ $surrogate[$ordinal] = $rq;
+ }
+ ksort($surrogate);
+ return $surrogate;
+ }
+
/**
* Sort an array of ReleephRequests, that have been picked into a branch, in
* the order in which they were picked to the branch.
*/
private function sortReverts(array $releeph_requests) {
if (!$releeph_requests) {
return array();
}
// ReleephRequests, keyed by <branch-commit-id>
$releeph_requests = mpull($releeph_requests, null, 'getCommitIdentifier');
$commits = id(new PhabricatorRepositoryCommit())
->loadAllWhere(
'commitIdentifier IN (%Ls)',
mpull($releeph_requests, 'getCommitIdentifier'));
// A map of <branch-commit-id> => <branch-commit-ordinal>
$surrogate = mpull($commits, 'getID', 'getCommitIdentifier');
$unparsed = array();
$result = array();
foreach ($releeph_requests as $commit_id => $releeph_request) {
$ordinal = idx($surrogate, $commit_id);
if ($ordinal) {
$result[$ordinal] = $releeph_request;
} else {
$unparsed[] = $releeph_request;
}
}
// Sort $result in ascending order
ksort($result);
// Unparsed commits we'll just have to guess, based on time
$unparsed = msort($unparsed, 'getDateModified');
return array_merge($result, $unparsed);
}
}
diff --git a/src/applications/releeph/controller/request/ReleephRequestEditController.php b/src/applications/releeph/controller/request/ReleephRequestEditController.php
index eefe3bf60..9ccbb2331 100644
--- a/src/applications/releeph/controller/request/ReleephRequestEditController.php
+++ b/src/applications/releeph/controller/request/ReleephRequestEditController.php
@@ -1,132 +1,131 @@
<?php
final class ReleephRequestEditController extends ReleephController {
public function processRequest() {
$request = $this->getRequest();
$releeph_branch = $this->getReleephBranch();
$releeph_request = $this->getReleephRequest();
$releeph_branch->populateReleephRequestHandles(
$request->getUser(), array($releeph_request));
$phids = array();
$phids[] = $releeph_request->getRequestCommitPHID();
$phids[] = $releeph_request->getRequestUserPHID();
- $phids[] = $releeph_request->getCommittedByUserPHID();
$handles = id(new PhabricatorObjectHandleData($phids))
->setViewer($request->getUser())
->loadHandles();
$age_string = phabricator_format_relative_time(
time() - $releeph_request->getDateCreated());
// Warn the user if we see this
$notice_view = null;
if ($request->getInt('existing')) {
$notice_messages = array(
'You are editing an existing pick request!',
hsprintf(
"Requested %s ago by %s",
$age_string,
$handles[$releeph_request->getRequestUserPHID()]->renderLink())
);
$notice_view = id(new AphrontErrorView())
->setSeverity(AphrontErrorView::SEVERITY_NOTICE)
->setErrors($notice_messages);
}
// <aidehua> epriestley: Is it common to pass around a referer URL to
// return from whence one came? [...]
// <epriestley> If you only have two places, maybe consider some parameter
// rather than the full URL.
switch ($request->getStr('origin')) {
case 'request':
$origin_uri = '/RQ'.$releeph_request->getID();
break;
case 'branch':
default:
$origin_uri = $releeph_request->loadReleephBranch()->getURI();
break;
}
$errors = array();
$selector = $this->getReleephProject()->getReleephFieldSelector();
$fields = $selector->getFieldSpecifications();
foreach ($fields as $field) {
$field
->setReleephProject($this->getReleephProject())
->setReleephBranch($this->getReleephBranch())
->setReleephRequest($this->getReleephRequest());
}
if ($request->isFormPost()) {
foreach ($fields as $field) {
if ($field->isEditable()) {
try {
$field->setValueFromAphrontRequest($request);
} catch (ReleephFieldParseException $ex) {
$errors[] = $ex->getMessage();
}
}
}
if (!$errors) {
$releeph_request->save();
return id(new AphrontRedirectResponse())->setURI($origin_uri);
}
}
/**
* Build the rest of the page
*/
$error_view = null;
if ($errors) {
$error_view = new AphrontErrorView();
$error_view->setErrors($errors);
$error_view->setTitle('Form Errors');
}
$form = id(new AphrontFormView())
->setUser($request->getUser())
->appendChild(
id(new AphrontFormMarkupControl())
->setLabel('Original Commit')
->setValue(
$handles[$releeph_request->getRequestCommitPHID()]->renderLink()))
->appendChild(
id(new AphrontFormMarkupControl())
->setLabel('Requestor')
->setValue(hsprintf(
'%s %s ago',
$handles[$releeph_request->getRequestUserPHID()]->renderLink(),
$age_string)));
// Fields
foreach ($fields as $field) {
if ($field->isEditable()) {
$control = $field->renderEditControl($request);
$form->appendChild($control);
}
}
$form
->appendChild(
id(new AphrontFormSubmitControl())
->addCancelButton($origin_uri, 'Cancel')
->setValue('Save'));
$panel = id(new AphrontPanelView())
->setHeader('Edit Pick Request')
->setWidth(AphrontPanelView::WIDTH_FORM)
->appendChild($form);
return $this->buildStandardPageResponse(
array($notice_view, $error_view, $panel),
array('title', 'Edit Pick Request'));
}
}
diff --git a/src/applications/releeph/editor/ReleephRequestEditor.php b/src/applications/releeph/editor/ReleephRequestEditor.php
index 8cb0945e2..9b6e31b31 100644
--- a/src/applications/releeph/editor/ReleephRequestEditor.php
+++ b/src/applications/releeph/editor/ReleephRequestEditor.php
@@ -1,408 +1,402 @@
<?php
/**
* Provide methods for the common ways of creating and mutating a
* ReleephRequest, sending email when something interesting happens.
*
* This class generates ReleephRequestEvents, and each type of event
* (ReleephRequestEvent::TYPE_*) corresponds to one of the editor methods.
*
* The editor methods (except for create() use newEvent() and commit() to save
* some code duplication.
*/
final class ReleephRequestEditor extends PhabricatorEditor {
private $releephRequest;
private $event;
private $silentUpdate;
public function __construct(ReleephRequest $rq) {
$this->releephRequest = $rq;
}
public function setSilentUpdate($silent) {
$this->silentUpdate = $silent;
return $this;
}
/* -( ReleephRequest edit methods )---------------------------------------- */
/**
* Request a PhabricatorRepositoryCommit to be committed to the given
* ReleephBranch.
*/
public function create(PhabricatorRepositoryCommit $commit,
ReleephBranch $branch) {
// We can't use newEvent() / commit() abstractions, so do what those
// helpers do manually.
$requestor = $this->requireActor();
$rq = $this->releephRequest;
$rq->openTransaction();
$rq
->setBranchID($branch->getID())
- ->setRequestCommitIdentifier($commit->getCommitIdentifier())
->setRequestCommitPHID($commit->getPHID())
- ->setRequestCommitOrdinal($commit->getID())
->setInBranch(0)
->setRequestUserPHID($requestor->getPHID())
->setUserIntent($requestor, ReleephRequest::INTENT_WANT)
->save();
$event = id(new ReleephRequestEvent())
->setType(ReleephRequestEvent::TYPE_CREATE)
->setActorPHID($requestor->getPHID())
->setStatusBefore(null)
->setStatusAfter($rq->getStatus())
->setReleephRequestID($rq->getID())
->setDetail('commitPHID', $commit->getPHID())
->save();
$rq->saveTransaction();
// Mail
if (!$this->silentUpdate) {
$project = $this->releephRequest->loadReleephProject();
$mail = id(new ReleephRequestMail())
->setReleephRequest($this->releephRequest)
->setReleephProject($project)
->setEvents(array($event))
->setSenderAndRecipientPHID($requestor->getPHID())
->addTos(ReleephRequestMail::ENT_ALL_PUSHERS)
->addCCs(ReleephRequestMail::ENT_REQUESTOR)
->send();
}
}
/**
* Record whether the PhabricatorUser wants or passes on this request.
*/
public function changeUserIntent(PhabricatorUser $user, $intent) {
$project = $this->releephRequest->loadReleephProject();
$is_pusher = $project->isPusher($user);
$event = $this->newEvent()
->setType(ReleephRequestEvent::TYPE_USER_INTENT)
->setDetail('userPHID', $user->getPHID())
->setDetail('wasPusher', $is_pusher)
->setDetail('newIntent', $intent);
$this->releephRequest
->setUserIntent($user, $intent);
$this->commit();
// Mail if this is 'interesting'
if (!$this->silentUpdate &&
$event->getStatusBefore() != $event->getStatusAfter()) {
$project = $this->releephRequest->loadReleephProject();
$mail = id(new ReleephRequestMail())
->setReleephRequest($this->releephRequest)
->setReleephProject($project)
->setEvents(array($event))
->setSenderAndRecipientPHID($this->requireActor()->getPHID())
->addTos(ReleephRequestMail::ENT_REQUESTOR)
->addCCs(ReleephRequestMail::ENT_INTERESTED_PUSHERS)
->send();
}
}
/**
* Record the results of someone trying to pick or revert a request in their
* local repository, to give advance warning that something doesn't pick or
* revert cleanly.
*/
public function changePickStatus($pick_status, $dry_run, $details) {
$event = $this->newEvent()
->setType(ReleephRequestEvent::TYPE_PICK_STATUS)
->setDetail('newPickStatus', $pick_status)
->setDetail('commitDetails', $details);
$this->releephRequest->setPickStatus($pick_status);
$this->commit();
// Failures should generate an email
if (!$this->silentUpdate &&
!$dry_run &&
($pick_status == ReleephRequest::PICK_FAILED ||
$pick_status == ReleephRequest::REVERT_FAILED)) {
$project = $this->releephRequest->loadReleephProject();
$mail = id(new ReleephRequestMail())
->setReleephRequest($this->releephRequest)
->setReleephProject($project)
->setEvents(array($event))
->setSenderAndRecipientPHID($this->requireActor()->getPHID())
->addTos(ReleephRequestMail::ENT_REQUESTOR)
->addCCs(ReleephRequestMail::ENT_ACTORS)
->addCCs(ReleephRequestMail::ENT_INTERESTED_PUSHERS)
->send();
}
}
/**
* Record that a request was committed locally, and is about to be pushed to
* the remote repository.
*
* This lets us mark a ReleephRequest as being in a branch in real time so
* that no one else tries to pick it.
*
* When the daemons discover this commit in the repository with
* DifferentialReleephRequestFieldSpecification, we'll be able to recrod the
* commit's PHID as well. That process is slow though, and
* we don't want to wait a whole minute before marking something as cleanly
* picked or reverted.
*/
public function recordSuccessfulCommit($action, $new_commit_id) {
$table = $this->releephRequest;
$table->openTransaction();
$actor = $this->requireActor();
$event = id(new ReleephRequestEvent())
->setReleephRequestID($this->releephRequest->getID())
->setActorPHID($actor->getPHID())
->setType(ReleephRequestEvent::TYPE_COMMIT)
->setDetail('action', $action)
->setDetail('newCommitIdentifier', $new_commit_id)
->save();
switch ($action) {
case 'pick':
$this->releephRequest
->setInBranch(1)
->setPickStatus(ReleephRequest::PICK_OK)
->setCommitIdentifier($new_commit_id)
->setCommitPHID(null)
- ->setCommittedByUserPHID($actor->getPHID())
->save();
break;
case 'revert':
$this->releephRequest
->setInBranch(0)
->setPickStatus(ReleephRequest::REVERT_OK)
->setCommitIdentifier(null)
->setCommitPHID(null)
- ->setCommittedByUserPHID(null)
->save();
break;
default:
$table->killTransaction();
throw new Exception("Unknown action {$action}!");
break;
}
$table->saveTransaction();
// Don't spam people about local commits -- we'll do that with
// discoverCommit() instead!
}
/**
* Mark this request as picked or reverted based on discovering it in the
* branch. We have a PhabricatorRepositoryCommit, so we're able to
* setCommitPHID on the ReleephRequest (unlike recordSuccessfulCommit()).
*/
public function discoverCommit(
$action,
PhabricatorRepositoryCommit $commit,
PhabricatorRepositoryCommitData $data) {
$table = $this->releephRequest;
$table->openTransaction();
$table->beginWriteLocking();
$past_events = id(new ReleephRequestEvent())->loadAllWhere(
'releephRequestID = %d AND type = %s',
$this->releephRequest->getID(),
ReleephRequestEvent::TYPE_DISCOVERY);
foreach ($past_events as $past_event) {
if ($past_event->getDetail('newCommitIdentifier')
== $commit->getCommitIdentifier()) {
// Avoid re-discovery if reparsing!
$table->endWriteLocking();
$table->killTransaction();
return;
}
}
$actor = $this->requireActor();
$event = id(new ReleephRequestEvent())
->setReleephRequestID($this->releephRequest->getID())
->setActorPHID($actor->getPHID())
->setType(ReleephRequestEvent::TYPE_DISCOVERY)
->setDateCreated($commit->getEpoch())
->setDetail('action', $action)
->setDetail('newCommitIdentifier', $commit->getCommitIdentifier())
->setDetail('newCommitPHID', $commit->getPHID())
->setDetail('authorPHID', $data->getCommitDetail('authorPHID'))
->setDetail('committerPHID', $data->getCommitDetail('committerPHID'))
->save();
switch ($action) {
case 'pick':
$this->releephRequest
->setInBranch(1)
->setPickStatus(ReleephRequest::PICK_OK)
->setCommitIdentifier($commit->getCommitIdentifier())
->setCommitPHID($commit->getPHID())
- ->setCommittedByUserPHID($actor->getPHID())
->save();
break;
case 'revert':
$this->releephRequest
->setInBranch(0)
->setPickStatus(ReleephRequest::REVERT_OK)
->setCommitIdentifier(null)
->setCommitPHID(null)
- ->setCommittedByUserPHID(null)
->save();
break;
default:
$table->killTransaction();
throw new Exception("Unknown action {$action}!");
break;
}
$table->endWriteLocking();
$table->saveTransaction();
// Mail
if (!$this->silentUpdate) {
$project = $this->releephRequest->loadReleephProject();
$mail = id(new ReleephRequestMail())
->setReleephRequest($this->releephRequest)
->setReleephProject($project)
->setEvents(array($event))
->setSenderAndRecipientPHID($this->requireActor()->getPHID())
->addTos(ReleephRequestMail::ENT_REQUESTOR)
->addCCs(ReleephRequestMail::ENT_ACTORS)
->addCCs(ReleephRequestMail::ENT_INTERESTED_PUSHERS)
->send();
}
}
public function addComment($comment) {
$event = $this->newEvent()
->setType(ReleephRequestEvent::TYPE_COMMENT)
->setDetail('comment', $comment);
$this->commit();
// Mail
if (!$this->silentUpdate) {
$project = $this->releephRequest->loadReleephProject();
$mail = id(new ReleephRequestMail())
->setReleephRequest($this->releephRequest)
->setReleephProject($project)
->setEvents(array($event))
->setSenderAndRecipientPHID($this->requireActor()->getPHID())
->addTos(ReleephRequestMail::ENT_REQUESTOR)
->addCCs(ReleephRequestMail::ENT_ACTORS)
->addCCs(ReleephRequestMail::ENT_INTERESTED_PUSHERS)
->send();
}
}
public function markManuallyActioned($action) {
$event = $this->newEvent()
->setType(ReleephRequestEvent::TYPE_MANUAL_ACTION)
->setDetail('action', $action);
$actor = $this->requireActor();
$project = $this->releephRequest->loadReleephProject();
$requestor_phid = $this->releephRequest->getRequestUserPHID();
if (!$project->isPusher($actor) &&
$actor->getPHID() !== $requestor_phid) {
throw new Exception(
"Only pushers or requestors can mark requests as ".
"manually picked or reverted!");
}
switch ($action) {
case 'pick':
$in_branch = true;
$intent = ReleephRequest::INTENT_WANT;
break;
case 'revert':
$in_branch = false;
$intent = ReleephRequest::INTENT_PASS;
break;
default:
throw new Exception("Unknown action {$action}!");
break;
}
$this->releephRequest
->setInBranch((int)$in_branch)
->setUserIntent($this->getActor(), $intent);
$this->commit();
// Mail
if (!$this->silentUpdate) {
$project = $this->releephRequest->loadReleephProject();
$mail = id(new ReleephRequestMail())
->setReleephRequest($this->releephRequest)
->setReleephProject($project)
->setEvents(array($event))
->setSenderAndRecipientPHID($this->requireActor()->getPHID())
->addTos(ReleephRequestMail::ENT_REQUESTOR)
->addCCs(ReleephRequestMail::ENT_INTERESTED_PUSHERS)
->send();
}
}
/* -( Implementation )----------------------------------------------------- */
/**
* Create and return a new ReleephRequestEvent bound to the editor's
* ReleephRequest, inside a transaction.
*
* When you call commit(), the event and this editor's ReleephRequest (along
* with any changes you made to the ReleephRequest) are saved and the
* transaction committed.
*/
private function newEvent() {
$actor = $this->requireActor();
if ($this->event) {
throw new Exception("You have already called newEvent()!");
}
$rq = $this->releephRequest;
$rq->openTransaction();
$this->event = id(new ReleephRequestEvent())
->setReleephRequestID($rq->getID())
->setActorPHID($actor->getPHID())
->setStatusBefore($rq->getStatus());
return $this->event;
}
private function commit() {
if (!$this->event) {
throw new Exception("You must call newEvent first!");
}
$rq = $this->releephRequest;
$this->event
->setStatusAfter($rq->getStatus())
->save();
$rq->save();
$rq->saveTransaction();
$this->event = null;
}
}
diff --git a/src/applications/releeph/storage/ReleephRequest.php b/src/applications/releeph/storage/ReleephRequest.php
index 30cb80c48..67ab8d79d 100644
--- a/src/applications/releeph/storage/ReleephRequest.php
+++ b/src/applications/releeph/storage/ReleephRequest.php
@@ -1,315 +1,314 @@
<?php
final class ReleephRequest extends ReleephDAO {
protected $phid;
protected $branchID;
protected $requestUserPHID;
protected $details = array();
protected $userIntents = array();
protected $inBranch;
protected $pickStatus;
// Information about the thing being requested
- protected $requestCommitIdentifier;
protected $requestCommitPHID;
- protected $requestCommitOrdinal;
// Information about the last commit to the releeph branch
protected $commitIdentifier;
- protected $committedByUserPHID;
protected $commitPHID;
// Pre-populated handles that we'll bulk load in ReleephBranch
private $handles;
/* -( Constants and helper methods )--------------------------------------- */
const INTENT_WANT = 'want';
const INTENT_PASS = 'pass';
const PICK_PENDING = 1; // old
const PICK_FAILED = 2;
const PICK_OK = 3;
const PICK_MANUAL = 4; // old
const REVERT_OK = 5;
const REVERT_FAILED = 6;
const STATUS_REQUESTED = 1;
const STATUS_NEEDS_PICK = 2; // aka approved
const STATUS_REJECTED = 3;
const STATUS_ABANDONED = 4;
const STATUS_PICKED = 5;
const STATUS_REVERTED = 6;
const STATUS_NEEDS_REVERT = 7; // aka revert requested
public function shouldBeInBranch() {
return
$this->getPusherIntent() == self::INTENT_WANT &&
/**
* We use "!= pass" instead of "== want" in case the requestor intent is
* not present. In other words, only revert if the requestor explicitly
* passed.
*/
$this->getRequestorIntent() != self::INTENT_PASS;
}
/**
* Will return INTENT_WANT if any pusher wants this request, and no pusher
* passes on this request.
*/
public function getPusherIntent() {
$project = $this->loadReleephProject();
if (!$project->getPushers()) {
return self::INTENT_WANT;
}
$found_pusher_want = false;
foreach ($this->userIntents as $phid => $intent) {
if ($project->isPusherPHID($phid)) {
if ($intent == self::INTENT_PASS) {
return self::INTENT_PASS;
}
$found_pusher_want = true;
}
}
if ($found_pusher_want) {
return self::INTENT_WANT;
} else {
return null;
}
}
public function getRequestorIntent() {
return idx($this->userIntents, $this->requestUserPHID);
}
public function getStatus() {
return $this->calculateStatus();
}
private function calculateStatus() {
if ($this->shouldBeInBranch()) {
if ($this->getInBranch()) {
return self::STATUS_PICKED;
} else {
return self::STATUS_NEEDS_PICK;
}
} else {
if ($this->getInBranch()) {
return self::STATUS_NEEDS_REVERT;
} else {
$has_been_in_branch = $this->getCommitIdentifier();
// Regardless of why we reverted something, always say reverted if it
// was once in the branch.
if ($has_been_in_branch) {
return self::STATUS_REVERTED;
} elseif ($this->getPusherIntent() === ReleephRequest::INTENT_PASS) {
// Otherwise, if it has never been in the branch, explicitly say why:
return self::STATUS_REJECTED;
} elseif ($this->getRequestorIntent() === ReleephRequest::INTENT_WANT) {
return self::STATUS_REQUESTED;
} else {
return self::STATUS_ABANDONED;
}
}
}
}
public static function getStatusDescriptionFor($status) {
static $descriptions = array(
self::STATUS_REQUESTED => 'Requested',
self::STATUS_REJECTED => 'Rejected',
self::STATUS_ABANDONED => 'Abandoned',
self::STATUS_PICKED => 'Picked',
self::STATUS_REVERTED => 'Reverted',
self::STATUS_NEEDS_PICK => 'Needs Pick',
self::STATUS_NEEDS_REVERT => 'Needs Revert',
);
return idx($descriptions, $status, '??');
}
public static function getStatusClassSuffixFor($status) {
$description = self::getStatusDescriptionFor($status);
$class = str_replace(' ', '-', strtolower($description));
return $class;
}
/* -( Lisk mechanics )----------------------------------------------------- */
public function getConfiguration() {
return array(
self::CONFIG_AUX_PHID => true,
self::CONFIG_SERIALIZATION => array(
'details' => self::SERIALIZATION_JSON,
'userIntents' => self::SERIALIZATION_JSON,
),
) + parent::getConfiguration();
}
public function generatePHID() {
return PhabricatorPHID::generateNewPHID(
ReleephPHIDConstants::PHID_TYPE_RERQ);
}
/* -( Helpful accessors )--------------------------------------------------- */
public function setHandles($handles) {
$this->handles = $handles;
return $this;
}
public function getHandles() {
if (!$this->handles) {
throw new Exception(
"You must call ReleephBranch::populateReleephRequestHandles() first");
}
return $this->handles;
}
public function getDetail($key, $default = null) {
return idx($this->getDetails(), $key, $default);
}
public function setDetail($key, $value) {
$this->details[$key] = $value;
return $this;
}
public function getReason() {
// Backward compatibility: reason used to be called comments
$reason = $this->getDetail('reason');
if (!$reason) {
return $this->getDetail('comments');
}
return $reason;
}
public function getSummary() {
/**
* Instead, you can use:
* - getDetail('summary') // the actual user-chosen summary
* - getSummaryForDisplay() // falls back to the original commit title
*
* Or for the fastidious:
* - id(new ReleephSummaryFieldSpecification())
* ->setReleephRequest($rr)
* ->getValue() // programmatic equivalent to getDetail()
*/
throw new Exception(
"getSummary() has been deprecated!");
}
/**
* Allow a null summary, and fall back to the title of the commit.
*/
public function getSummaryForDisplay() {
$summary = $this->getDetail('summary');
if (!$summary) {
$pr_commit_data = $this->loadPhabricatorRepositoryCommitData();
if ($pr_commit_data) {
$message_lines = explode("\n", $pr_commit_data->getCommitMessage());
$message_lines = array_filter($message_lines);
$summary = head($message_lines);
}
}
if (!$summary) {
$summary = '(no summary given and commit message empty or unparsed)';
}
return $summary;
}
public function loadRequestCommitDiffPHID() {
$commit = $this->loadPhabricatorRepositoryCommit();
if ($commit) {
$edges = $this
->loadPhabricatorRepositoryCommit()
->loadRelativeEdges(PhabricatorEdgeConfig::TYPE_COMMIT_HAS_DREV);
return head(array_keys($edges));
}
}
/* -( Loading external objects )------------------------------------------- */
public function loadReleephBranch() {
return $this->loadOneRelative(
new ReleephBranch(),
'id',
'getBranchID');
}
public function loadReleephProject() {
return $this->loadReleephBranch()->loadReleephProject();
}
public function loadEvents() {
return $this->loadRelatives(
new ReleephRequestEvent(),
'releephRequestID',
'getID',
'(1 = 1) ORDER BY dateCreated, id');
}
public function loadPhabricatorRepositoryCommit() {
return $this->loadOneRelative(
new PhabricatorRepositoryCommit(),
'phid',
'getRequestCommitPHID');
}
public function loadPhabricatorRepositoryCommitData() {
- return $this->loadOneRelative(
- new PhabricatorRepositoryCommitData(),
- 'commitID',
- 'getRequestCommitOrdinal');
+ $commit = $this->loadPhabricatorRepositoryCommit();
+ if ($commit) {
+ return $commit->loadOneRelative(
+ new PhabricatorRepositoryCommitData(),
+ 'commitID');
+ }
}
public function loadDifferentialRevision() {
$diff_phid = $this->loadRequestCommitDiffPHID();
if (!$diff_phid) {
return null;
}
return $this->loadOneRelative(
new DifferentialRevision(),
'phid',
'loadRequestCommitDiffPHID');
}
/* -( State change helpers )----------------------------------------------- */
public function setUserIntent(PhabricatorUser $user, $intent) {
$this->userIntents[$user->getPHID()] = $intent;
return $this;
}
/* -( Migrating to status-less ReleephRequests )--------------------------- */
protected function didReadData() {
if ($this->userIntents === null) {
$this->userIntents = array();
}
}
public function setStatus($value) {
throw new Exception('`status` is now deprecated!');
}
/* -( Make magic Lisk methods private )------------------------------------ */
private function setUserIntents(array $ar) {
return parent::setUserIntents($ar);
}
}
diff --git a/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php b/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php
index 74762e901..c17ffd3d2 100644
--- a/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php
+++ b/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php
@@ -1,1275 +1,1279 @@
<?php
final class PhabricatorBuiltinPatchList extends PhabricatorSQLPatchList {
public function getNamespace() {
return 'phabricator';
}
private function getPatchPath($file) {
$root = dirname(phutil_get_library_root('phabricator'));
$path = $root.'/resources/sql/patches/'.$file;
// Make sure it exists.
Filesystem::readFile($path);
return $path;
}
public function getPatches() {
return array(
'db.audit' => array(
'type' => 'db',
'name' => 'audit',
'after' => array( /* First Patch */ ),
),
'db.calendar' => array(
'type' => 'db',
'name' => 'calendar',
),
'db.chatlog' => array(
'type' => 'db',
'name' => 'chatlog',
),
'db.conduit' => array(
'type' => 'db',
'name' => 'conduit',
),
'db.countdown' => array(
'type' => 'db',
'name' => 'countdown',
),
'db.daemon' => array(
'type' => 'db',
'name' => 'daemon',
),
'db.differential' => array(
'type' => 'db',
'name' => 'differential',
),
'db.draft' => array(
'type' => 'db',
'name' => 'draft',
),
'db.drydock' => array(
'type' => 'db',
'name' => 'drydock',
),
'db.feed' => array(
'type' => 'db',
'name' => 'feed',
),
'db.file' => array(
'type' => 'db',
'name' => 'file',
),
'db.flag' => array(
'type' => 'db',
'name' => 'flag',
),
'db.harbormaster' => array(
'type' => 'db',
'name' => 'harbormaster',
),
'db.herald' => array(
'type' => 'db',
'name' => 'herald',
),
'db.maniphest' => array(
'type' => 'db',
'name' => 'maniphest',
),
'db.meta_data' => array(
'type' => 'db',
'name' => 'meta_data',
),
'db.metamta' => array(
'type' => 'db',
'name' => 'metamta',
),
'db.oauth_server' => array(
'type' => 'db',
'name' => 'oauth_server',
),
'db.owners' => array(
'type' => 'db',
'name' => 'owners',
),
'db.pastebin' => array(
'type' => 'db',
'name' => 'pastebin',
),
'db.phame' => array(
'type' => 'db',
'name' => 'phame',
),
'db.phriction' => array(
'type' => 'db',
'name' => 'phriction',
),
'db.project' => array(
'type' => 'db',
'name' => 'project',
),
'db.repository' => array(
'type' => 'db',
'name' => 'repository',
),
'db.search' => array(
'type' => 'db',
'name' => 'search',
),
'db.slowvote' => array(
'type' => 'db',
'name' => 'slowvote',
),
'db.timeline' => array(
'type' => 'db',
'name' => 'timeline',
),
'db.user' => array(
'type' => 'db',
'name' => 'user',
),
'db.worker' => array(
'type' => 'db',
'name' => 'worker',
),
'db.xhpastview' => array(
'type' => 'db',
'name' => 'xhpastview',
),
'db.cache' => array(
'type' => 'db',
'name' => 'cache',
),
'db.fact' => array(
'type' => 'db',
'name' => 'fact',
),
'db.ponder' => array(
'type' => 'db',
'name' => 'ponder',
),
'db.xhprof' => array(
'type' => 'db',
'name' => 'xhprof',
),
'db.pholio' => array(
'type' => 'db',
'name' => 'pholio',
),
'db.conpherence' => array(
'type' => 'db',
'name' => 'conpherence',
),
'db.config' => array(
'type' => 'db',
'name' => 'config',
),
'db.token' => array(
'type' => 'db',
'name' => 'token',
),
'db.releeph' => array(
'type' => 'db',
'name' => 'releeph',
),
'db.phlux' => array(
'type' => 'db',
'name' => 'phlux',
),
'db.phortune' => array(
'type' => 'db',
'name' => 'phortune',
),
'db.phrequent' => array(
'type' => 'db',
'name' => 'phrequent',
),
'0000.legacy.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('0000.legacy.sql'),
'legacy' => 0,
),
'000.project.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('000.project.sql'),
'legacy' => 0,
),
'001.maniphest_projects.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('001.maniphest_projects.sql'),
'legacy' => 1,
),
'002.oauth.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('002.oauth.sql'),
'legacy' => 2,
),
'003.more_oauth.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('003.more_oauth.sql'),
'legacy' => 3,
),
'004.daemonrepos.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('004.daemonrepos.sql'),
'legacy' => 4,
),
'005.workers.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('005.workers.sql'),
'legacy' => 5,
),
'006.repository.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('006.repository.sql'),
'legacy' => 6,
),
'007.daemonlog.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('007.daemonlog.sql'),
'legacy' => 7,
),
'008.repoopt.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('008.repoopt.sql'),
'legacy' => 8,
),
'009.repo_summary.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('009.repo_summary.sql'),
'legacy' => 9,
),
'010.herald.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('010.herald.sql'),
'legacy' => 10,
),
'011.badcommit.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('011.badcommit.sql'),
'legacy' => 11,
),
'012.dropphidtype.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('012.dropphidtype.sql'),
'legacy' => 12,
),
'013.commitdetail.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('013.commitdetail.sql'),
'legacy' => 13,
),
'014.shortcuts.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('014.shortcuts.sql'),
'legacy' => 14,
),
'015.preferences.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('015.preferences.sql'),
'legacy' => 15,
),
'016.userrealnameindex.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('016.userrealnameindex.sql'),
'legacy' => 16,
),
'017.sessionkeys.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('017.sessionkeys.sql'),
'legacy' => 17,
),
'018.owners.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('018.owners.sql'),
'legacy' => 18,
),
'019.arcprojects.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('019.arcprojects.sql'),
'legacy' => 19,
),
'020.pathcapital.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('020.pathcapital.sql'),
'legacy' => 20,
),
'021.xhpastview.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('021.xhpastview.sql'),
'legacy' => 21,
),
'022.differentialcommit.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('022.differentialcommit.sql'),
'legacy' => 22,
),
'023.dxkeys.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('023.dxkeys.sql'),
'legacy' => 23,
),
'024.mlistkeys.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('024.mlistkeys.sql'),
'legacy' => 24,
),
'025.commentopt.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('025.commentopt.sql'),
'legacy' => 25,
),
'026.diffpropkey.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('026.diffpropkey.sql'),
'legacy' => 26,
),
'027.metamtakeys.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('027.metamtakeys.sql'),
'legacy' => 27,
),
'028.systemagent.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('028.systemagent.sql'),
'legacy' => 28,
),
'029.cursors.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('029.cursors.sql'),
'legacy' => 29,
),
'030.imagemacro.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('030.imagemacro.sql'),
'legacy' => 30,
),
'031.workerrace.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('031.workerrace.sql'),
'legacy' => 31,
),
'032.viewtime.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('032.viewtime.sql'),
'legacy' => 32,
),
'033.privtest.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('033.privtest.sql'),
'legacy' => 33,
),
'034.savedheader.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('034.savedheader.sql'),
'legacy' => 34,
),
'035.proxyimage.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('035.proxyimage.sql'),
'legacy' => 35,
),
'036.mailkey.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('036.mailkey.sql'),
'legacy' => 36,
),
'037.setuptest.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('037.setuptest.sql'),
'legacy' => 37,
),
'038.admin.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('038.admin.sql'),
'legacy' => 38,
),
'039.userlog.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('039.userlog.sql'),
'legacy' => 39,
),
'040.transform.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('040.transform.sql'),
'legacy' => 40,
),
'041.heraldrepetition.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('041.heraldrepetition.sql'),
'legacy' => 41,
),
'042.commentmetadata.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('042.commentmetadata.sql'),
'legacy' => 42,
),
'043.pastebin.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('043.pastebin.sql'),
'legacy' => 43,
),
'044.countdown.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('044.countdown.sql'),
'legacy' => 44,
),
'045.timezone.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('045.timezone.sql'),
'legacy' => 45,
),
'046.conduittoken.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('046.conduittoken.sql'),
'legacy' => 46,
),
'047.projectstatus.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('047.projectstatus.sql'),
'legacy' => 47,
),
'048.relationshipkeys.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('048.relationshipkeys.sql'),
'legacy' => 48,
),
'049.projectowner.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('049.projectowner.sql'),
'legacy' => 49,
),
'050.taskdenormal.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('050.taskdenormal.sql'),
'legacy' => 50,
),
'051.projectfilter.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('051.projectfilter.sql'),
'legacy' => 51,
),
'052.pastelanguage.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('052.pastelanguage.sql'),
'legacy' => 52,
),
'053.feed.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('053.feed.sql'),
'legacy' => 53,
),
'054.subscribers.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('054.subscribers.sql'),
'legacy' => 54,
),
'055.add_author_to_files.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('055.add_author_to_files.sql'),
'legacy' => 55,
),
'056.slowvote.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('056.slowvote.sql'),
'legacy' => 56,
),
'057.parsecache.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('057.parsecache.sql'),
'legacy' => 57,
),
'058.missingkeys.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('058.missingkeys.sql'),
'legacy' => 58,
),
'059.engines.php' => array(
'type' => 'php',
'name' => $this->getPatchPath('059.engines.php'),
'legacy' => 59,
),
'060.phriction.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('060.phriction.sql'),
'legacy' => 60,
),
'061.phrictioncontent.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('061.phrictioncontent.sql'),
'legacy' => 61,
),
'062.phrictionmenu.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('062.phrictionmenu.sql'),
'legacy' => 62,
),
'063.pasteforks.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('063.pasteforks.sql'),
'legacy' => 63,
),
'064.subprojects.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('064.subprojects.sql'),
'legacy' => 64,
),
'065.sshkeys.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('065.sshkeys.sql'),
'legacy' => 65,
),
'066.phrictioncontent.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('066.phrictioncontent.sql'),
'legacy' => 66,
),
'067.preferences.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('067.preferences.sql'),
'legacy' => 67,
),
'068.maniphestauxiliarystorage.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('068.maniphestauxiliarystorage.sql'),
'legacy' => 68,
),
'069.heraldxscript.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('069.heraldxscript.sql'),
'legacy' => 69,
),
'070.differentialaux.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('070.differentialaux.sql'),
'legacy' => 70,
),
'071.contentsource.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('071.contentsource.sql'),
'legacy' => 71,
),
'072.blamerevert.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('072.blamerevert.sql'),
'legacy' => 72,
),
'073.reposymbols.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('073.reposymbols.sql'),
'legacy' => 73,
),
'074.affectedpath.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('074.affectedpath.sql'),
'legacy' => 74,
),
'075.revisionhash.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('075.revisionhash.sql'),
'legacy' => 75,
),
'076.indexedlanguages.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('076.indexedlanguages.sql'),
'legacy' => 76,
),
'077.originalemail.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('077.originalemail.sql'),
'legacy' => 77,
),
'078.nametoken.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('078.nametoken.sql'),
'legacy' => 78,
),
'079.nametokenindex.php' => array(
'type' => 'php',
'name' => $this->getPatchPath('079.nametokenindex.php'),
'legacy' => 79,
),
'080.filekeys.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('080.filekeys.sql'),
'legacy' => 80,
),
'081.filekeys.php' => array(
'type' => 'php',
'name' => $this->getPatchPath('081.filekeys.php'),
'legacy' => 81,
),
'082.xactionkey.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('082.xactionkey.sql'),
'legacy' => 82,
),
'083.dxviewtime.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('083.dxviewtime.sql'),
'legacy' => 83,
),
'084.pasteauthorkey.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('084.pasteauthorkey.sql'),
'legacy' => 84,
),
'085.packagecommitrelationship.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('085.packagecommitrelationship.sql'),
'legacy' => 85,
),
'086.formeraffil.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('086.formeraffil.sql'),
'legacy' => 86,
),
'087.phrictiondelete.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('087.phrictiondelete.sql'),
'legacy' => 87,
),
'088.audit.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('088.audit.sql'),
'legacy' => 88,
),
'089.projectwiki.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('089.projectwiki.sql'),
'legacy' => 89,
),
'090.forceuniqueprojectnames.php' => array(
'type' => 'php',
'name' => $this->getPatchPath('090.forceuniqueprojectnames.php'),
'legacy' => 90,
),
'091.uniqueslugkey.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('091.uniqueslugkey.sql'),
'legacy' => 91,
),
'092.dropgithubnotification.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('092.dropgithubnotification.sql'),
'legacy' => 92,
),
'093.gitremotes.php' => array(
'type' => 'php',
'name' => $this->getPatchPath('093.gitremotes.php'),
'legacy' => 93,
),
'094.phrictioncolumn.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('094.phrictioncolumn.sql'),
'legacy' => 94,
),
'095.directory.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('095.directory.sql'),
'legacy' => 95,
),
'096.filename.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('096.filename.sql'),
'legacy' => 96,
),
'097.heraldruletypes.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('097.heraldruletypes.sql'),
'legacy' => 97,
),
'098.heraldruletypemigration.php' => array(
'type' => 'php',
'name' => $this->getPatchPath('098.heraldruletypemigration.php'),
'legacy' => 98,
),
'099.drydock.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('099.drydock.sql'),
'legacy' => 99,
),
'100.projectxaction.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('100.projectxaction.sql'),
'legacy' => 100,
),
'101.heraldruleapplied.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('101.heraldruleapplied.sql'),
'legacy' => 101,
),
'102.heraldcleanup.php' => array(
'type' => 'php',
'name' => $this->getPatchPath('102.heraldcleanup.php'),
'legacy' => 102,
),
'103.heraldedithistory.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('103.heraldedithistory.sql'),
'legacy' => 103,
),
'104.searchkey.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('104.searchkey.sql'),
'legacy' => 104,
),
'105.mimetype.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('105.mimetype.sql'),
'legacy' => 105,
),
'106.chatlog.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('106.chatlog.sql'),
'legacy' => 106,
),
'107.oauthserver.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('107.oauthserver.sql'),
'legacy' => 107,
),
'108.oauthscope.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('108.oauthscope.sql'),
'legacy' => 108,
),
'109.oauthclientphidkey.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('109.oauthclientphidkey.sql'),
'legacy' => 109,
),
'110.commitaudit.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('110.commitaudit.sql'),
'legacy' => 110,
),
'111.commitauditmigration.php' => array(
'type' => 'php',
'name' => $this->getPatchPath('111.commitauditmigration.php'),
'legacy' => 111,
),
'112.oauthaccesscoderedirecturi.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('112.oauthaccesscoderedirecturi.sql'),
'legacy' => 112,
),
'113.lastreviewer.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('113.lastreviewer.sql'),
'legacy' => 113,
),
'114.auditrequest.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('114.auditrequest.sql'),
'legacy' => 114,
),
'115.prepareutf8.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('115.prepareutf8.sql'),
'legacy' => 115,
),
'116.utf8-backup-first-expect-wait.sql' => array(
'type' => 'sql',
'name' =>
$this->getPatchPath('116.utf8-backup-first-expect-wait.sql'),
'legacy' => 116,
),
'117.repositorydescription.php' => array(
'type' => 'php',
'name' => $this->getPatchPath('117.repositorydescription.php'),
'legacy' => 117,
),
'118.auditinline.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('118.auditinline.sql'),
'legacy' => 118,
),
'119.filehash.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('119.filehash.sql'),
'legacy' => 119,
),
'120.noop.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('120.noop.sql'),
'legacy' => 120,
),
'121.drydocklog.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('121.drydocklog.sql'),
'legacy' => 121,
),
'122.flag.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('122.flag.sql'),
'legacy' => 122,
),
'123.heraldrulelog.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('123.heraldrulelog.sql'),
'legacy' => 123,
),
'124.subpriority.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('124.subpriority.sql'),
'legacy' => 124,
),
'125.ipv6.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('125.ipv6.sql'),
'legacy' => 125,
),
'126.edges.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('126.edges.sql'),
'legacy' => 126,
),
'127.userkeybody.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('127.userkeybody.sql'),
'legacy' => 127,
),
'128.phabricatorcom.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('128.phabricatorcom.sql'),
'legacy' => 128,
),
'129.savedquery.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('129.savedquery.sql'),
'legacy' => 129,
),
'130.denormalrevisionquery.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('130.denormalrevisionquery.sql'),
'legacy' => 130,
),
'131.migraterevisionquery.php' => array(
'type' => 'php',
'name' => $this->getPatchPath('131.migraterevisionquery.php'),
'legacy' => 131,
),
'132.phame.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('132.phame.sql'),
'legacy' => 132,
),
'133.imagemacro.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('133.imagemacro.sql'),
'legacy' => 133,
),
'134.emptysearch.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('134.emptysearch.sql'),
'legacy' => 134,
),
'135.datecommitted.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('135.datecommitted.sql'),
'legacy' => 135,
),
'136.sex.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('136.sex.sql'),
'legacy' => 136,
),
'137.auditmetadata.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('137.auditmetadata.sql'),
'legacy' => 137,
),
'138.notification.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('138.notification.sql'),
),
'holidays.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('holidays.sql'),
),
'userstatus.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('userstatus.sql'),
),
'emailtable.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('emailtable.sql'),
),
'emailtableport.sql' => array(
'type' => 'php',
'name' => $this->getPatchPath('emailtableport.php'),
),
'emailtableremove.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('emailtableremove.sql'),
),
'phiddrop.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('phiddrop.sql'),
),
'testdatabase.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('testdatabase.sql'),
),
'ldapinfo.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('ldapinfo.sql'),
),
'threadtopic.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('threadtopic.sql'),
),
'usertranslation.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('usertranslation.sql'),
),
'differentialbookmarks.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('differentialbookmarks.sql'),
),
'harbormasterobject.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('harbormasterobject.sql'),
),
'markupcache.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('markupcache.sql'),
),
'maniphestxcache.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('maniphestxcache.sql'),
),
'migrate-maniphest-dependencies.php' => array(
'type' => 'php',
'name' => $this->getPatchPath('migrate-maniphest-dependencies.php'),
),
'migrate-differential-dependencies.php' => array(
'type' => 'php',
'name' => $this->getPatchPath(
'migrate-differential-dependencies.php'),
),
'phameblog.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('phameblog.sql'),
),
'migrate-maniphest-revisions.php' => array(
'type' => 'php',
'name' => $this->getPatchPath('migrate-maniphest-revisions.php'),
),
'daemonstatus.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('daemonstatus.sql'),
),
'symbolcontexts.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('symbolcontexts.sql'),
),
'migrate-project-edges.php' => array(
'type' => 'php',
'name' => $this->getPatchPath('migrate-project-edges.php'),
),
'fact-raw.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('fact-raw.sql'),
),
'ponder.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('ponder.sql')
),
'policy-project.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('policy-project.sql'),
),
'daemonstatuskey.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('daemonstatuskey.sql'),
),
'edgetype.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('edgetype.sql'),
),
'ponder-comments.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('ponder-comments.sql'),
),
'pastepolicy.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('pastepolicy.sql'),
),
'xhprof.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('xhprof.sql'),
),
'draft-metadata.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('draft-metadata.sql'),
),
'phamedomain.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('phamedomain.sql'),
),
'ponder-mailkey.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('ponder-mailkey.sql'),
),
'ponder-mailkey-populate.php' => array(
'type' => 'php',
'name' => $this->getPatchPath('ponder-mailkey-populate.php'),
),
'phamepolicy.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('phamepolicy.sql'),
),
'phameoneblog.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('phameoneblog.sql'),
),
'statustxt.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('statustxt.sql'),
),
'daemontaskarchive.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('daemontaskarchive.sql'),
),
'drydocktaskid.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('drydocktaskid.sql'),
),
'drydockresoucetype.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('drydockresourcetype.sql'),
),
'liskcounters.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('liskcounters.sql'),
),
'liskcounters.php' => array(
'type' => 'php',
'name' => $this->getPatchPath('liskcounters.php'),
),
'dropfileproxyimage.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('dropfileproxyimage.sql'),
),
'repository-lint.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('repository-lint.sql'),
),
'liskcounters-task.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('liskcounters-task.sql'),
),
'pholio.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('pholio.sql'),
),
'owners-exclude.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('owners-exclude.sql'),
),
'20121209.pholioxactions.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20121209.pholioxactions.sql'),
),
'20121209.xmacroadd.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20121209.xmacroadd.sql'),
),
'20121209.xmacromigrate.php' => array(
'type' => 'php',
'name' => $this->getPatchPath('20121209.xmacromigrate.php'),
),
'20121209.xmacromigratekey.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20121209.xmacromigratekey.sql'),
),
'20121220.generalcache.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20121220.generalcache.sql'),
),
'20121226.config.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20121226.config.sql'),
),
'20130101.confxaction.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130101.confxaction.sql'),
),
'20130102.metamtareceivedmailmessageidhash.sql' => array(
'type' => 'sql',
'name' =>
$this->getPatchPath('20130102.metamtareceivedmailmessageidhash.sql'),
),
'20130103.filemetadata.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130103.filemetadata.sql'),
),
'20130111.conpherence.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130111.conpherence.sql'),
),
'20130127.altheraldtranscript.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130127.altheraldtranscript.sql'),
),
'20130201.revisionunsubscribed.php' => array(
'type' => 'php',
'name' => $this->getPatchPath('20130201.revisionunsubscribed.php'),
),
'20130201.revisionunsubscribed.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130201.revisionunsubscribed.sql'),
),
'20130131.conpherencepics.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130131.conpherencepics.sql'),
),
'20130214.chatlogchannel.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130214.chatlogchannel.sql'),
),
'20130214.chatlogchannelid.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130214.chatlogchannelid.sql'),
),
'20130214.token.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130214.token.sql'),
),
'20130215.phabricatorfileaddttl.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130215.phabricatorfileaddttl.sql'),
),
'20130217.cachettl.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130217.cachettl.sql'),
),
'20130218.updatechannelid.php' => array(
'type' => 'php',
'name' => $this->getPatchPath('20130218.updatechannelid.php'),
),
'20130218.longdaemon.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130218.longdaemon.sql'),
),
'20130219.commitsummary.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130219.commitsummary.sql'),
),
'20130219.commitsummarymig.php' => array(
'type' => 'php',
'name' => $this->getPatchPath('20130219.commitsummarymig.php'),
),
'20130222.dropchannel.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130222.dropchannel.sql'),
),
'20130226.commitkey.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130226.commitkey.sql'),
),
'20131302.maniphestvalue.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20131302.maniphestvalue.sql'),
),
'20130304.lintauthor.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130304.lintauthor.sql'),
),
'releeph.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('releeph.sql'),
),
'20130319.phabricatorfileexplicitupload.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath(
'20130319.phabricatorfileexplicitupload.sql')
),
'20130319.conpherence.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130319.conpherence.sql'),
),
'20130320.phlux.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130320.phlux.sql'),
),
'20130317.phrictionedge.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130317.phrictionedge.sql'),
),
'20130321.token.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130321.token.sql'),
),
'20130310.xactionmeta.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130310.xactionmeta.sql'),
),
'20130322.phortune.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130322.phortune.sql'),
),
'20130323.phortunepayment.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130323.phortunepayment.sql'),
),
'20130324.phortuneproduct.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130324.phortuneproduct.sql'),
),
'20130330.phrequent.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130330.phrequent.sql'),
),
'20130403.conpherencecache.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130403.conpherencecache.sql'),
),
'20130403.conpherencecachemig.php' => array(
'type' => 'php',
'name' => $this->getPatchPath('20130403.conpherencecachemig.php'),
),
'20130409.commitdrev.php' => array(
'type' => 'php',
'name' => $this->getPatchPath('20130409.commitdrev.php'),
),
'20130417.externalaccount.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130417.externalaccount.sql'),
),
'20130423.updateexternalaccount.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130423.updateexternalaccount.sql'),
),
'20130423.phortunepaymentrevised.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130423.phortunepaymentrevised.sql'),
),
'20130423.conpherenceindices.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130423.conpherenceindices.sql'),
),
'20130426.search_savedquery.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130426.search_savedquery.sql'),
),
'20130502.countdownrevamp1.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130502.countdownrevamp1.sql'),
),
'20130502.countdownrevamp2.php' => array(
'type' => 'php',
'name' => $this->getPatchPath('20130502.countdownrevamp2.php'),
),
'20130502.countdownrevamp3.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130502.countdownrevamp3.sql'),
),
+ '20130507.releephrqsimplifycols.sql' => array(
+ 'type' => 'sql',
+ 'name' => $this->getPatchPath('20130507.releephrqsimplifycols.sql'),
+ ),
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Tue, Oct 7, 3:51 AM (1 d, 10 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
84/3a/48d2292378620ad0425ca26cbd13
Attached To
rPHAB Phabricator
Event Timeline
Log In to Comment