Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F88647
D7581.diff
All Users
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D7581.diff
View Options
diff --git a/src/applications/differential/field/specification/DifferentialUnitFieldSpecification.php b/src/applications/differential/field/specification/DifferentialUnitFieldSpecification.php
--- a/src/applications/differential/field/specification/DifferentialUnitFieldSpecification.php
+++ b/src/applications/differential/field/specification/DifferentialUnitFieldSpecification.php
@@ -70,8 +70,24 @@
$udata[$key]['sort'] = idx($sort_map, idx($test, 'result'));
}
$udata = isort($udata, 'sort');
-
- foreach ($udata as $test) {
+ $engine = new PhabricatorMarkupEngine();
+ $engine->setViewer($this->getUser());
+ $markup_objects = array();
+ foreach ($udata as $key => $test) {
+ $userdata = idx($test, 'userdata');
+ if ($userdata) {
+ if ($userdata !== false) {
+ $userdata = str_replace("\000", '', $userdata);
+ }
+ $markup_object = id(new PhabricatorMarkupOneOff())
+ ->setContent($userdata)
+ ->setPreserveLinebreaks(true);
+ $engine->addObject($markup_object, 'default');
+ $markup_objects[$key] = $markup_object;
+ }
+ }
+ $engine->process();
+ foreach ($udata as $key => $test) {
$result = idx($test, 'result');
$default_hide = false;
@@ -110,17 +126,10 @@
'show' => $show,
);
- $userdata = idx($test, 'userdata');
- if ($userdata) {
- if ($userdata !== false) {
- $userdata = str_replace("\000", '', $userdata);
- }
- $engine = PhabricatorMarkupEngine::newDifferentialMarkupEngine();
- $engine->setConfig('viewer', $this->getUser());
- $userdata = $engine->markupText($userdata);
+ if (isset($markup_objects[$key])) {
$rows[] = array(
'style' => 'details',
- 'value' => $userdata,
+ 'value' => $engine->getOutput($markup_objects[$key], 'default'),
'show' => false,
);
if (empty($hidden['details'])) {
diff --git a/src/infrastructure/markup/PhabricatorMarkupEngine.php b/src/infrastructure/markup/PhabricatorMarkupEngine.php
--- a/src/infrastructure/markup/PhabricatorMarkupEngine.php
+++ b/src/infrastructure/markup/PhabricatorMarkupEngine.php
@@ -242,7 +242,9 @@
}
foreach ($objects as $key => $info) {
- if (isset($blocks[$key])) {
+ // False check in case MySQL doesn't support unicode characters
+ // in the string (T1191), resulting in unserialize returning false.
+ if (isset($blocks[$key]) && $blocks[$key]->getCacheData() !== false) {
// If we already have a preprocessing cache, we don't need to rebuild
// it.
continue;
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/4q/sw/bd3meho63ga33b6w
Default Alt Text
D7581.diff (2 KB)
Attached To
Mode
D7581: Speed up loading of diffs with a lot of unit test failures
Attached
Detach File
Event Timeline
Log In to Comment