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

Merge the new navigation design

For discussion, see T5241.
This commit is contained in:
epriestley 2014-06-03 15:47:47 -07:00
commit 2264c2b4b5
25 changed files with 224 additions and 175 deletions

View file

@ -811,6 +811,10 @@ return array(
// only the submitter can close a revision.
'differential.always-allow-close' => false,
// If you set this to true, any user can abandon any revision. If false, only
// the submitter can abandon a revision.
'differential.always-allow-abandon' => false,
// If you set this to true, any user can reopen a revision so long as it has
// been closed. This can be useful if a revision is accidentally closed or
// if a developer changes his or her mind after closing a revision. If it is

View file

@ -7,8 +7,8 @@
return array(
'names' =>
array(
'core.pkg.css' => '30eeae90',
'core.pkg.js' => '7db41c19',
'core.pkg.css' => '2920014c',
'core.pkg.js' => '639b2433',
'darkconsole.pkg.js' => 'ca8671ce',
'differential.pkg.css' => 'fbf57382',
'differential.pkg.js' => '74cb0d29',
@ -135,7 +135,7 @@ return array(
'rsrc/css/phui/phui-info-panel.css' => '27ea50a1',
'rsrc/css/phui/phui-list.css' => '43ed2d93',
'rsrc/css/phui/phui-object-box.css' => 'ce92d8ec',
'rsrc/css/phui/phui-object-item-list-view.css' => '15c582b1',
'rsrc/css/phui/phui-object-item-list-view.css' => 'bd66015e',
'rsrc/css/phui/phui-pinboard-view.css' => '874c22f9',
'rsrc/css/phui/phui-property-list-view.css' => '2f7199e8',
'rsrc/css/phui/phui-remarkup-preview.css' => '19ad512b',
@ -343,7 +343,7 @@ return array(
'rsrc/image/texture/table_header_tall.png' => 'd56b434f',
'rsrc/js/application/aphlict/Aphlict.js' => '493665ee',
'rsrc/js/application/aphlict/behavior-aphlict-dropdown.js' => '2a2dba85',
'rsrc/js/application/aphlict/behavior-aphlict-listen.js' => '0a6c2de6',
'rsrc/js/application/aphlict/behavior-aphlict-listen.js' => '9aa97ab6',
'rsrc/js/application/auth/behavior-persona-login.js' => '9414ff18',
'rsrc/js/application/config/behavior-reorder-fields.js' => '938aed89',
'rsrc/js/application/conpherence/behavior-menu.js' => '7ee23816',
@ -459,7 +459,7 @@ return array(
'rsrc/js/core/behavior-keyboard-shortcuts.js' => 'd75709e6',
'rsrc/js/core/behavior-konami.js' => '5bc2cb21',
'rsrc/js/core/behavior-lightbox-attachments.js' => '3aa45ad9',
'rsrc/js/core/behavior-line-linker.js' => '0969ff43',
'rsrc/js/core/behavior-line-linker.js' => 'f726d506',
'rsrc/js/core/behavior-more.js' => '9b9197be',
'rsrc/js/core/behavior-object-selector.js' => 'e6f67523',
'rsrc/js/core/behavior-oncopy.js' => 'c3e218fe',
@ -532,7 +532,7 @@ return array(
'javelin-aphlict' => '493665ee',
'javelin-behavior' => '8a3ed18b',
'javelin-behavior-aphlict-dropdown' => '2a2dba85',
'javelin-behavior-aphlict-listen' => '0a6c2de6',
'javelin-behavior-aphlict-listen' => '9aa97ab6',
'javelin-behavior-aphront-basic-tokenizer' => 'b3a4b884',
'javelin-behavior-aphront-crop' => 'b98fc918',
'javelin-behavior-aphront-drag-and-drop-textarea' => '4a11ea9c',
@ -601,7 +601,7 @@ return array(
'javelin-behavior-phabricator-hovercards' => '9c808199',
'javelin-behavior-phabricator-keyboard-pager' => 'b657bdf8',
'javelin-behavior-phabricator-keyboard-shortcuts' => 'd75709e6',
'javelin-behavior-phabricator-line-linker' => '0969ff43',
'javelin-behavior-phabricator-line-linker' => 'f726d506',
'javelin-behavior-phabricator-nav' => 'b5842a5e',
'javelin-behavior-phabricator-notification-example' => 'c51a6616',
'javelin-behavior-phabricator-object-selector' => 'e6f67523',
@ -766,7 +766,7 @@ return array(
'phui-info-panel-css' => '27ea50a1',
'phui-list-view-css' => '43ed2d93',
'phui-object-box-css' => 'ce92d8ec',
'phui-object-item-list-view-css' => '15c582b1',
'phui-object-item-list-view-css' => 'bd66015e',
'phui-pinboard-view-css' => '874c22f9',
'phui-property-list-view-css' => '2f7199e8',
'phui-remarkup-preview-css' => '19ad512b',
@ -863,13 +863,6 @@ return array(
array(
0 => 'javelin-install',
),
'0969ff43' =>
array(
0 => 'javelin-behavior',
1 => 'javelin-stratcom',
2 => 'javelin-dom',
3 => 'javelin-history',
),
'09b15cf1' =>
array(
0 => 'javelin-stratcom',
@ -890,18 +883,6 @@ return array(
3 => 'javelin-dom',
4 => 'javelin-router',
),
'0a6c2de6' =>
array(
0 => 'javelin-behavior',
1 => 'javelin-aphlict',
2 => 'javelin-stratcom',
3 => 'javelin-request',
4 => 'javelin-uri',
5 => 'javelin-dom',
6 => 'javelin-json',
7 => 'javelin-router',
8 => 'phabricator-notification',
),
'0c33c1a0' =>
array(
0 => 'javelin-view',
@ -1270,13 +1251,6 @@ return array(
2 => 'javelin-util',
3 => 'phabricator-shaped-request',
),
'62e18640' =>
array(
0 => 'javelin-install',
1 => 'javelin-util',
2 => 'javelin-dom',
3 => 'javelin-typeahead-normalizer',
),
'6453c869' =>
array(
0 => 'javelin-install',
@ -1335,6 +1309,13 @@ return array(
0 => 'javelin-behavior',
1 => 'javelin-dom',
),
'62e18640' =>
array(
0 => 'javelin-install',
1 => 'javelin-util',
2 => 'javelin-dom',
3 => 'javelin-typeahead-normalizer',
),
'76f4ebed' =>
array(
0 => 'javelin-install',
@ -1532,6 +1513,18 @@ return array(
3 => 'javelin-dom',
4 => 'phabricator-draggable-list',
),
'9aa97ab6' =>
array(
0 => 'javelin-behavior',
1 => 'javelin-aphlict',
2 => 'javelin-stratcom',
3 => 'javelin-request',
4 => 'javelin-uri',
5 => 'javelin-dom',
6 => 'javelin-json',
7 => 'javelin-router',
8 => 'phabricator-notification',
),
'9b9197be' =>
array(
0 => 'javelin-behavior',
@ -2005,6 +1998,13 @@ return array(
2 => 'javelin-util',
3 => 'javelin-reactor',
),
'f726d506' =>
array(
0 => 'javelin-behavior',
1 => 'javelin-stratcom',
2 => 'javelin-dom',
3 => 'javelin-history',
),
'f7379f45' =>
array(
0 => 'javelin-behavior',

View file

@ -119,21 +119,21 @@ confirm
if [[ ! -e libphutil ]]
then
git clone git://github.com/phacility/libphutil.git
git clone https://github.com/phacility/libphutil.git
else
(cd libphutil && git pull --rebase)
fi
if [[ ! -e arcanist ]]
then
git clone git://github.com/phacility/arcanist.git
git clone https://github.com/phacility/arcanist.git
else
(cd arcanist && git pull --rebase)
fi
if [[ ! -e phabricator ]]
then
git clone git://github.com/phacility/phabricator.git
git clone https://github.com/phacility/phabricator.git
else
(cd phabricator && git pull --rebase)
fi

View file

@ -64,21 +64,21 @@ fi
if [ ! -e libphutil ]
then
git clone git://github.com/phacility/libphutil.git
git clone https://github.com/phacility/libphutil.git
else
(cd libphutil && git pull --rebase)
fi
if [ ! -e arcanist ]
then
git clone git://github.com/phacility/arcanist.git
git clone https://github.com/phacility/arcanist.git
else
(cd arcanist && git pull --rebase)
fi
if [ ! -e phabricator ]
then
git clone git://github.com/phacility/phabricator.git
git clone https://github.com/phacility/phabricator.git
else
(cd phabricator && git pull --rebase)
fi

View file

@ -2022,7 +2022,6 @@ phutil_register_library_map(array(
'PhabricatorRepositoryGraphStream' => 'applications/repository/daemon/PhabricatorRepositoryGraphStream.php',
'PhabricatorRepositoryListController' => 'applications/repository/controller/PhabricatorRepositoryListController.php',
'PhabricatorRepositoryManagementCacheWorkflow' => 'applications/repository/management/PhabricatorRepositoryManagementCacheWorkflow.php',
'PhabricatorRepositoryManagementDeleteWorkflow' => 'applications/repository/management/PhabricatorRepositoryManagementDeleteWorkflow.php',
'PhabricatorRepositoryManagementDiscoverWorkflow' => 'applications/repository/management/PhabricatorRepositoryManagementDiscoverWorkflow.php',
'PhabricatorRepositoryManagementEditWorkflow' => 'applications/repository/management/PhabricatorRepositoryManagementEditWorkflow.php',
'PhabricatorRepositoryManagementImportingWorkflow' => 'applications/repository/management/PhabricatorRepositoryManagementImportingWorkflow.php',
@ -4749,6 +4748,7 @@ phutil_register_library_map(array(
2 => 'PhabricatorPolicyInterface',
3 => 'PhabricatorSubscribableInterface',
4 => 'PhabricatorCustomFieldInterface',
5 => 'PhabricatorDestructableInterface',
),
'PhabricatorProjectArchiveController' => 'PhabricatorProjectController',
'PhabricatorProjectBoardController' => 'PhabricatorProjectController',
@ -4759,6 +4759,7 @@ phutil_register_library_map(array(
array(
0 => 'PhabricatorProjectDAO',
1 => 'PhabricatorPolicyInterface',
2 => 'PhabricatorDestructableInterface',
),
'PhabricatorProjectColumnDetailController' => 'PhabricatorProjectBoardController',
'PhabricatorProjectColumnQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
@ -4831,6 +4832,7 @@ phutil_register_library_map(array(
1 => 'PhabricatorPolicyInterface',
2 => 'PhabricatorFlaggableInterface',
3 => 'PhabricatorMarkupInterface',
4 => 'PhabricatorDestructableInterface',
),
'PhabricatorRepositoryArcanistProject' =>
array(
@ -4872,7 +4874,6 @@ phutil_register_library_map(array(
'PhabricatorRepositoryGraphStream' => 'Phobject',
'PhabricatorRepositoryListController' => 'PhabricatorRepositoryController',
'PhabricatorRepositoryManagementCacheWorkflow' => 'PhabricatorRepositoryManagementWorkflow',
'PhabricatorRepositoryManagementDeleteWorkflow' => 'PhabricatorRepositoryManagementWorkflow',
'PhabricatorRepositoryManagementDiscoverWorkflow' => 'PhabricatorRepositoryManagementWorkflow',
'PhabricatorRepositoryManagementEditWorkflow' => 'PhabricatorRepositoryManagementWorkflow',
'PhabricatorRepositoryManagementImportingWorkflow' => 'PhabricatorRepositoryManagementWorkflow',

View file

@ -165,6 +165,17 @@ final class PhabricatorDifferentialConfigOptions
"where the reviewer is often the actual committer can benefit ".
"from turning this option to true. If false, only the submitter ".
"can close a revision.")),
$this->newOption('differential.always-allow-abandon', 'bool', false)
->setBoolOptions(
array(
pht('Allow any user'),
pht('Restrict to submitter'),
))
->setSummary(pht('Allows any user to abandon revisions.'))
->setDescription(
pht(
'If you set this to true, any user can abandon any revision. If '.
'false, only the submitter can abandon a revision.')),
$this->newOption('differential.allow-reopen', 'bool', false)
->setBoolOptions(
array(

View file

@ -553,6 +553,8 @@ final class DifferentialRevisionViewController extends DifferentialController {
$allow_self_accept = PhabricatorEnv::getEnvConfig(
'differential.allow-self-accept');
$always_allow_abandon = PhabricatorEnv::getEnvConfig(
'differential.always-allow-abandon');
$always_allow_close = PhabricatorEnv::getEnvConfig(
'differential.always-allow-close');
$allow_reopen = PhabricatorEnv::getEnvConfig(
@ -586,17 +588,20 @@ final class DifferentialRevisionViewController extends DifferentialController {
} else {
switch ($status) {
case ArcanistDifferentialRevisionStatus::NEEDS_REVIEW:
$actions[DifferentialAction::ACTION_ABANDON] = $always_allow_abandon;
$actions[DifferentialAction::ACTION_ACCEPT] = true;
$actions[DifferentialAction::ACTION_REJECT] = true;
$actions[DifferentialAction::ACTION_RESIGN] = $viewer_is_reviewer;
break;
case ArcanistDifferentialRevisionStatus::NEEDS_REVISION:
case ArcanistDifferentialRevisionStatus::CHANGES_PLANNED:
$actions[DifferentialAction::ACTION_ABANDON] = $always_allow_abandon;
$actions[DifferentialAction::ACTION_ACCEPT] = true;
$actions[DifferentialAction::ACTION_REJECT] = !$viewer_has_rejected;
$actions[DifferentialAction::ACTION_RESIGN] = $viewer_is_reviewer;
break;
case ArcanistDifferentialRevisionStatus::ACCEPTED:
$actions[DifferentialAction::ACTION_ABANDON] = $always_allow_abandon;
$actions[DifferentialAction::ACTION_ACCEPT] = !$viewer_has_accepted;
$actions[DifferentialAction::ACTION_REJECT] = true;
$actions[DifferentialAction::ACTION_RESIGN] = $viewer_is_reviewer;

View file

@ -789,6 +789,9 @@ final class DifferentialTransactionEditor
$actor_phid = $this->getActor()->getPHID();
$actor_is_author = ($author_phid == $actor_phid);
$config_abandon_key = 'differential.always-allow-abandon';
$always_allow_abandon = PhabricatorEnv::getEnvConfig($config_abandon_key);
$config_close_key = 'differential.always-allow-close';
$always_allow_close = PhabricatorEnv::getEnvConfig($config_close_key);
@ -860,7 +863,7 @@ final class DifferentialTransactionEditor
break;
case DifferentialAction::ACTION_ABANDON:
if (!$actor_is_author) {
if (!$actor_is_author && !$always_allow_abandon) {
return pht(
"You can not abandon this revision because you do not own it. ".
"You can only abandon revisions you own.");

View file

@ -29,7 +29,7 @@ final class DiffusionRepositoryEditDeleteController
'If you really want to delete the repository, run this command from '.
'the command line:');
$command = csprintf(
'phabricator/ $ ./bin/repository delete %s',
'phabricator/ $ ./bin/remove destroy %s',
$repository->getCallsign());
$text_2 = pht('Repositories touch many objects and as such deletes are '.
'prohibitively expensive to run from the web UI.');

View file

@ -32,7 +32,7 @@ final class PhabricatorApplicationMetaMTA extends PhabricatorApplication {
public function getRoutes() {
return array(
$this->getBaseURI() => array(
'/mail/' => array(
'sendgrid/' => 'PhabricatorMetaMTASendGridReceiveController',
'mailgun/' => 'PhabricatorMetaMTAMailgunReceiveController',
),

View file

@ -75,7 +75,6 @@ final class PhrictionDocumentController
$vdate = phabricator_datetime($content->getDateCreated(), $user);
$version_note = new AphrontErrorView();
$version_note->setSeverity(AphrontErrorView::SEVERITY_NOTICE);
$version_note->setTitle('Older Version');
$version_note->appendChild(
pht('You are viewing an older version of this document, as it '.
'appeared on %s.', $vdate));
@ -126,9 +125,8 @@ final class PhrictionDocumentController
$slug_uri = PhrictionDocument::getSlugURI($new_doc->getSlug());
}
$notice = new AphrontErrorView();
$notice->setSeverity(AphrontErrorView::SEVERITY_NOTICE);
$notice->setTitle(pht('Document Moved'));
$notice = id(new AphrontErrorView())
->setSeverity(AphrontErrorView::SEVERITY_NOTICE);
if ($slug_uri) {
$notice->appendChild(
@ -159,22 +157,33 @@ final class PhrictionDocumentController
$move_notice = null;
if ($current_status == PhrictionChangeType::CHANGE_MOVE_HERE) {
$from_doc_id = $content->getChangeRef();
$from_doc = id(new PhrictionDocumentQuery())
$slug_uri = null;
// If the old document exists and is visible, provide a link to it.
$from_docs = id(new PhrictionDocumentQuery())
->setViewer($user)
->withIDs(array($from_doc_id))
->executeOne();
$slug_uri = PhrictionDocument::getSlugURI($from_doc->getSlug());
->execute();
if ($from_docs) {
$from_doc = head($from_docs);
$slug_uri = PhrictionDocument::getSlugURI($from_doc->getSlug());
}
$move_notice = id(new AphrontErrorView())
->setSeverity(AphrontErrorView::SEVERITY_NOTICE)
->appendChild(pht('This document was moved from %s',
phutil_tag('a', array('href' => $slug_uri), $slug_uri)))
->render();
}
}
->setSeverity(AphrontErrorView::SEVERITY_NOTICE);
if ($version_note) {
$version_note = $version_note->render();
if ($slug_uri) {
$move_notice->appendChild(
pht(
'This document was moved from %s.',
phutil_tag('a', array('href' => $slug_uri), $slug_uri)));
} else {
// Render this for consistency, even though it's a bit silly.
$move_notice->appendChild(
pht('This document was moved from elsewhere.'));
}
}
}
$children = $this->renderDocumentChildren($slug);
@ -204,6 +213,7 @@ final class PhrictionDocumentController
array(
$actions,
$prop_list,
$version_note,
$move_notice,
$core_content,
));

View file

@ -5,7 +5,8 @@ final class PhabricatorProject extends PhabricatorProjectDAO
PhabricatorFlaggableInterface,
PhabricatorPolicyInterface,
PhabricatorSubscribableInterface,
PhabricatorCustomFieldInterface {
PhabricatorCustomFieldInterface,
PhabricatorDestructableInterface {
protected $name;
protected $status = PhabricatorProjectStatus::STATUS_ACTIVE;
@ -247,4 +248,27 @@ final class PhabricatorProject extends PhabricatorProjectDAO
}
/* -( PhabricatorDestructableInterface )----------------------------------- */
public function destroyObjectPermanently(
PhabricatorDestructionEngine $engine) {
$this->openTransaction();
$this->delete();
$columns = id(new PhabricatorProjectColumn())
->loadAllWhere('projectPHID = %s', $this->getPHID());
foreach ($columns as $column) {
$engine->destroyObject($column);
}
$slugs = id(new PhabricatorProjectSlug())
->loadAllWhere('projectPHID = %s', $this->getPHID());
foreach ($slugs as $slug) {
$slug->delete();
}
$this->saveTransaction();
}
}

View file

@ -2,7 +2,8 @@
final class PhabricatorProjectColumn
extends PhabricatorProjectDAO
implements PhabricatorPolicyInterface {
implements PhabricatorPolicyInterface,
PhabricatorDestructableInterface {
const STATUS_ACTIVE = 0;
const STATUS_DELETED = 1;
@ -87,4 +88,15 @@ final class PhabricatorProjectColumn
return pht('Users must be able to see a project to see its board.');
}
/* -( PhabricatorDestructableInterface )----------------------------------- */
public function destroyObjectPermanently(
PhabricatorDestructionEngine $engine) {
$this->openTransaction();
$this->delete();
$this->saveTransaction();
}
}

View file

@ -29,7 +29,12 @@ final class PhabricatorGitGraphStream
if (!isset($this->parents[$commit])) {
$this->parseUntil($commit);
}
return $this->parents[$commit];
$parents = $this->parents[$commit];
// NOTE: In Git, it is possible for a commit to list the same parent more
// than once. See T5226. Discard duplicate parents.
return array_unique($parents);
}
public function getCommitDate($commit) {

View file

@ -1,64 +0,0 @@
<?php
final class PhabricatorRepositoryManagementDeleteWorkflow
extends PhabricatorRepositoryManagementWorkflow {
public function didConstruct() {
$this
->setName('delete')
->setExamples('**delete** __repository__ ...')
->setSynopsis('Delete __repository__, named by callsign.')
->setArguments(
array(
array(
'name' => 'verbose',
'help' => 'Show additional debugging information.',
),
array(
'name' => 'force',
'help' => 'Do not prompt for confirmation.',
),
array(
'name' => 'repos',
'wildcard' => true,
),
));
}
public function execute(PhutilArgumentParser $args) {
$repos = $this->loadRepositories($args, 'repos');
if (!$repos) {
throw new PhutilArgumentUsageException(
"Specify one or more repositories to delete, by callsign.");
}
$console = PhutilConsole::getConsole();
if (!$args->getArg('force')) {
$console->writeOut("%s\n\n", pht('These repositories will be deleted:'));
foreach ($repos as $repo) {
$console->writeOut(
" %s %s\n",
'r'.$repo->getCallsign(),
$repo->getName());
}
$prompt = pht('Permanently delete these repositories?');
if (!$console->confirm($prompt)) {
return 1;
}
}
foreach ($repos as $repo) {
$console->writeOut("Deleting '%s'...\n", $repo->getCallsign());
$repo->delete();
}
$console->writeOut("Done.\n");
return 0;
}
}

View file

@ -100,35 +100,50 @@ final class PhabricatorRepositoryManagementParentsWorkflow
$bar = id(new PhutilConsoleProgressBar())
->setTotal(count($graph));
$need = array();
foreach ($graph as $child => $parents) {
$names = $parents;
$names[] = $child;
foreach ($parents as $parent) {
$need[$parent] = $parent;
}
$need[$child] = $child;
}
$map = array();
foreach (array_chunk($need, 2048) as $chunk) {
$rows = queryfx_all(
$conn_w,
'SELECT id, commitIdentifier FROM %T
WHERE commitIdentifier IN (%Ls) AND repositoryID = %d',
$commit_table_name,
$names,
$chunk,
$repo->getID());
foreach ($rows as $row) {
$map[$row['commitIdentifier']] = $row['id'];
}
}
$insert_sql = array();
$delete_sql = array();
foreach ($graph as $child => $parents) {
$names = $parents;
$names[] = $child;
$map = ipull($rows, 'id', 'commitIdentifier');
foreach ($names as $name) {
if (empty($map[$name])) {
throw new Exception(pht('Unknown commit "%s"!', $name));
}
}
$sql = array();
if (!$parents) {
// Write an explicit 0 to indicate "no parents" instead of "no data".
$sql[] = qsprintf(
$insert_sql[] = qsprintf(
$conn_w,
'(%d, 0)',
$map[$child]);
} else {
foreach ($parents as $parent) {
$sql[] = qsprintf(
$insert_sql[] = qsprintf(
$conn_w,
'(%d, %d)',
$map[$child],
@ -136,25 +151,29 @@ final class PhabricatorRepositoryManagementParentsWorkflow
}
}
$commit_table->openTransaction();
queryfx(
$conn_w,
'DELETE FROM %T WHERE childCommitID = %d',
PhabricatorRepository::TABLE_PARENTS,
$map[$child]);
if ($sql) {
queryfx(
$conn_w,
'INSERT INTO %T (childCommitID, parentCommitID) VALUES %Q',
PhabricatorRepository::TABLE_PARENTS,
implode(', ', $sql));
}
$commit_table->saveTransaction();
$delete_sql[] = $map[$child];
$bar->update(1);
}
$commit_table->openTransaction();
foreach (PhabricatorLiskDAO::chunkSQL($delete_sql) as $chunk) {
queryfx(
$conn_w,
'DELETE FROM %T WHERE childCommitID IN (%Q)',
PhabricatorRepository::TABLE_PARENTS,
$chunk);
}
foreach (PhabricatorLiskDAO::chunkSQL($insert_sql) as $chunk) {
queryfx(
$conn_w,
'INSERT INTO %T (childCommitID, parentCommitID) VALUES %Q',
PhabricatorRepository::TABLE_PARENTS,
$chunk);
}
$commit_table->saveTransaction();
$bar->done();
}

View file

@ -7,7 +7,8 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO
implements
PhabricatorPolicyInterface,
PhabricatorFlaggableInterface,
PhabricatorMarkupInterface {
PhabricatorMarkupInterface,
PhabricatorDestructableInterface {
/**
* Shortest hash we'll recognize in raw "a829f32" form.
@ -1322,4 +1323,15 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO
return true;
}
/* -( PhabricatorDestructableInterface )----------------------------------- */
public function destroyObjectPermanently(
PhabricatorDestructionEngine $engine) {
$this->openTransaction();
$this->delete();
$this->saveTransaction();
}
}

View file

@ -62,8 +62,7 @@ final class PhabricatorSearchManagementIndexWorkflow
}
if (!$phids) {
throw new PhutilArgumentUsageException(
"Nothing to index!");
throw new PhutilArgumentUsageException('Nothing to index!');
}
if ($args->getArg('background')) {
@ -73,27 +72,31 @@ final class PhabricatorSearchManagementIndexWorkflow
$is_background = false;
}
if (!$is_background) {
$console->writeOut(
"%s\n",
pht(
'Run this workflow with "--background" to queue tasks for the '.
'daemon workers.'));
}
$groups = phid_group_by_type($phids);
foreach ($groups as $group_type => $group) {
$console->writeOut(
"%s\n",
pht(
"Indexing %d object(s) of type %s.",
count($group),
$group_type));
pht('Indexing %d object(s) of type %s.', count($group), $group_type));
}
$bar = id(new PhutilConsoleProgressBar())
->setTotal(count($phids));
$indexer = new PhabricatorSearchIndexer();
foreach ($phids as $phid) {
if ($is_background) {
$console->writeOut("%s\n", pht("Queueing '%s'...", $phid));
} else {
$console->writeOut("%s\n", pht("Indexing '%s'...", $phid));
}
$indexer->queueDocumentForIndexing($phid);
$bar->update(1);
}
$console->writeOut("Done.\n");
$bar->done();
}
private function loadPHIDsByNames(array $names) {

View file

@ -95,9 +95,9 @@ Now that you have all that stuff installed, grab Phabricator and its
dependencies:
$ cd somewhere/ # pick some install directory
somewhere/ $ git clone git://github.com/phacility/libphutil.git
somewhere/ $ git clone git://github.com/phacility/arcanist.git
somewhere/ $ git clone git://github.com/phacility/phabricator.git
somewhere/ $ git clone https://github.com/phacility/libphutil.git
somewhere/ $ git clone https://github.com/phacility/arcanist.git
somewhere/ $ git clone https://github.com/phacility/phabricator.git
= Installing APC (Optional) =

View file

@ -92,8 +92,8 @@ have PHP installed, you can download it from <http://www.php.net/>.
To install Arcanist, pick an install directory and clone the code from GitHub:
some_install_path/ $ git clone git://github.com/phacility/libphutil.git
some_install_path/ $ git clone git://github.com/phacility/arcanist.git
some_install_path/ $ git clone https://github.com/phacility/libphutil.git
some_install_path/ $ git clone https://github.com/phacility/arcanist.git
This should leave you with a directory structure like this

View file

@ -23,8 +23,8 @@ Then install Arcanist itself:
$ mkdir somewhere/
$ cd somewhere/
somewhere/ $ git clone git://github.com/phacility/libphutil.git
somewhere/ $ git clone git://github.com/phacility/arcanist.git
somewhere/ $ git clone https://github.com/phacility/libphutil.git
somewhere/ $ git clone https://github.com/phacility/arcanist.git
Add `arc` to your path:

View file

@ -12,8 +12,7 @@ set -e
$MXMLC \
-output=$ROOT/webroot/rsrc/swf/aphlict.swf \
-default-background-color=0x444444 \
-default-size=500,500 \
-strict=true \
-warnings=true \
-source-path=$ROOT/externals/vegas/src \
-static-link-runtime-shared-libraries=true \

View file

@ -659,9 +659,9 @@
margin-bottom: -1px;
}
.dashboard-panel .phui-object-list-cards .phui-object-item {
.dashboard-panel .phui-object-item-list-view .phui-object-item {
border-radius: 0;
margin-bottom: 0;
margin: 0;
background-image: none;
background-color: #fff;
border-left-width: 4px;

View file

@ -41,7 +41,6 @@ JX.behavior('aphlict-listen', function(config) {
new JX.Notification()
.setContent('(Aphlict) [' + type + '] ' + details)
.alterClassName('jx-notification-debug', true)
.setDuration(0)
.show();
}
}

View file

@ -10,7 +10,13 @@ JX.behavior('phabricator-line-linker', function() {
var origin = null;
var target = null;
var root = null;
var editor_link = JX.$('editor_link');
var editor_link = null;
try {
editor_link = JX.$('editor_link');
} catch (ex) {
// Ignore.
}
function getRowNumber(tr) {
var th = JX.DOM.find(tr, 'th', 'phabricator-source-line');