@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+62 -39
+36 -36
resources/celerity/map.php
··· 10 10 'core.pkg.css' => '70320e8a', 11 11 'core.pkg.js' => '5a1c336d', 12 12 'darkconsole.pkg.js' => '8ab24e01', 13 - 'differential.pkg.css' => '5f5d3a4c', 14 - 'differential.pkg.js' => '6b52883b', 13 + 'differential.pkg.css' => '1940be3f', 14 + 'differential.pkg.js' => '2b14c4a1', 15 15 'diffusion.pkg.css' => '591664fa', 16 16 'diffusion.pkg.js' => 'bfc0737b', 17 17 'maniphest.pkg.css' => '68d4dd3d', ··· 55 55 'rsrc/css/application/dashboard/dashboard.css' => '17937d22', 56 56 'rsrc/css/application/diff/inline-comment-summary.css' => 'eb5f8e8c', 57 57 'rsrc/css/application/differential/add-comment.css' => 'c478bcaa', 58 - 'rsrc/css/application/differential/changeset-view.css' => 'f9011399', 58 + 'rsrc/css/application/differential/changeset-view.css' => '6a8b172a', 59 59 'rsrc/css/application/differential/core.css' => '7ac3cabc', 60 60 'rsrc/css/application/differential/results-table.css' => '181aa9d9', 61 61 'rsrc/css/application/differential/revision-comment.css' => '48186045', ··· 360 360 'rsrc/js/application/dashboard/behavior-dashboard-move-panels.js' => '82439934', 361 361 'rsrc/js/application/dashboard/behavior-dashboard-query-panel-select.js' => '453c5375', 362 362 'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => 'd4eecc63', 363 - 'rsrc/js/application/differential/ChangesetViewManager.js' => 'fce415a0', 364 - 'rsrc/js/application/differential/DifferentialInlineCommentEditor.js' => '41060c54', 363 + 'rsrc/js/application/differential/ChangesetViewManager.js' => 'a9af1212', 364 + 'rsrc/js/application/differential/DifferentialInlineCommentEditor.js' => 'd3aa4b40', 365 365 'rsrc/js/application/differential/behavior-add-reviewers-and-ccs.js' => 'e10f8e18', 366 366 'rsrc/js/application/differential/behavior-comment-jump.js' => '4fdb476d', 367 367 'rsrc/js/application/differential/behavior-comment-preview.js' => '6932def3', 368 368 'rsrc/js/application/differential/behavior-diff-radios.js' => 'e1ff79b1', 369 369 'rsrc/js/application/differential/behavior-dropdown-menus.js' => '2035b9cb', 370 - 'rsrc/js/application/differential/behavior-edit-inline-comments.js' => '1360cac8', 370 + 'rsrc/js/application/differential/behavior-edit-inline-comments.js' => '7378d48a', 371 371 'rsrc/js/application/differential/behavior-keyboard-nav.js' => '2c426492', 372 372 'rsrc/js/application/differential/behavior-populate.js' => '8694b1df', 373 373 'rsrc/js/application/differential/behavior-show-field-details.js' => 'bba9eedf', ··· 509 509 'aphront-two-column-view-css' => '16ab3ad2', 510 510 'aphront-typeahead-control-css' => '0e403212', 511 511 'auth-css' => '1e655982', 512 - 'changeset-view-manager' => 'fce415a0', 512 + 'changeset-view-manager' => 'a9af1212', 513 513 'config-options-css' => '7fedf08b', 514 514 'config-welcome-css' => '6abd79be', 515 515 'conpherence-durable-column-view' => '1ef6ae75', ··· 518 518 'conpherence-notification-css' => '04a6e10a', 519 519 'conpherence-update-css' => '1099a660', 520 520 'conpherence-widget-pane-css' => '3d575438', 521 - 'differential-changeset-view-css' => 'f9011399', 521 + 'differential-changeset-view-css' => '6a8b172a', 522 522 'differential-core-view-css' => '7ac3cabc', 523 - 'differential-inline-comment-editor' => '41060c54', 523 + 'differential-inline-comment-editor' => 'd3aa4b40', 524 524 'differential-results-table-css' => '181aa9d9', 525 525 'differential-revision-add-comment-css' => 'c478bcaa', 526 526 'differential-revision-comment-css' => '48186045', ··· 569 569 'javelin-behavior-differential-comment-jump' => '4fdb476d', 570 570 'javelin-behavior-differential-diff-radios' => 'e1ff79b1', 571 571 'javelin-behavior-differential-dropdown-menus' => '2035b9cb', 572 - 'javelin-behavior-differential-edit-inline-comments' => '1360cac8', 572 + 'javelin-behavior-differential-edit-inline-comments' => '7378d48a', 573 573 'javelin-behavior-differential-feedback-preview' => '6932def3', 574 574 'javelin-behavior-differential-keyboard-navigation' => '2c426492', 575 575 'javelin-behavior-differential-populate' => '8694b1df', ··· 889 889 'javelin-install', 890 890 'javelin-util', 891 891 ), 892 - '1360cac8' => array( 893 - 'javelin-behavior', 894 - 'javelin-stratcom', 895 - 'javelin-dom', 896 - 'javelin-util', 897 - 'javelin-vector', 898 - 'differential-inline-comment-editor', 899 - ), 900 892 '13c739ea' => array( 901 893 'javelin-behavior', 902 894 'javelin-stratcom', ··· 1078 1070 'phuix-dropdown-menu', 1079 1071 'phuix-action-list-view', 1080 1072 'phuix-action-view', 1081 - ), 1082 - '41060c54' => array( 1083 - 'javelin-dom', 1084 - 'javelin-util', 1085 - 'javelin-stratcom', 1086 - 'javelin-install', 1087 - 'javelin-request', 1088 - 'javelin-workflow', 1089 1073 ), 1090 1074 42126667 => array( 1091 1075 'javelin-behavior', ··· 1332 1316 'javelin-behavior', 1333 1317 'javelin-dom', 1334 1318 ), 1319 + '7378d48a' => array( 1320 + 'javelin-behavior', 1321 + 'javelin-stratcom', 1322 + 'javelin-dom', 1323 + 'javelin-util', 1324 + 'javelin-vector', 1325 + 'differential-inline-comment-editor', 1326 + ), 1335 1327 '73d09eef' => array( 1336 1328 'javelin-behavior', 1337 1329 'javelin-vector', ··· 1636 1628 'javelin-behavior', 1637 1629 'javelin-uri', 1638 1630 'phabricator-keyboard-shortcut', 1631 + ), 1632 + 'a9af1212' => array( 1633 + 'javelin-dom', 1634 + 'javelin-util', 1635 + 'javelin-stratcom', 1636 + 'javelin-install', 1637 + 'javelin-workflow', 1638 + 'javelin-router', 1639 + 'javelin-behavior-device', 1640 + 'javelin-vector', 1639 1641 ), 1640 1642 'a9f88de2' => array( 1641 1643 'javelin-behavior', ··· 1762 1764 'javelin-quicksand', 1763 1765 'phabricator-keyboard-shortcut', 1764 1766 ), 1767 + 'd3aa4b40' => array( 1768 + 'javelin-dom', 1769 + 'javelin-util', 1770 + 'javelin-stratcom', 1771 + 'javelin-install', 1772 + 'javelin-request', 1773 + 'javelin-workflow', 1774 + ), 1765 1775 'd4a14807' => array( 1766 1776 'javelin-install', 1767 1777 'javelin-dom', ··· 1970 1980 'javelin-behavior', 1971 1981 'javelin-dom', 1972 1982 'phortune-credit-card-form', 1973 - ), 1974 - 'fce415a0' => array( 1975 - 'javelin-dom', 1976 - 'javelin-util', 1977 - 'javelin-stratcom', 1978 - 'javelin-install', 1979 - 'javelin-workflow', 1980 - 'javelin-router', 1981 - 'javelin-behavior-device', 1982 - 'javelin-vector', 1983 1983 ), 1984 1984 'fe287620' => array( 1985 1985 'javelin-install',
+3
src/applications/differential/__tests__/data/empty.diff
··· 1 + diff --git a/empty b/empty 2 + new file mode 100644 3 + index 0000000..e69de29
+5
src/applications/differential/__tests__/data/empty.diff.one.expect
··· 1 + CTYPE 1 1 (unforced) 2 + empty 3 + empty 4 + - 5 + SHIELD (none) This is an empty file.
+5
src/applications/differential/__tests__/data/empty.diff.two.expect
··· 1 + CTYPE 1 1 (unforced) 2 + empty 3 + empty 4 + - 5 + SHIELD (none) This is an empty file.
+13 -3
src/applications/differential/parser/DifferentialChangesetParser.php
··· 850 850 // we'll never have it so we need to be prepared to not render a link. 851 851 $type = 'none'; 852 852 } 853 - $shield = $renderer->renderShield( 854 - pht('The contents of this file were not changed.'), 855 - $type); 853 + 854 + $type_add = DifferentialChangeType::TYPE_ADD; 855 + if ($this->changeset->getChangeType() == $type_add) { 856 + // Although the generic message is sort of accurate in a technical 857 + // sense, this more-tailored message is less confusing. 858 + $shield = $renderer->renderShield( 859 + pht('This is an empty file.'), 860 + $type); 861 + } else { 862 + $shield = $renderer->renderShield( 863 + pht('The contents of this file were not changed.'), 864 + $type); 865 + } 856 866 } else if ($this->isWhitespaceOnly()) { 857 867 $shield = $renderer->renderShield( 858 868 pht('This file was changed only by adding or removing whitespace.'),