1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-15 10:00:55 +01:00

(stable) Promote 2017 Week 46

This commit is contained in:
epriestley 2017-11-18 06:51:14 -08:00
commit a9489fe5a1
7 changed files with 53 additions and 22 deletions

View file

@ -13,7 +13,7 @@ return array(
'core.pkg.js' => '4c79d74f', 'core.pkg.js' => '4c79d74f',
'darkconsole.pkg.js' => '1f9a31bc', 'darkconsole.pkg.js' => '1f9a31bc',
'differential.pkg.css' => '45951e9e', 'differential.pkg.css' => '45951e9e',
'differential.pkg.js' => 'ae6460e0', 'differential.pkg.js' => '500a75c5',
'diffusion.pkg.css' => 'a2d17c7d', 'diffusion.pkg.css' => 'a2d17c7d',
'diffusion.pkg.js' => '6134c5a1', 'diffusion.pkg.js' => '6134c5a1',
'favicon.ico' => '30672e08', 'favicon.ico' => '30672e08',
@ -396,7 +396,7 @@ return array(
'rsrc/js/application/dashboard/behavior-dashboard-query-panel-select.js' => '453c5375', 'rsrc/js/application/dashboard/behavior-dashboard-query-panel-select.js' => '453c5375',
'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => 'd4eecc63', 'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => 'd4eecc63',
'rsrc/js/application/diff/DiffChangeset.js' => '99abf4cd', 'rsrc/js/application/diff/DiffChangeset.js' => '99abf4cd',
'rsrc/js/application/diff/DiffChangesetList.js' => '8f1cd52c', 'rsrc/js/application/diff/DiffChangesetList.js' => '3b77efdd',
'rsrc/js/application/diff/DiffInline.js' => 'e83d28f3', 'rsrc/js/application/diff/DiffInline.js' => 'e83d28f3',
'rsrc/js/application/diff/behavior-preview-link.js' => '051c7832', 'rsrc/js/application/diff/behavior-preview-link.js' => '051c7832',
'rsrc/js/application/differential/behavior-comment-preview.js' => '51c5ad07', 'rsrc/js/application/differential/behavior-comment-preview.js' => '51c5ad07',
@ -775,7 +775,7 @@ return array(
'phabricator-darkmessage' => 'c48cccdd', 'phabricator-darkmessage' => 'c48cccdd',
'phabricator-dashboard-css' => 'fe5b1869', 'phabricator-dashboard-css' => 'fe5b1869',
'phabricator-diff-changeset' => '99abf4cd', 'phabricator-diff-changeset' => '99abf4cd',
'phabricator-diff-changeset-list' => '8f1cd52c', 'phabricator-diff-changeset-list' => '3b77efdd',
'phabricator-diff-inline' => 'e83d28f3', 'phabricator-diff-inline' => 'e83d28f3',
'phabricator-drag-and-drop-file-upload' => '58dea2fa', 'phabricator-drag-and-drop-file-upload' => '58dea2fa',
'phabricator-draggable-list' => 'bea6e7f4', 'phabricator-draggable-list' => 'bea6e7f4',
@ -1137,6 +1137,10 @@ return array(
'javelin-dom', 'javelin-dom',
'javelin-magical-init', 'javelin-magical-init',
), ),
'3b77efdd' => array(
'javelin-install',
'phuix-button-view',
),
'3cb0b2fc' => array( '3cb0b2fc' => array(
'javelin-behavior', 'javelin-behavior',
'javelin-dom', 'javelin-dom',
@ -1610,10 +1614,6 @@ return array(
'8e1baf68' => array( '8e1baf68' => array(
'phui-button-css', 'phui-button-css',
), ),
'8f1cd52c' => array(
'javelin-install',
'phuix-button-view',
),
'8f29b364' => array( '8f29b364' => array(
'javelin-behavior', 'javelin-behavior',
'javelin-stratcom', 'javelin-stratcom',

View file

@ -35,16 +35,19 @@ $args->parse(
$parser = new MimeMailParser(); $parser = new MimeMailParser();
$parser->setText(file_get_contents('php://stdin')); $parser->setText(file_get_contents('php://stdin'));
$text_body = $parser->getMessageBody('text'); $content = array();
foreach (array('text', 'html') as $part) {
$text_body_headers = $parser->getMessageBodyHeaders('text'); $part_body = $parser->getMessageBody($part);
$content_type = idx($text_body_headers, 'content-type'); $part_headers = $parser->getMessageBodyHeaders($part);
$content_type = idx($part_headers, 'content-type');
if ( if (
!phutil_is_utf8($text_body) && !phutil_is_utf8($part_body) &&
(preg_match('/charset="(.*?)"/', $content_type, $matches) || (preg_match('/charset="(.*?)"/', $content_type, $matches) ||
preg_match('/charset=(\S+)/', $content_type, $matches)) preg_match('/charset=(\S+)/', $content_type, $matches))
) { ) {
$text_body = phutil_utf8_convert($text_body, 'UTF-8', $matches[1]); $part_body = phutil_utf8_convert($part_body, 'UTF-8', $matches[1]);
}
$content[$part] = $part_body;
} }
$headers = $parser->getHeaders(); $headers = $parser->getHeaders();
@ -57,10 +60,7 @@ if ($args->getArg('process-duplicates')) {
$received = new PhabricatorMetaMTAReceivedMail(); $received = new PhabricatorMetaMTAReceivedMail();
$received->setHeaders($headers); $received->setHeaders($headers);
$received->setBodies(array( $received->setBodies($content);
'text' => $text_body,
'html' => $parser->getMessageBody('html'),
));
$attachments = array(); $attachments = array();
foreach ($parser->getAttachments() as $attachment) { foreach ($parser->getAttachments() as $attachment) {

View file

@ -86,6 +86,7 @@ EOHELP
array( array(
'/\.py$/', '/\.py$/',
'/\.l?hs$/', '/\.l?hs$/',
'/\.ya?ml$/',
)) ))
->setDescription( ->setDescription(
pht( pht(

View file

@ -301,6 +301,9 @@ final class DifferentialChangesetListView extends AphrontView {
'Hide or show all inline comments.' => 'Hide or show all inline comments.' =>
pht('Hide or show all inline comments.'), pht('Hide or show all inline comments.'),
'Finish editing inline comments before changing display modes.' =>
pht('Finish editing inline comments before changing display modes.'),
), ),
)); ));

View file

@ -16,6 +16,15 @@ final class DifferentialRevisionHoldDraftTransaction
public function applyInternalEffects($object, $value) { public function applyInternalEffects($object, $value) {
$object->setHoldAsDraft($value); $object->setHoldAsDraft($value);
// If draft isn't the default state but we're creating a new revision
// and holding it as a draft, put it in draft mode. See PHI206.
// TODO: This can probably be removed once Draft is the universal default.
if ($this->isNewObject()) {
if ($object->isNeedsReview()) {
$object->setModernRevisionStatus(DifferentialRevisionStatus::DRAFT);
}
}
} }
public function getTitle() { public function getTitle() {

View file

@ -425,6 +425,7 @@ final class PhabricatorRepositoryQuery
'type' => 'string', 'type' => 'string',
'unique' => true, 'unique' => true,
'reverse' => true, 'reverse' => true,
'null' => 'tail',
), ),
'name' => array( 'name' => array(
'table' => 'r', 'table' => 'r',

View file

@ -465,7 +465,7 @@ JX.install('DiffChangesetList', {
new JX.Notification() new JX.Notification()
.setContent(message) .setContent(message)
.alterClassName('jx-notification-alert', true) .alterClassName('jx-notification-alert', true)
.setDuration(1000) .setDuration(3000)
.show(); .show();
}, },
@ -691,6 +691,7 @@ JX.install('DiffChangesetList', {
'div', 'div',
'differential-changeset'); 'differential-changeset');
var changeset_list = this;
var changeset = this.getChangesetForNode(node); var changeset = this.getChangesetForNode(node);
var menu = new JX.PHUIXDropdownMenu(button); var menu = new JX.PHUIXDropdownMenu(button);
@ -738,6 +739,22 @@ JX.install('DiffChangesetList', {
var up_item = new JX.PHUIXActionView() var up_item = new JX.PHUIXActionView()
.setHandler(function(e) { .setHandler(function(e) {
if (changeset.isLoaded()) { if (changeset.isLoaded()) {
// Don't let the user swap display modes if a comment is being
// edited, since they might lose their work. See PHI180.
var inlines = changeset.getInlines();
for (var ii = 0; ii < inlines.length; ii++) {
if (inlines[ii].isEditing()) {
changeset_list._warnUser(
pht(
'Finish editing inline comments before changing display ' +
'modes.'));
e.prevent();
menu.close();
return;
}
}
var renderer = changeset.getRenderer(); var renderer = changeset.getRenderer();
if (renderer == '1up') { if (renderer == '1up') {
renderer = '2up'; renderer = '2up';