Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14086513
D12022.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
8 KB
Referenced Files
None
Subscribers
None
D12022.diff
View Options
diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -10,8 +10,8 @@
'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 @@
'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 @@
'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 @@
'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 @@
'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 @@
'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 @@
'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 @@
'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 @@
'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 @@
'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 @@
'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 @@
'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',
diff --git a/src/applications/differential/__tests__/data/empty.diff b/src/applications/differential/__tests__/data/empty.diff
new file mode 100644
--- /dev/null
+++ b/src/applications/differential/__tests__/data/empty.diff
@@ -0,0 +1,3 @@
+diff --git a/empty b/empty
+new file mode 100644
+index 0000000..e69de29
diff --git a/src/applications/differential/__tests__/data/empty.diff.one.expect b/src/applications/differential/__tests__/data/empty.diff.one.expect
new file mode 100644
--- /dev/null
+++ b/src/applications/differential/__tests__/data/empty.diff.one.expect
@@ -0,0 +1,5 @@
+CTYPE 1 1 (unforced)
+empty
+empty
+-
+SHIELD (none) This is an empty file.
diff --git a/src/applications/differential/__tests__/data/empty.diff.two.expect b/src/applications/differential/__tests__/data/empty.diff.two.expect
new file mode 100644
--- /dev/null
+++ b/src/applications/differential/__tests__/data/empty.diff.two.expect
@@ -0,0 +1,5 @@
+CTYPE 1 1 (unforced)
+empty
+empty
+-
+SHIELD (none) This is an empty file.
diff --git a/src/applications/differential/parser/DifferentialChangesetParser.php b/src/applications/differential/parser/DifferentialChangesetParser.php
--- a/src/applications/differential/parser/DifferentialChangesetParser.php
+++ b/src/applications/differential/parser/DifferentialChangesetParser.php
@@ -850,9 +850,19 @@
// we'll never have it so we need to be prepared to not render a link.
$type = 'none';
}
- $shield = $renderer->renderShield(
- pht('The contents of this file were not changed.'),
- $type);
+
+ $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.'),
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 3:14 PM (20 h, 58 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6783276
Default Alt Text
D12022.diff (8 KB)
Attached To
Mode
D12022: Show a more tailored message when adding empty files
Attached
Detach File
Event Timeline
Log In to Comment