mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-18 19:40:55 +01:00
Show a more tailored message when adding empty files
Summary: Fixes T6695. Tailor this message. Test Plan: {F333305} Reviewers: btrahan, chad Reviewed By: chad Subscribers: epriestley Maniphest Tasks: T6695 Differential Revision: https://secure.phabricator.com/D12022
This commit is contained in:
parent
b7be4ccca1
commit
10a84d66db
5 changed files with 62 additions and 39 deletions
|
@ -10,8 +10,8 @@ return array(
|
|||
'core.pkg.css' => '70320e8a',
|
||||
'core.pkg.js' => '5a1c336d',
|
||||
'darkconsole.pkg.js' => '8ab24e01',
|
||||
'differential.pkg.css' => '5f5d3a4c',
|
||||
'differential.pkg.js' => '6b52883b',
|
||||
'differential.pkg.css' => '1940be3f',
|
||||
'differential.pkg.js' => '2b14c4a1',
|
||||
'diffusion.pkg.css' => '591664fa',
|
||||
'diffusion.pkg.js' => 'bfc0737b',
|
||||
'maniphest.pkg.css' => '68d4dd3d',
|
||||
|
@ -55,7 +55,7 @@ return array(
|
|||
'rsrc/css/application/dashboard/dashboard.css' => '17937d22',
|
||||
'rsrc/css/application/diff/inline-comment-summary.css' => 'eb5f8e8c',
|
||||
'rsrc/css/application/differential/add-comment.css' => 'c478bcaa',
|
||||
'rsrc/css/application/differential/changeset-view.css' => 'f9011399',
|
||||
'rsrc/css/application/differential/changeset-view.css' => '6a8b172a',
|
||||
'rsrc/css/application/differential/core.css' => '7ac3cabc',
|
||||
'rsrc/css/application/differential/results-table.css' => '181aa9d9',
|
||||
'rsrc/css/application/differential/revision-comment.css' => '48186045',
|
||||
|
@ -360,14 +360,14 @@ return array(
|
|||
'rsrc/js/application/dashboard/behavior-dashboard-move-panels.js' => '82439934',
|
||||
'rsrc/js/application/dashboard/behavior-dashboard-query-panel-select.js' => '453c5375',
|
||||
'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => 'd4eecc63',
|
||||
'rsrc/js/application/differential/ChangesetViewManager.js' => 'fce415a0',
|
||||
'rsrc/js/application/differential/DifferentialInlineCommentEditor.js' => '41060c54',
|
||||
'rsrc/js/application/differential/ChangesetViewManager.js' => 'a9af1212',
|
||||
'rsrc/js/application/differential/DifferentialInlineCommentEditor.js' => 'd3aa4b40',
|
||||
'rsrc/js/application/differential/behavior-add-reviewers-and-ccs.js' => 'e10f8e18',
|
||||
'rsrc/js/application/differential/behavior-comment-jump.js' => '4fdb476d',
|
||||
'rsrc/js/application/differential/behavior-comment-preview.js' => '6932def3',
|
||||
'rsrc/js/application/differential/behavior-diff-radios.js' => 'e1ff79b1',
|
||||
'rsrc/js/application/differential/behavior-dropdown-menus.js' => '2035b9cb',
|
||||
'rsrc/js/application/differential/behavior-edit-inline-comments.js' => '1360cac8',
|
||||
'rsrc/js/application/differential/behavior-edit-inline-comments.js' => '7378d48a',
|
||||
'rsrc/js/application/differential/behavior-keyboard-nav.js' => '2c426492',
|
||||
'rsrc/js/application/differential/behavior-populate.js' => '8694b1df',
|
||||
'rsrc/js/application/differential/behavior-show-field-details.js' => 'bba9eedf',
|
||||
|
@ -509,7 +509,7 @@ return array(
|
|||
'aphront-two-column-view-css' => '16ab3ad2',
|
||||
'aphront-typeahead-control-css' => '0e403212',
|
||||
'auth-css' => '1e655982',
|
||||
'changeset-view-manager' => 'fce415a0',
|
||||
'changeset-view-manager' => 'a9af1212',
|
||||
'config-options-css' => '7fedf08b',
|
||||
'config-welcome-css' => '6abd79be',
|
||||
'conpherence-durable-column-view' => '1ef6ae75',
|
||||
|
@ -518,9 +518,9 @@ return array(
|
|||
'conpherence-notification-css' => '04a6e10a',
|
||||
'conpherence-update-css' => '1099a660',
|
||||
'conpherence-widget-pane-css' => '3d575438',
|
||||
'differential-changeset-view-css' => 'f9011399',
|
||||
'differential-changeset-view-css' => '6a8b172a',
|
||||
'differential-core-view-css' => '7ac3cabc',
|
||||
'differential-inline-comment-editor' => '41060c54',
|
||||
'differential-inline-comment-editor' => 'd3aa4b40',
|
||||
'differential-results-table-css' => '181aa9d9',
|
||||
'differential-revision-add-comment-css' => 'c478bcaa',
|
||||
'differential-revision-comment-css' => '48186045',
|
||||
|
@ -569,7 +569,7 @@ return array(
|
|||
'javelin-behavior-differential-comment-jump' => '4fdb476d',
|
||||
'javelin-behavior-differential-diff-radios' => 'e1ff79b1',
|
||||
'javelin-behavior-differential-dropdown-menus' => '2035b9cb',
|
||||
'javelin-behavior-differential-edit-inline-comments' => '1360cac8',
|
||||
'javelin-behavior-differential-edit-inline-comments' => '7378d48a',
|
||||
'javelin-behavior-differential-feedback-preview' => '6932def3',
|
||||
'javelin-behavior-differential-keyboard-navigation' => '2c426492',
|
||||
'javelin-behavior-differential-populate' => '8694b1df',
|
||||
|
@ -889,14 +889,6 @@ return array(
|
|||
'javelin-install',
|
||||
'javelin-util',
|
||||
),
|
||||
'1360cac8' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-stratcom',
|
||||
'javelin-dom',
|
||||
'javelin-util',
|
||||
'javelin-vector',
|
||||
'differential-inline-comment-editor',
|
||||
),
|
||||
'13c739ea' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-stratcom',
|
||||
|
@ -1079,14 +1071,6 @@ return array(
|
|||
'phuix-action-list-view',
|
||||
'phuix-action-view',
|
||||
),
|
||||
'41060c54' => array(
|
||||
'javelin-dom',
|
||||
'javelin-util',
|
||||
'javelin-stratcom',
|
||||
'javelin-install',
|
||||
'javelin-request',
|
||||
'javelin-workflow',
|
||||
),
|
||||
42126667 => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
|
@ -1332,6 +1316,14 @@ return array(
|
|||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
),
|
||||
'7378d48a' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-stratcom',
|
||||
'javelin-dom',
|
||||
'javelin-util',
|
||||
'javelin-vector',
|
||||
'differential-inline-comment-editor',
|
||||
),
|
||||
'73d09eef' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-vector',
|
||||
|
@ -1637,6 +1629,16 @@ return array(
|
|||
'javelin-uri',
|
||||
'phabricator-keyboard-shortcut',
|
||||
),
|
||||
'a9af1212' => array(
|
||||
'javelin-dom',
|
||||
'javelin-util',
|
||||
'javelin-stratcom',
|
||||
'javelin-install',
|
||||
'javelin-workflow',
|
||||
'javelin-router',
|
||||
'javelin-behavior-device',
|
||||
'javelin-vector',
|
||||
),
|
||||
'a9f88de2' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
|
@ -1762,6 +1764,14 @@ return array(
|
|||
'javelin-quicksand',
|
||||
'phabricator-keyboard-shortcut',
|
||||
),
|
||||
'd3aa4b40' => array(
|
||||
'javelin-dom',
|
||||
'javelin-util',
|
||||
'javelin-stratcom',
|
||||
'javelin-install',
|
||||
'javelin-request',
|
||||
'javelin-workflow',
|
||||
),
|
||||
'd4a14807' => array(
|
||||
'javelin-install',
|
||||
'javelin-dom',
|
||||
|
@ -1971,16 +1981,6 @@ return array(
|
|||
'javelin-dom',
|
||||
'phortune-credit-card-form',
|
||||
),
|
||||
'fce415a0' => array(
|
||||
'javelin-dom',
|
||||
'javelin-util',
|
||||
'javelin-stratcom',
|
||||
'javelin-install',
|
||||
'javelin-workflow',
|
||||
'javelin-router',
|
||||
'javelin-behavior-device',
|
||||
'javelin-vector',
|
||||
),
|
||||
'fe287620' => array(
|
||||
'javelin-install',
|
||||
'javelin-dom',
|
||||
|
|
3
src/applications/differential/__tests__/data/empty.diff
Normal file
3
src/applications/differential/__tests__/data/empty.diff
Normal file
|
@ -0,0 +1,3 @@
|
|||
diff --git a/empty b/empty
|
||||
new file mode 100644
|
||||
index 0000000..e69de29
|
|
@ -0,0 +1,5 @@
|
|||
CTYPE 1 1 (unforced)
|
||||
empty
|
||||
empty
|
||||
-
|
||||
SHIELD (none) This is an empty file.
|
|
@ -0,0 +1,5 @@
|
|||
CTYPE 1 1 (unforced)
|
||||
empty
|
||||
empty
|
||||
-
|
||||
SHIELD (none) This is an empty file.
|
|
@ -850,9 +850,19 @@ final class DifferentialChangesetParser {
|
|||
// we'll never have it so we need to be prepared to not render a link.
|
||||
$type = 'none';
|
||||
}
|
||||
|
||||
$type_add = DifferentialChangeType::TYPE_ADD;
|
||||
if ($this->changeset->getChangeType() == $type_add) {
|
||||
// Although the generic message is sort of accurate in a technical
|
||||
// sense, this more-tailored message is less confusing.
|
||||
$shield = $renderer->renderShield(
|
||||
pht('This is an empty file.'),
|
||||
$type);
|
||||
} else {
|
||||
$shield = $renderer->renderShield(
|
||||
pht('The contents of this file were not changed.'),
|
||||
$type);
|
||||
}
|
||||
} else if ($this->isWhitespaceOnly()) {
|
||||
$shield = $renderer->renderShield(
|
||||
pht('This file was changed only by adding or removing whitespace.'),
|
||||
|
|
Loading…
Reference in a new issue