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

(stable) Promote 2017 Week 32

This commit is contained in:
epriestley 2017-08-11 06:21:06 -07:00
commit 5494df7228
57 changed files with 589 additions and 447 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View file

@ -9,7 +9,7 @@ return array(
'names' => array( 'names' => array(
'conpherence.pkg.css' => 'e68cf1fa', 'conpherence.pkg.css' => 'e68cf1fa',
'conpherence.pkg.js' => 'b5b51108', 'conpherence.pkg.js' => 'b5b51108',
'core.pkg.css' => 'cc0772c6', 'core.pkg.css' => '0e4a68ad',
'core.pkg.js' => '5d80e0db', 'core.pkg.js' => '5d80e0db',
'darkconsole.pkg.js' => '1f9a31bc', 'darkconsole.pkg.js' => '1f9a31bc',
'differential.pkg.css' => '45951e9e', 'differential.pkg.css' => '45951e9e',
@ -26,7 +26,7 @@ return array(
'rsrc/audio/basic/ting.mp3' => '17660001', 'rsrc/audio/basic/ting.mp3' => '17660001',
'rsrc/css/aphront/aphront-bars.css' => '231ac33c', 'rsrc/css/aphront/aphront-bars.css' => '231ac33c',
'rsrc/css/aphront/dark-console.css' => 'f7b071f1', 'rsrc/css/aphront/dark-console.css' => 'f7b071f1',
'rsrc/css/aphront/dialog-view.css' => '685c7e2d', 'rsrc/css/aphront/dialog-view.css' => '6bfc244b',
'rsrc/css/aphront/list-filter-view.css' => '5d6f0526', 'rsrc/css/aphront/list-filter-view.css' => '5d6f0526',
'rsrc/css/aphront/multi-column.css' => '84cc6640', 'rsrc/css/aphront/multi-column.css' => '84cc6640',
'rsrc/css/aphront/notification.css' => '3f6c89c9', 'rsrc/css/aphront/notification.css' => '3f6c89c9',
@ -42,7 +42,7 @@ return array(
'rsrc/css/application/base/main-menu-view.css' => '16053029', 'rsrc/css/application/base/main-menu-view.css' => '16053029',
'rsrc/css/application/base/notification-menu.css' => '73fefdfa', 'rsrc/css/application/base/notification-menu.css' => '73fefdfa',
'rsrc/css/application/base/phui-theme.css' => '9f261c6b', 'rsrc/css/application/base/phui-theme.css' => '9f261c6b',
'rsrc/css/application/base/standard-page-view.css' => 'a0dae682', 'rsrc/css/application/base/standard-page-view.css' => 'c581d2ac',
'rsrc/css/application/chatlog/chatlog.css' => 'd295b020', 'rsrc/css/application/chatlog/chatlog.css' => 'd295b020',
'rsrc/css/application/conduit/conduit-api.css' => '7bc725c4', 'rsrc/css/application/conduit/conduit-api.css' => '7bc725c4',
'rsrc/css/application/config/config-options.css' => 'd55ed093', 'rsrc/css/application/config/config-options.css' => 'd55ed093',
@ -127,7 +127,7 @@ return array(
'rsrc/css/layout/phabricator-source-code-view.css' => 'aea41829', 'rsrc/css/layout/phabricator-source-code-view.css' => 'aea41829',
'rsrc/css/phui/button/phui-button-bar.css' => 'f1ff5494', 'rsrc/css/phui/button/phui-button-bar.css' => 'f1ff5494',
'rsrc/css/phui/button/phui-button-simple.css' => '8e1baf68', 'rsrc/css/phui/button/phui-button-simple.css' => '8e1baf68',
'rsrc/css/phui/button/phui-button.css' => '3ca51caa', 'rsrc/css/phui/button/phui-button.css' => '340f55c1',
'rsrc/css/phui/calendar/phui-calendar-day.css' => '572b1893', 'rsrc/css/phui/calendar/phui-calendar-day.css' => '572b1893',
'rsrc/css/phui/calendar/phui-calendar-list.css' => '576be600', 'rsrc/css/phui/calendar/phui-calendar-list.css' => '576be600',
'rsrc/css/phui/calendar/phui-calendar-month.css' => '21154caf', 'rsrc/css/phui/calendar/phui-calendar-month.css' => '21154caf',
@ -149,13 +149,13 @@ return array(
'rsrc/css/phui/phui-comment-form.css' => 'ac68149f', 'rsrc/css/phui/phui-comment-form.css' => 'ac68149f',
'rsrc/css/phui/phui-comment-panel.css' => 'f50152ad', 'rsrc/css/phui/phui-comment-panel.css' => 'f50152ad',
'rsrc/css/phui/phui-crumbs-view.css' => '6ece3bbb', 'rsrc/css/phui/phui-crumbs-view.css' => '6ece3bbb',
'rsrc/css/phui/phui-curtain-view.css' => '55dd0e59', 'rsrc/css/phui/phui-curtain-view.css' => 'ca363f15',
'rsrc/css/phui/phui-document-pro.css' => '8af7ea27', 'rsrc/css/phui/phui-document-pro.css' => '8af7ea27',
'rsrc/css/phui/phui-document-summary.css' => '9ca48bdf', 'rsrc/css/phui/phui-document-summary.css' => '9ca48bdf',
'rsrc/css/phui/phui-document.css' => 'c32e8dec', 'rsrc/css/phui/phui-document.css' => 'c32e8dec',
'rsrc/css/phui/phui-feed-story.css' => '44a9c8e9', 'rsrc/css/phui/phui-feed-story.css' => '44a9c8e9',
'rsrc/css/phui/phui-fontkit.css' => '1320ed01', 'rsrc/css/phui/phui-fontkit.css' => '1320ed01',
'rsrc/css/phui/phui-form-view.css' => '6175808d', 'rsrc/css/phui/phui-form-view.css' => 'ae9f8d16',
'rsrc/css/phui/phui-form.css' => '7aaa04e3', 'rsrc/css/phui/phui-form.css' => '7aaa04e3',
'rsrc/css/phui/phui-head-thing.css' => 'fd311e5f', 'rsrc/css/phui/phui-head-thing.css' => 'fd311e5f',
'rsrc/css/phui/phui-header-view.css' => 'e7de7ee2', 'rsrc/css/phui/phui-header-view.css' => 'e7de7ee2',
@ -484,7 +484,7 @@ return array(
'rsrc/js/core/behavior-device.js' => 'bb1dd507', 'rsrc/js/core/behavior-device.js' => 'bb1dd507',
'rsrc/js/core/behavior-drag-and-drop-textarea.js' => '484a6e22', 'rsrc/js/core/behavior-drag-and-drop-textarea.js' => '484a6e22',
'rsrc/js/core/behavior-error-log.js' => '6882e80a', 'rsrc/js/core/behavior-error-log.js' => '6882e80a',
'rsrc/js/core/behavior-fancy-datepicker.js' => 'a9210d03', 'rsrc/js/core/behavior-fancy-datepicker.js' => 'ecf4e799',
'rsrc/js/core/behavior-file-tree.js' => '88236f00', 'rsrc/js/core/behavior-file-tree.js' => '88236f00',
'rsrc/js/core/behavior-form.js' => '5c54cbf3', 'rsrc/js/core/behavior-form.js' => '5c54cbf3',
'rsrc/js/core/behavior-gesture.js' => '3ab51e2c', 'rsrc/js/core/behavior-gesture.js' => '3ab51e2c',
@ -539,7 +539,7 @@ return array(
'almanac-css' => 'dbb9b3af', 'almanac-css' => 'dbb9b3af',
'aphront-bars' => '231ac33c', 'aphront-bars' => '231ac33c',
'aphront-dark-console-css' => 'f7b071f1', 'aphront-dark-console-css' => 'f7b071f1',
'aphront-dialog-view-css' => '685c7e2d', 'aphront-dialog-view-css' => '6bfc244b',
'aphront-list-filter-view-css' => '5d6f0526', 'aphront-list-filter-view-css' => '5d6f0526',
'aphront-multi-column-view-css' => '84cc6640', 'aphront-multi-column-view-css' => '84cc6640',
'aphront-panel-view-css' => '8427b78d', 'aphront-panel-view-css' => '8427b78d',
@ -633,7 +633,7 @@ return array(
'javelin-behavior-editengine-reorder-fields' => 'b59e1e96', 'javelin-behavior-editengine-reorder-fields' => 'b59e1e96',
'javelin-behavior-error-log' => '6882e80a', 'javelin-behavior-error-log' => '6882e80a',
'javelin-behavior-event-all-day' => 'b41537c9', 'javelin-behavior-event-all-day' => 'b41537c9',
'javelin-behavior-fancy-datepicker' => 'a9210d03', 'javelin-behavior-fancy-datepicker' => 'ecf4e799',
'javelin-behavior-global-drag-and-drop' => '960f6a39', 'javelin-behavior-global-drag-and-drop' => '960f6a39',
'javelin-behavior-herald-rule-editor' => '7ebaeed3', 'javelin-behavior-herald-rule-editor' => '7ebaeed3',
'javelin-behavior-high-security-warning' => 'a464fe03', 'javelin-behavior-high-security-warning' => 'a464fe03',
@ -802,7 +802,7 @@ return array(
'phabricator-shaped-request' => '7cbe244b', 'phabricator-shaped-request' => '7cbe244b',
'phabricator-slowvote-css' => 'a94b7230', 'phabricator-slowvote-css' => 'a94b7230',
'phabricator-source-code-view-css' => 'aea41829', 'phabricator-source-code-view-css' => 'aea41829',
'phabricator-standard-page-view' => 'a0dae682', 'phabricator-standard-page-view' => 'c581d2ac',
'phabricator-textareautils' => '320810c8', 'phabricator-textareautils' => '320810c8',
'phabricator-title' => '485aaa6c', 'phabricator-title' => '485aaa6c',
'phabricator-tooltip' => '358b8c04', 'phabricator-tooltip' => '358b8c04',
@ -824,7 +824,7 @@ return array(
'phui-big-info-view-css' => 'acc3492c', 'phui-big-info-view-css' => 'acc3492c',
'phui-box-css' => '745e881d', 'phui-box-css' => '745e881d',
'phui-button-bar-css' => 'f1ff5494', 'phui-button-bar-css' => 'f1ff5494',
'phui-button-css' => '3ca51caa', 'phui-button-css' => '340f55c1',
'phui-button-simple-css' => '8e1baf68', 'phui-button-simple-css' => '8e1baf68',
'phui-calendar-css' => 'f1ddf11c', 'phui-calendar-css' => 'f1ddf11c',
'phui-calendar-day-css' => '572b1893', 'phui-calendar-day-css' => '572b1893',
@ -835,7 +835,7 @@ return array(
'phui-comment-form-css' => 'ac68149f', 'phui-comment-form-css' => 'ac68149f',
'phui-comment-panel-css' => 'f50152ad', 'phui-comment-panel-css' => 'f50152ad',
'phui-crumbs-view-css' => '6ece3bbb', 'phui-crumbs-view-css' => '6ece3bbb',
'phui-curtain-view-css' => '55dd0e59', 'phui-curtain-view-css' => 'ca363f15',
'phui-document-summary-view-css' => '9ca48bdf', 'phui-document-summary-view-css' => '9ca48bdf',
'phui-document-view-css' => 'c32e8dec', 'phui-document-view-css' => 'c32e8dec',
'phui-document-view-pro-css' => '8af7ea27', 'phui-document-view-pro-css' => '8af7ea27',
@ -843,7 +843,7 @@ return array(
'phui-font-icon-base-css' => '870a7360', 'phui-font-icon-base-css' => '870a7360',
'phui-fontkit-css' => '1320ed01', 'phui-fontkit-css' => '1320ed01',
'phui-form-css' => '7aaa04e3', 'phui-form-css' => '7aaa04e3',
'phui-form-view-css' => '6175808d', 'phui-form-view-css' => 'ae9f8d16',
'phui-head-thing-view-css' => 'fd311e5f', 'phui-head-thing-view-css' => 'fd311e5f',
'phui-header-view-css' => 'e7de7ee2', 'phui-header-view-css' => 'e7de7ee2',
'phui-hovercard' => '1bd28176', 'phui-hovercard' => '1bd28176',
@ -1716,13 +1716,6 @@ return array(
'javelin-uri', 'javelin-uri',
'phabricator-keyboard-shortcut', 'phabricator-keyboard-shortcut',
), ),
'a9210d03' => array(
'javelin-behavior',
'javelin-util',
'javelin-dom',
'javelin-stratcom',
'javelin-vector',
),
'a9f88de2' => array( 'a9f88de2' => array(
'javelin-behavior', 'javelin-behavior',
'javelin-dom', 'javelin-dom',
@ -2105,6 +2098,13 @@ return array(
'javelin-dom', 'javelin-dom',
'phabricator-draggable-list', 'phabricator-draggable-list',
), ),
'ecf4e799' => array(
'javelin-behavior',
'javelin-util',
'javelin-dom',
'javelin-stratcom',
'javelin-vector',
),
'edf8a145' => array( 'edf8a145' => array(
'javelin-behavior', 'javelin-behavior',
'javelin-uri', 'javelin-uri',

View file

@ -1,24 +0,0 @@
{
"server" : "irc.freenode.net",
"port" : 6667,
"nick" : "phabot",
"join" : [
"#phabot-test"
],
"handlers" : [
"PhabricatorBotObjectNameHandler",
"PhabricatorBotSymbolHandler",
"PhabricatorBotLogHandler",
"PhabricatorBotFeedNotificationHandler",
"PhabricatorBotWhatsNewHandler",
"PhabricatorBotMacroHandler"
],
"conduit.uri" : null,
"conduit.token" : null,
"macro.size" : 48,
"macro.aspect" : 0.66,
"notification.channels" : ["#phabot-test"]
}

View file

@ -471,6 +471,7 @@ phutil_register_library_map(array(
'DifferentialJIRAIssuesCommitMessageField' => 'applications/differential/field/DifferentialJIRAIssuesCommitMessageField.php', 'DifferentialJIRAIssuesCommitMessageField' => 'applications/differential/field/DifferentialJIRAIssuesCommitMessageField.php',
'DifferentialJIRAIssuesField' => 'applications/differential/customfield/DifferentialJIRAIssuesField.php', 'DifferentialJIRAIssuesField' => 'applications/differential/customfield/DifferentialJIRAIssuesField.php',
'DifferentialLegacyHunk' => 'applications/differential/storage/DifferentialLegacyHunk.php', 'DifferentialLegacyHunk' => 'applications/differential/storage/DifferentialLegacyHunk.php',
'DifferentialLegacyQuery' => 'applications/differential/constants/DifferentialLegacyQuery.php',
'DifferentialLineAdjustmentMap' => 'applications/differential/parser/DifferentialLineAdjustmentMap.php', 'DifferentialLineAdjustmentMap' => 'applications/differential/parser/DifferentialLineAdjustmentMap.php',
'DifferentialLintField' => 'applications/differential/customfield/DifferentialLintField.php', 'DifferentialLintField' => 'applications/differential/customfield/DifferentialLintField.php',
'DifferentialLintStatus' => 'applications/differential/constants/DifferentialLintStatus.php', 'DifferentialLintStatus' => 'applications/differential/constants/DifferentialLintStatus.php',
@ -1710,6 +1711,7 @@ phutil_register_library_map(array(
'PHUIBadgeExample' => 'applications/uiexample/examples/PHUIBadgeExample.php', 'PHUIBadgeExample' => 'applications/uiexample/examples/PHUIBadgeExample.php',
'PHUIBadgeMiniView' => 'view/phui/PHUIBadgeMiniView.php', 'PHUIBadgeMiniView' => 'view/phui/PHUIBadgeMiniView.php',
'PHUIBadgeView' => 'view/phui/PHUIBadgeView.php', 'PHUIBadgeView' => 'view/phui/PHUIBadgeView.php',
'PHUIBigInfoExample' => 'applications/uiexample/examples/PHUIBigInfoExample.php',
'PHUIBigInfoView' => 'view/phui/PHUIBigInfoView.php', 'PHUIBigInfoView' => 'view/phui/PHUIBigInfoView.php',
'PHUIBoxExample' => 'applications/uiexample/examples/PHUIBoxExample.php', 'PHUIBoxExample' => 'applications/uiexample/examples/PHUIBoxExample.php',
'PHUIBoxView' => 'view/phui/PHUIBoxView.php', 'PHUIBoxView' => 'view/phui/PHUIBoxView.php',
@ -1769,7 +1771,7 @@ phutil_register_library_map(array(
'PHUIImageMaskExample' => 'applications/uiexample/examples/PHUIImageMaskExample.php', 'PHUIImageMaskExample' => 'applications/uiexample/examples/PHUIImageMaskExample.php',
'PHUIImageMaskView' => 'view/phui/PHUIImageMaskView.php', 'PHUIImageMaskView' => 'view/phui/PHUIImageMaskView.php',
'PHUIInfoExample' => 'applications/uiexample/examples/PHUIInfoExample.php', 'PHUIInfoExample' => 'applications/uiexample/examples/PHUIInfoExample.php',
'PHUIInfoView' => 'view/form/PHUIInfoView.php', 'PHUIInfoView' => 'view/phui/PHUIInfoView.php',
'PHUIInvisibleCharacterTestCase' => 'view/phui/__tests__/PHUIInvisibleCharacterTestCase.php', 'PHUIInvisibleCharacterTestCase' => 'view/phui/__tests__/PHUIInvisibleCharacterTestCase.php',
'PHUIInvisibleCharacterView' => 'view/phui/PHUIInvisibleCharacterView.php', 'PHUIInvisibleCharacterView' => 'view/phui/PHUIInvisibleCharacterView.php',
'PHUILeftRightExample' => 'applications/uiexample/examples/PHUILeftRightExample.php', 'PHUILeftRightExample' => 'applications/uiexample/examples/PHUILeftRightExample.php',
@ -2898,7 +2900,6 @@ phutil_register_library_map(array(
'PhabricatorFilesManagementGenerateKeyWorkflow' => 'applications/files/management/PhabricatorFilesManagementGenerateKeyWorkflow.php', 'PhabricatorFilesManagementGenerateKeyWorkflow' => 'applications/files/management/PhabricatorFilesManagementGenerateKeyWorkflow.php',
'PhabricatorFilesManagementIntegrityWorkflow' => 'applications/files/management/PhabricatorFilesManagementIntegrityWorkflow.php', 'PhabricatorFilesManagementIntegrityWorkflow' => 'applications/files/management/PhabricatorFilesManagementIntegrityWorkflow.php',
'PhabricatorFilesManagementMigrateWorkflow' => 'applications/files/management/PhabricatorFilesManagementMigrateWorkflow.php', 'PhabricatorFilesManagementMigrateWorkflow' => 'applications/files/management/PhabricatorFilesManagementMigrateWorkflow.php',
'PhabricatorFilesManagementPurgeWorkflow' => 'applications/files/management/PhabricatorFilesManagementPurgeWorkflow.php',
'PhabricatorFilesManagementRebuildWorkflow' => 'applications/files/management/PhabricatorFilesManagementRebuildWorkflow.php', 'PhabricatorFilesManagementRebuildWorkflow' => 'applications/files/management/PhabricatorFilesManagementRebuildWorkflow.php',
'PhabricatorFilesManagementWorkflow' => 'applications/files/management/PhabricatorFilesManagementWorkflow.php', 'PhabricatorFilesManagementWorkflow' => 'applications/files/management/PhabricatorFilesManagementWorkflow.php',
'PhabricatorFilesOnDiskBuiltinFile' => 'applications/files/builtin/PhabricatorFilesOnDiskBuiltinFile.php', 'PhabricatorFilesOnDiskBuiltinFile' => 'applications/files/builtin/PhabricatorFilesOnDiskBuiltinFile.php',
@ -5446,6 +5447,7 @@ phutil_register_library_map(array(
'DifferentialJIRAIssuesCommitMessageField' => 'DifferentialCommitMessageCustomField', 'DifferentialJIRAIssuesCommitMessageField' => 'DifferentialCommitMessageCustomField',
'DifferentialJIRAIssuesField' => 'DifferentialStoredCustomField', 'DifferentialJIRAIssuesField' => 'DifferentialStoredCustomField',
'DifferentialLegacyHunk' => 'DifferentialHunk', 'DifferentialLegacyHunk' => 'DifferentialHunk',
'DifferentialLegacyQuery' => 'Phobject',
'DifferentialLineAdjustmentMap' => 'Phobject', 'DifferentialLineAdjustmentMap' => 'Phobject',
'DifferentialLintField' => 'DifferentialHarbormasterField', 'DifferentialLintField' => 'DifferentialHarbormasterField',
'DifferentialLintStatus' => 'Phobject', 'DifferentialLintStatus' => 'Phobject',
@ -6867,6 +6869,7 @@ phutil_register_library_map(array(
'PHUIBadgeExample' => 'PhabricatorUIExample', 'PHUIBadgeExample' => 'PhabricatorUIExample',
'PHUIBadgeMiniView' => 'AphrontTagView', 'PHUIBadgeMiniView' => 'AphrontTagView',
'PHUIBadgeView' => 'AphrontTagView', 'PHUIBadgeView' => 'AphrontTagView',
'PHUIBigInfoExample' => 'PhabricatorUIExample',
'PHUIBigInfoView' => 'AphrontTagView', 'PHUIBigInfoView' => 'AphrontTagView',
'PHUIBoxExample' => 'PhabricatorUIExample', 'PHUIBoxExample' => 'PhabricatorUIExample',
'PHUIBoxView' => 'AphrontTagView', 'PHUIBoxView' => 'AphrontTagView',
@ -8234,7 +8237,6 @@ phutil_register_library_map(array(
'PhabricatorFilesManagementGenerateKeyWorkflow' => 'PhabricatorFilesManagementWorkflow', 'PhabricatorFilesManagementGenerateKeyWorkflow' => 'PhabricatorFilesManagementWorkflow',
'PhabricatorFilesManagementIntegrityWorkflow' => 'PhabricatorFilesManagementWorkflow', 'PhabricatorFilesManagementIntegrityWorkflow' => 'PhabricatorFilesManagementWorkflow',
'PhabricatorFilesManagementMigrateWorkflow' => 'PhabricatorFilesManagementWorkflow', 'PhabricatorFilesManagementMigrateWorkflow' => 'PhabricatorFilesManagementWorkflow',
'PhabricatorFilesManagementPurgeWorkflow' => 'PhabricatorFilesManagementWorkflow',
'PhabricatorFilesManagementRebuildWorkflow' => 'PhabricatorFilesManagementWorkflow', 'PhabricatorFilesManagementRebuildWorkflow' => 'PhabricatorFilesManagementWorkflow',
'PhabricatorFilesManagementWorkflow' => 'PhabricatorManagementWorkflow', 'PhabricatorFilesManagementWorkflow' => 'PhabricatorManagementWorkflow',
'PhabricatorFilesOnDiskBuiltinFile' => 'PhabricatorFilesBuiltinFile', 'PhabricatorFilesOnDiskBuiltinFile' => 'PhabricatorFilesBuiltinFile',

View file

@ -231,6 +231,9 @@ final class CelerityDefaultPostprocessor
'green.button.color' => '#139543', 'green.button.color' => '#139543',
'green.button.gradient' => 'linear-gradient(to bottom, #23BB5B, #139543)', 'green.button.gradient' => 'linear-gradient(to bottom, #23BB5B, #139543)',
'green.button.hover' => 'linear-gradient(to bottom, #23BB5B, #178841)', 'green.button.hover' => 'linear-gradient(to bottom, #23BB5B, #178841)',
'red.button.color' => '#b33225',
'red.button.gradient' => 'linear-gradient(to bottom, #d25454, #b33225)',
'red.button.hover' => 'linear-gradient(to bottom, #d25454, #982115)',
'grey.button.color' => '#F7F7F9', 'grey.button.color' => '#F7F7F9',
'grey.button.gradient' => 'linear-gradient(to bottom, #ffffff, #f1f0f1)', 'grey.button.gradient' => 'linear-gradient(to bottom, #ffffff, #f1f0f1)',
'grey.button.hover' => 'linear-gradient(to bottom, #ffffff, #eeebec)', 'grey.button.hover' => 'linear-gradient(to bottom, #ffffff, #eeebec)',

View file

@ -52,12 +52,12 @@ final class DifferentialFindConduitAPIMethod
switch ($type) { switch ($type) {
case 'open': case 'open':
$query $query
->withStatus(DifferentialRevisionQuery::STATUS_OPEN) ->withStatus(DifferentialLegacyQuery::STATUS_OPEN)
->withAuthors($guids); ->withAuthors($guids);
break; break;
case 'committable': case 'committable':
$query $query
->withStatus(DifferentialRevisionQuery::STATUS_ACCEPTED) ->withStatus(DifferentialLegacyQuery::STATUS_ACCEPTED)
->withAuthors($guids); ->withAuthors($guids);
break; break;
case 'revision-ids': case 'revision-ids':
@ -88,9 +88,7 @@ final class DifferentialFindConduitAPIMethod
'uri' => PhabricatorEnv::getProductionURI('/D'.$id), 'uri' => PhabricatorEnv::getProductionURI('/D'.$id),
'dateCreated' => $revision->getDateCreated(), 'dateCreated' => $revision->getDateCreated(),
'authorPHID' => $revision->getAuthorPHID(), 'authorPHID' => $revision->getAuthorPHID(),
'statusName' => 'statusName' => $revision->getStatusDisplayName(),
ArcanistDifferentialRevisionStatus::getNameForRevisionStatus(
$revision->getStatus()),
'sourcePath' => $diff->getSourcePath(), 'sourcePath' => $diff->getSourcePath(),
); );
} }

View file

@ -83,9 +83,7 @@ final class DifferentialGetRevisionConduitAPIMethod
'uri' => PhabricatorEnv::getURI('/D'.$revision->getID()), 'uri' => PhabricatorEnv::getURI('/D'.$revision->getID()),
'title' => $revision->getTitle(), 'title' => $revision->getTitle(),
'status' => $revision->getStatus(), 'status' => $revision->getStatus(),
'statusName' => 'statusName' => $revision->getStatusDisplayName(),
ArcanistDifferentialRevisionStatus::getNameForRevisionStatus(
$revision->getStatus()),
'summary' => $revision->getSummary(), 'summary' => $revision->getSummary(),
'testPlan' => $revision->getTestPlan(), 'testPlan' => $revision->getTestPlan(),
'lineCount' => $revision->getLineCount(), 'lineCount' => $revision->getLineCount(),

View file

@ -25,12 +25,7 @@ final class DifferentialQueryConduitAPIMethod
$hash_types = ArcanistDifferentialRevisionHash::getTypes(); $hash_types = ArcanistDifferentialRevisionHash::getTypes();
$hash_const = $this->formatStringConstants($hash_types); $hash_const = $this->formatStringConstants($hash_types);
$status_types = array( $status_types = DifferentialLegacyQuery::getAllConstants();
DifferentialRevisionQuery::STATUS_ANY,
DifferentialRevisionQuery::STATUS_OPEN,
DifferentialRevisionQuery::STATUS_ACCEPTED,
DifferentialRevisionQuery::STATUS_CLOSED,
);
$status_const = $this->formatStringConstants($status_types); $status_const = $this->formatStringConstants($status_types);
$order_types = array( $order_types = array(
@ -221,9 +216,7 @@ final class DifferentialQueryConduitAPIMethod
'dateModified' => $revision->getDateModified(), 'dateModified' => $revision->getDateModified(),
'authorPHID' => $revision->getAuthorPHID(), 'authorPHID' => $revision->getAuthorPHID(),
'status' => $revision->getStatus(), 'status' => $revision->getStatus(),
'statusName' => 'statusName' => $revision->getStatusDisplayName(),
ArcanistDifferentialRevisionStatus::getNameForRevisionStatus(
$revision->getStatus()),
'properties' => $revision->getProperties(), 'properties' => $revision->getProperties(),
'branch' => $diff->getBranch(), 'branch' => $diff->getBranch(),
'summary' => $revision->getSummary(), 'summary' => $revision->getSummary(),

View file

@ -69,7 +69,7 @@ final class DifferentialUpdateRevisionConduitAPIMethod
throw new ConduitException('ERR_BAD_REVISION'); throw new ConduitException('ERR_BAD_REVISION');
} }
if ($revision->getStatus() == ArcanistDifferentialRevisionStatus::CLOSED) { if ($revision->isPublished()) {
throw new ConduitException('ERR_CLOSED'); throw new ConduitException('ERR_CLOSED');
} }

View file

@ -0,0 +1,86 @@
<?php
final class DifferentialLegacyQuery
extends Phobject {
const STATUS_ANY = 'status-any';
const STATUS_OPEN = 'status-open';
const STATUS_ACCEPTED = 'status-accepted';
const STATUS_NEEDS_REVIEW = 'status-needs-review';
const STATUS_NEEDS_REVISION = 'status-needs-revision';
const STATUS_CLOSED = 'status-closed';
const STATUS_ABANDONED = 'status-abandoned';
public static function getAllConstants() {
return array_keys(self::getMap());
}
public static function getQueryValues($status) {
if ($status === self::STATUS_ANY) {
return null;
}
$map = self::getMap();
if (!isset($map[$status])) {
throw new Exception(
pht(
'Unknown revision status filter constant "%s".',
$status));
}
$values = array();
foreach ($map[$status] as $status_constant) {
$status_object = DifferentialRevisionStatus::newForStatus(
$status_constant);
$legacy_key = $status_object->getLegacyKey();
if ($legacy_key !== null) {
$values[] = $legacy_key;
}
}
return $values;
}
private static function getMap() {
$all = array(
DifferentialRevisionStatus::NEEDS_REVIEW,
DifferentialRevisionStatus::NEEDS_REVISION,
DifferentialRevisionStatus::CHANGES_PLANNED,
DifferentialRevisionStatus::ACCEPTED,
DifferentialRevisionStatus::PUBLISHED,
DifferentialRevisionStatus::ABANDONED,
);
$open = array();
$closed = array();
foreach ($all as $status) {
$status_object = DifferentialRevisionStatus::newForStatus($status);
if ($status_object->isClosedStatus()) {
$closed[] = $status_object->getKey();
} else {
$open[] = $status_object->getKey();
}
}
return array(
self::STATUS_ANY => $all,
self::STATUS_OPEN => $open,
self::STATUS_ACCEPTED => array(
DifferentialRevisionStatus::ACCEPTED,
),
self::STATUS_NEEDS_REVIEW => array(
DifferentialRevisionStatus::NEEDS_REVIEW,
),
self::STATUS_NEEDS_REVISION => array(
DifferentialRevisionStatus::NEEDS_REVISION,
),
self::STATUS_CLOSED => $closed,
self::STATUS_ABANDONED => array(
DifferentialRevisionStatus::ABANDONED,
),
);
}
}

View file

@ -1,107 +1,158 @@
<?php <?php
/**
* NOTE: you probably want {@class:ArcanistDifferentialRevisionStatus}.
* This class just contains a mapping for color within the Differential
* application.
*/
final class DifferentialRevisionStatus extends Phobject { final class DifferentialRevisionStatus extends Phobject {
const COLOR_STATUS_DEFAULT = 'bluegrey'; const NEEDS_REVIEW = 'needs-review';
const COLOR_STATUS_DARK = 'indigo'; const NEEDS_REVISION = 'needs-revision';
const COLOR_STATUS_BLUE = 'blue'; const CHANGES_PLANNED = 'changes-planned';
const COLOR_STATUS_GREEN = 'green'; const ACCEPTED = 'accepted';
const COLOR_STATUS_RED = 'red'; const PUBLISHED = 'published';
const ABANDONED = 'abandoned';
public static function getRevisionStatusColor($status) { private $key;
$default = self::COLOR_STATUS_DEFAULT; private $spec = array();
$map = array( public function getKey() {
ArcanistDifferentialRevisionStatus::NEEDS_REVIEW => return $this->key;
self::COLOR_STATUS_DEFAULT,
ArcanistDifferentialRevisionStatus::NEEDS_REVISION =>
self::COLOR_STATUS_RED,
ArcanistDifferentialRevisionStatus::CHANGES_PLANNED =>
self::COLOR_STATUS_RED,
ArcanistDifferentialRevisionStatus::ACCEPTED =>
self::COLOR_STATUS_GREEN,
ArcanistDifferentialRevisionStatus::CLOSED =>
self::COLOR_STATUS_DARK,
ArcanistDifferentialRevisionStatus::ABANDONED =>
self::COLOR_STATUS_DARK,
ArcanistDifferentialRevisionStatus::IN_PREPARATION =>
self::COLOR_STATUS_BLUE,
);
return idx($map, $status, $default);
} }
public static function getRevisionStatusIcon($status) { public function getLegacyKey() {
$default = 'fa-square-o bluegrey'; return idx($this->spec, 'legacy');
$map = array(
ArcanistDifferentialRevisionStatus::NEEDS_REVIEW =>
'fa-square-o bluegrey',
ArcanistDifferentialRevisionStatus::NEEDS_REVISION =>
'fa-refresh',
ArcanistDifferentialRevisionStatus::CHANGES_PLANNED =>
'fa-headphones',
ArcanistDifferentialRevisionStatus::ACCEPTED =>
'fa-check',
ArcanistDifferentialRevisionStatus::CLOSED =>
'fa-check-square-o',
ArcanistDifferentialRevisionStatus::ABANDONED =>
'fa-plane',
ArcanistDifferentialRevisionStatus::IN_PREPARATION =>
'fa-question-circle',
);
return idx($map, $status, $default);
} }
public static function renderFullDescription($status) { public function getIcon() {
$status_name = return idx($this->spec, 'icon');
ArcanistDifferentialRevisionStatus::getNameForRevisionStatus($status);
$tag = id(new PHUITagView())
->setName($status_name)
->setIcon(self::getRevisionStatusIcon($status))
->setColor(self::getRevisionStatusColor($status))
->setType(PHUITagView::TYPE_SHADE);
return $tag;
} }
public static function getClosedStatuses() { public function getIconColor() {
$statuses = array( return idx($this->spec, 'color.icon', 'bluegrey');
ArcanistDifferentialRevisionStatus::CLOSED,
ArcanistDifferentialRevisionStatus::ABANDONED,
);
if (PhabricatorEnv::getEnvConfig('differential.close-on-accept')) {
$statuses[] = ArcanistDifferentialRevisionStatus::ACCEPTED;
} }
return $statuses; public function getTagColor() {
return idx($this->spec, 'color.tag', 'bluegrey');
} }
public static function getOpenStatuses() { public function getDisplayName() {
return array_diff(self::getAllStatuses(), self::getClosedStatuses()); return idx($this->spec, 'name');
} }
public static function getAllStatuses() { public function isClosedStatus() {
return idx($this->spec, 'closed');
}
public function isAbandoned() {
return ($this->key === self::ABANDONED);
}
public function isAccepted() {
return ($this->key === self::ACCEPTED);
}
public function isNeedsReview() {
return ($this->key === self::NEEDS_REVIEW);
}
public function isPublished() {
return ($this->key === self::PUBLISHED);
}
public function isChangePlanned() {
return ($this->key === self::CHANGES_PLANNED);
}
public static function newForStatus($status) {
$result = new self();
$map = self::getMap();
if (isset($map[$status])) {
$result->key = $status;
$result->spec = $map[$status];
}
return $result;
}
public static function newForLegacyStatus($legacy_status) {
$result = new self();
$map = self::getMap();
foreach ($map as $key => $spec) {
if (!isset($spec['legacy'])) {
continue;
}
if ($spec['legacy'] != $legacy_status) {
continue;
}
$result->key = $key;
$result->spec = $spec;
break;
}
return $result;
}
private static function getMap() {
$close_on_accept = PhabricatorEnv::getEnvConfig(
'differential.close-on-accept');
return array( return array(
ArcanistDifferentialRevisionStatus::NEEDS_REVIEW, self::NEEDS_REVIEW => array(
ArcanistDifferentialRevisionStatus::NEEDS_REVISION, 'name' => pht('Needs Review'),
ArcanistDifferentialRevisionStatus::CHANGES_PLANNED, 'legacy' => 0,
ArcanistDifferentialRevisionStatus::ACCEPTED, 'icon' => 'fa-code',
ArcanistDifferentialRevisionStatus::CLOSED, 'closed' => false,
ArcanistDifferentialRevisionStatus::ABANDONED, 'color.icon' => 'grey',
ArcanistDifferentialRevisionStatus::IN_PREPARATION, 'color.tag' => 'bluegrey',
'color.ansi' => 'magenta',
),
self::NEEDS_REVISION => array(
'name' => pht('Needs Revision'),
'legacy' => 1,
'icon' => 'fa-refresh',
'closed' => false,
'color.icon' => 'red',
'color.tag' => 'red',
'color.ansi' => 'red',
),
self::CHANGES_PLANNED => array(
'name' => pht('Changes Planned'),
'legacy' => 5,
'icon' => 'fa-headphones',
'closed' => false,
'color.icon' => 'red',
'color.tag' => 'red',
'color.ansi' => 'red',
),
self::ACCEPTED => array(
'name' => pht('Accepted'),
'legacy' => 2,
'icon' => 'fa-check',
'closed' => $close_on_accept,
'color.icon' => 'green',
'color.tag' => 'green',
'color.ansi' => 'green',
),
self::PUBLISHED => array(
'name' => pht('Closed'),
'legacy' => 3,
'icon' => 'fa-check-square-o',
'closed' => true,
'color.icon' => 'black',
'color.tag' => 'indigo',
'color.ansi' => 'cyan',
),
self::ABANDONED => array(
'name' => pht('Abandoned'),
'legacy' => 4,
'icon' => 'fa-plane',
'closed' => true,
'color.icon' => 'black',
'color.tag' => 'indigo',
'color.ansi' => null,
),
); );
} }
public static function isClosedStatus($status) {
return in_array($status, self::getClosedStatuses());
}
} }

View file

@ -177,7 +177,7 @@ final class DifferentialDiffViewController extends DifferentialController {
$revisions = id(new DifferentialRevisionQuery()) $revisions = id(new DifferentialRevisionQuery())
->setViewer($viewer) ->setViewer($viewer)
->withAuthors(array($viewer->getPHID())) ->withAuthors(array($viewer->getPHID()))
->withStatus(DifferentialRevisionQuery::STATUS_OPEN) ->withStatus(DifferentialLegacyQuery::STATUS_OPEN)
->requireCapabilities( ->requireCapabilities(
array( array(
PhabricatorPolicyCapability::CAN_VIEW, PhabricatorPolicyCapability::CAN_VIEW,

View file

@ -508,11 +508,13 @@ final class DifferentialRevisionViewController extends DifferentialController {
->setPolicyObject($revision) ->setPolicyObject($revision)
->setHeaderIcon('fa-cog'); ->setHeaderIcon('fa-cog');
$status = $revision->getStatus(); $status_tag = id(new PHUITagView())
$status_name = ->setName($revision->getStatusDisplayName())
DifferentialRevisionStatus::renderFullDescription($status); ->setIcon($revision->getStatusIcon())
->setColor($revision->getStatusIconColor())
->setType(PHUITagView::TYPE_SHADE);
$view->addProperty(PHUIHeaderView::PROPERTY_STATUS, $status_name); $view->addProperty(PHUIHeaderView::PROPERTY_STATUS, $status_tag);
return $view; return $view;
} }
@ -806,7 +808,7 @@ final class DifferentialRevisionViewController extends DifferentialController {
$query = id(new DifferentialRevisionQuery()) $query = id(new DifferentialRevisionQuery())
->setViewer($this->getRequest()->getUser()) ->setViewer($this->getRequest()->getUser())
->withStatus(DifferentialRevisionQuery::STATUS_OPEN) ->withStatus(DifferentialLegacyQuery::STATUS_OPEN)
->withUpdatedEpochBetween($recent, null) ->withUpdatedEpochBetween($recent, null)
->setOrder(DifferentialRevisionQuery::ORDER_MODIFIED) ->setOrder(DifferentialRevisionQuery::ORDER_MODIFIED)
->setLimit(10) ->setLimit(10)

View file

@ -76,16 +76,17 @@ final class DifferentialBranchField
PhabricatorApplicationTransactionEditor $editor, PhabricatorApplicationTransactionEditor $editor,
array $xactions) { array $xactions) {
$status_accepted = ArcanistDifferentialRevisionStatus::ACCEPTED; $revision = $this->getObject();
// Show the "BRANCH" section only if there's a new diff or the revision // Show the "BRANCH" section only if there's a new diff or the revision
// is "Accepted". // is "Accepted".
if ((!$editor->getDiffUpdateTransaction($xactions)) && $is_update = (bool)$editor->getDiffUpdateTransaction($xactions);
($this->getObject()->getStatus() != $status_accepted)) { $is_accepted = $revision->isAccepted();
if (!$is_update && !$is_accepted) {
return; return;
} }
$branch = $this->getBranchDescription($this->getObject()->getActiveDiff()); $branch = $this->getBranchDescription($revision->getActiveDiff());
if ($branch === null) { if ($branch === null) {
return; return;
} }

View file

@ -68,8 +68,7 @@ final class DifferentialReviewersField
public function getWarningsForRevisionHeader(array $handles) { public function getWarningsForRevisionHeader(array $handles) {
$revision = $this->getObject(); $revision = $this->getObject();
$status_needs_review = ArcanistDifferentialRevisionStatus::NEEDS_REVIEW; if (!$revision->isNeedsReview()) {
if ($revision->getStatus() != $status_needs_review) {
return array(); return array();
} }

View file

@ -35,8 +35,7 @@ final class DifferentialDoorkeeperRevisionFeedStoryPublisher
} }
public function getActiveUserPHIDs($object) { public function getActiveUserPHIDs($object) {
$status = $object->getStatus(); if ($object->isNeedsReview()) {
if ($status == ArcanistDifferentialRevisionStatus::NEEDS_REVIEW) {
return $object->getReviewerPHIDs(); return $object->getReviewerPHIDs();
} else { } else {
return array(); return array();
@ -44,8 +43,7 @@ final class DifferentialDoorkeeperRevisionFeedStoryPublisher
} }
public function getPassiveUserPHIDs($object) { public function getPassiveUserPHIDs($object) {
$status = $object->getStatus(); if ($object->isNeedsReview()) {
if ($status == ArcanistDifferentialRevisionStatus::NEEDS_REVIEW) {
return array(); return array();
} else { } else {
return $object->getReviewerPHIDs(); return $object->getReviewerPHIDs();

View file

@ -48,10 +48,9 @@ final class DifferentialRevisionPHIDType extends PhabricatorPHIDType {
$status = $revision->getStatus(); $status = $revision->getStatus();
$icon = DifferentialRevisionStatus::getRevisionStatusIcon($status); $icon = $revision->getStatusIcon($status);
$color = DifferentialRevisionStatus::getRevisionStatusColor($status); $color = $revision->getStatusIconColor($status);
$name = ArcanistDifferentialRevisionStatus::getNameForRevisionStatus( $name = $revision->getStatusDisplayName();
$status);
$handle $handle
->setStateIcon($icon) ->setStateIcon($icon)

View file

@ -1,13 +1,6 @@
<?php <?php
/** /**
* Flexible query API for Differential revisions. Example:
*
* // Load open revisions
* $revisions = id(new DifferentialRevisionQuery())
* ->withStatus(DifferentialRevisionQuery::STATUS_OPEN)
* ->execute();
*
* @task config Query Configuration * @task config Query Configuration
* @task exec Query Execution * @task exec Query Execution
* @task internal Internals * @task internal Internals
@ -18,13 +11,6 @@ final class DifferentialRevisionQuery
private $pathIDs = array(); private $pathIDs = array();
private $status = 'status-any'; private $status = 'status-any';
const STATUS_ANY = 'status-any';
const STATUS_OPEN = 'status-open';
const STATUS_ACCEPTED = 'status-accepted';
const STATUS_NEEDS_REVIEW = 'status-needs-review';
const STATUS_NEEDS_REVISION = 'status-needs-revision';
const STATUS_CLOSED = 'status-closed';
const STATUS_ABANDONED = 'status-abandoned';
private $authors = array(); private $authors = array();
private $draftAuthors = array(); private $draftAuthors = array();
@ -149,7 +135,7 @@ final class DifferentialRevisionQuery
/** /**
* Filter results to revisions with a given status. Provide a class constant, * Filter results to revisions with a given status. Provide a class constant,
* such as `DifferentialRevisionQuery::STATUS_OPEN`. * such as `DifferentialLegacyQuery::STATUS_OPEN`.
* *
* @param const Class STATUS constant, like STATUS_OPEN. * @param const Class STATUS constant, like STATUS_OPEN.
* @return this * @return this
@ -711,57 +697,12 @@ final class DifferentialRevisionQuery
// NOTE: Although the status constants are integers in PHP, the column is a // NOTE: Although the status constants are integers in PHP, the column is a
// string column in MySQL, and MySQL won't use keys on string columns if // string column in MySQL, and MySQL won't use keys on string columns if
// you put integers in the query. // you put integers in the query.
$statuses = DifferentialLegacyQuery::getQueryValues($this->status);
switch ($this->status) { if ($statuses !== null) {
case self::STATUS_ANY:
break;
case self::STATUS_OPEN:
$where[] = qsprintf( $where[] = qsprintf(
$conn_r, $conn_r,
'r.status IN (%Ls)', 'r.status IN (%Ls)',
DifferentialRevisionStatus::getOpenStatuses()); $statuses);
break;
case self::STATUS_NEEDS_REVIEW:
$where[] = qsprintf(
$conn_r,
'r.status IN (%Ls)',
array(
ArcanistDifferentialRevisionStatus::NEEDS_REVIEW,
));
break;
case self::STATUS_NEEDS_REVISION:
$where[] = qsprintf(
$conn_r,
'r.status IN (%Ls)',
array(
ArcanistDifferentialRevisionStatus::NEEDS_REVISION,
));
break;
case self::STATUS_ACCEPTED:
$where[] = qsprintf(
$conn_r,
'r.status IN (%Ls)',
array(
ArcanistDifferentialRevisionStatus::ACCEPTED,
));
break;
case self::STATUS_CLOSED:
$where[] = qsprintf(
$conn_r,
'r.status IN (%Ls)',
DifferentialRevisionStatus::getClosedStatuses());
break;
case self::STATUS_ABANDONED:
$where[] = qsprintf(
$conn_r,
'r.status IN (%Ls)',
array(
ArcanistDifferentialRevisionStatus::ABANDONED,
));
break;
default:
throw new Exception(
pht("Unknown revision status filter constant '%s'!", $this->status));
} }
$where[] = $this->buildWhereClauseParts($conn_r); $where[] = $this->buildWhereClauseParts($conn_r);

View file

@ -134,13 +134,11 @@ final class DifferentialRevisionRequiredActionResultBucket
} }
private function filterShouldLand(array $phids) { private function filterShouldLand(array $phids) {
$status_accepted = ArcanistDifferentialRevisionStatus::ACCEPTED;
$objects = $this->getRevisionsAuthored($this->objects, $phids); $objects = $this->getRevisionsAuthored($this->objects, $phids);
$results = array(); $results = array();
foreach ($objects as $key => $object) { foreach ($objects as $key => $object) {
if ($object->getStatus() != $status_accepted) { if (!$object->isAccepted()) {
continue; continue;
} }
@ -175,13 +173,11 @@ final class DifferentialRevisionRequiredActionResultBucket
} }
private function filterWaitingForReview(array $phids) { private function filterWaitingForReview(array $phids) {
$status_review = ArcanistDifferentialRevisionStatus::NEEDS_REVIEW;
$objects = $this->getRevisionsAuthored($this->objects, $phids); $objects = $this->getRevisionsAuthored($this->objects, $phids);
$results = array(); $results = array();
foreach ($objects as $key => $object) { foreach ($objects as $key => $object) {
if ($object->getStatus() != $status_review) { if (!$object->isNeedsReview()) {
continue; continue;
} }
@ -217,16 +213,11 @@ final class DifferentialRevisionRequiredActionResultBucket
} }
private function filterWaitingOnOtherReviewers(array $phids) { private function filterWaitingOnOtherReviewers(array $phids) {
$statuses = array(
ArcanistDifferentialRevisionStatus::NEEDS_REVIEW,
);
$statuses = array_fuse($statuses);
$objects = $this->getRevisionsNotAuthored($this->objects, $phids); $objects = $this->getRevisionsNotAuthored($this->objects, $phids);
$results = array(); $results = array();
foreach ($objects as $key => $object) { foreach ($objects as $key => $object) {
if (!isset($statuses[$object->getStatus()])) { if (!$object->isNeedsReview()) {
continue; continue;
} }

View file

@ -15,9 +15,8 @@ abstract class DifferentialRevisionResultBucket
$objects = $this->getRevisionsNotAuthored($objects, $phids); $objects = $this->getRevisionsNotAuthored($objects, $phids);
$status_review = ArcanistDifferentialRevisionStatus::NEEDS_REVIEW;
foreach ($objects as $key => $object) { foreach ($objects as $key => $object) {
if ($object->getStatus() != $status_review) { if (!$object->isNeedsReview()) {
continue; continue;
} }

View file

@ -115,7 +115,7 @@ final class DifferentialRevisionSearchEngine
return $query return $query
->setParameter('responsiblePHIDs', array($viewer->getPHID())) ->setParameter('responsiblePHIDs', array($viewer->getPHID()))
->setParameter('status', DifferentialRevisionQuery::STATUS_OPEN) ->setParameter('status', DifferentialLegacyQuery::STATUS_OPEN)
->setParameter('bucket', $bucket_key); ->setParameter('bucket', $bucket_key);
case 'authored': case 'authored':
return $query return $query
@ -129,13 +129,13 @@ final class DifferentialRevisionSearchEngine
private function getStatusOptions() { private function getStatusOptions() {
return array( return array(
DifferentialRevisionQuery::STATUS_ANY => pht('All'), DifferentialLegacyQuery::STATUS_ANY => pht('All'),
DifferentialRevisionQuery::STATUS_OPEN => pht('Open'), DifferentialLegacyQuery::STATUS_OPEN => pht('Open'),
DifferentialRevisionQuery::STATUS_ACCEPTED => pht('Accepted'), DifferentialLegacyQuery::STATUS_ACCEPTED => pht('Accepted'),
DifferentialRevisionQuery::STATUS_NEEDS_REVIEW => pht('Needs Review'), DifferentialLegacyQuery::STATUS_NEEDS_REVIEW => pht('Needs Review'),
DifferentialRevisionQuery::STATUS_NEEDS_REVISION => pht('Needs Revision'), DifferentialLegacyQuery::STATUS_NEEDS_REVISION => pht('Needs Revision'),
DifferentialRevisionQuery::STATUS_CLOSED => pht('Closed'), DifferentialLegacyQuery::STATUS_CLOSED => pht('Closed'),
DifferentialRevisionQuery::STATUS_ABANDONED => pht('Abandoned'), DifferentialLegacyQuery::STATUS_ABANDONED => pht('Abandoned'),
); );
} }
@ -235,11 +235,9 @@ final class DifferentialRevisionSearchEngine
} }
private function loadUnlandedDependencies(array $revisions) { private function loadUnlandedDependencies(array $revisions) {
$status_accepted = ArcanistDifferentialRevisionStatus::ACCEPTED;
$phids = array(); $phids = array();
foreach ($revisions as $revision) { foreach ($revisions as $revision) {
if ($revision->getStatus() != $status_accepted) { if (!$revision->isAccepted()) {
continue; continue;
} }
@ -269,7 +267,7 @@ final class DifferentialRevisionSearchEngine
$blocking_revisions = id(new DifferentialRevisionQuery()) $blocking_revisions = id(new DifferentialRevisionQuery())
->setViewer($viewer) ->setViewer($viewer)
->withPHIDs($revision_phids) ->withPHIDs($revision_phids)
->withStatus(DifferentialRevisionQuery::STATUS_OPEN) ->withStatus(DifferentialLegacyQuery::STATUS_OPEN)
->execute(); ->execute();
$blocking_revisions = mpull($blocking_revisions, null, 'getPHID'); $blocking_revisions = mpull($blocking_revisions, null, 'getPHID');

View file

@ -34,8 +34,7 @@ final class DifferentialRevisionFulltextEngine
// If a revision needs review, the owners are the reviewers. Otherwise, the // If a revision needs review, the owners are the reviewers. Otherwise, the
// owner is the author (e.g., accepted, rejected, closed). // owner is the author (e.g., accepted, rejected, closed).
$status_review = ArcanistDifferentialRevisionStatus::NEEDS_REVIEW; if ($revision->isNeedsReview()) {
if ($revision->getStatus() == $status_review) {
$reviewers = $revision->getReviewerPHIDs(); $reviewers = $revision->getReviewerPHIDs();
$reviewers = array_fuse($reviewers); $reviewers = array_fuse($reviewers);

View file

@ -523,7 +523,6 @@ final class DifferentialRevision extends DifferentialDAO
switch ($capability) { switch ($capability) {
case PhabricatorPolicyCapability::CAN_VIEW: case PhabricatorPolicyCapability::CAN_VIEW:
$description[] = pht("A revision's reviewers can always view it.");
$description[] = pht( $description[] = pht(
'If a revision belongs to a repository, other users must be able '. 'If a revision belongs to a repository, other users must be able '.
'to view the repository in order to view the revision.'); 'to view the repository in order to view the revision.');
@ -614,42 +613,44 @@ final class DifferentialRevision extends DifferentialDAO
} }
public function isClosed() { public function isClosed() {
return DifferentialRevisionStatus::isClosedStatus($this->getStatus()); return $this->getStatusObject()->isClosedStatus();
} }
public function isAbandoned() { public function isAbandoned() {
$status_abandoned = ArcanistDifferentialRevisionStatus::ABANDONED; return $this->getStatusObject()->isAbandoned();
return ($this->getStatus() == $status_abandoned);
} }
public function isAccepted() { public function isAccepted() {
$status_accepted = ArcanistDifferentialRevisionStatus::ACCEPTED; return $this->getStatusObject()->isAccepted();
return ($this->getStatus() == $status_accepted); }
public function isNeedsReview() {
return $this->getStatusObject()->isNeedsReview();
}
public function isChangePlanned() {
return $this->getStatusObject()->isChangePlanned();
}
public function isPublished() {
return $this->getStatusObject()->isPublished();
} }
public function getStatusIcon() { public function getStatusIcon() {
$map = array( return $this->getStatusObject()->getIcon();
ArcanistDifferentialRevisionStatus::NEEDS_REVIEW
=> 'fa-code grey',
ArcanistDifferentialRevisionStatus::NEEDS_REVISION
=> 'fa-refresh red',
ArcanistDifferentialRevisionStatus::CHANGES_PLANNED
=> 'fa-headphones red',
ArcanistDifferentialRevisionStatus::ACCEPTED
=> 'fa-check green',
ArcanistDifferentialRevisionStatus::CLOSED
=> 'fa-check-square-o black',
ArcanistDifferentialRevisionStatus::ABANDONED
=> 'fa-plane black',
);
return idx($map, $this->getStatus());
} }
public function getStatusDisplayName() { public function getStatusDisplayName() {
return $this->getStatusObject()->getDisplayName();
}
public function getStatusIconColor() {
return $this->getStatusObject()->getIconColor();
}
public function getStatusObject() {
$status = $this->getStatus(); $status = $this->getStatus();
return ArcanistDifferentialRevisionStatus::getNameForRevisionStatus( return DifferentialRevisionStatus::newForLegacyStatus($status);
$status);
} }
public function getFlag(PhabricatorUser $viewer) { public function getFlag(PhabricatorUser $viewer) {

View file

@ -116,7 +116,7 @@ final class DifferentialReviewersView extends AphrontView {
} }
} else { } else {
$icon = 'fa-times-circle-o'; $icon = 'fa-times-circle-o';
$color = 'bluegrey'; $color = 'red';
if ($authority_name !== null) { if ($authority_name !== null) {
$label = pht( $label = pht(
'Requested Changes to Prior Diff (by %s)', 'Requested Changes to Prior Diff (by %s)',
@ -158,7 +158,6 @@ final class DifferentialReviewersView extends AphrontView {
private function isCurrent($action_phid) { private function isCurrent($action_phid) {
if (!$this->diff) { if (!$this->diff) {
echo "A\n";
return true; return true;
} }

View file

@ -145,8 +145,11 @@ final class DifferentialRevisionListView extends AphrontView {
$item->setDisabled(true); $item->setDisabled(true);
} }
$icon = $revision->getStatusIcon();
$color = $revision->getStatusIconColor();
$item->setStatusIcon( $item->setStatusIcon(
$revision->getStatusIcon(), "{$icon} {$color}",
$revision->getStatusDisplayName()); $revision->getStatusDisplayName());
$list->addItem($item); $list->addItem($item);

View file

@ -56,9 +56,7 @@ final class DifferentialRevisionPlanChangesTransaction
} }
protected function validateAction($object, PhabricatorUser $viewer) { protected function validateAction($object, PhabricatorUser $viewer) {
$status_planned = ArcanistDifferentialRevisionStatus::CHANGES_PLANNED; if ($object->isChangePlanned()) {
if ($object->getStatus() == $status_planned) {
throw new Exception( throw new Exception(
pht( pht(
'You can not request review of this revision because this '. 'You can not request review of this revision because this '.

View file

@ -39,10 +39,7 @@ final class DifferentialRevisionReopenTransaction
} }
protected function validateAction($object, PhabricatorUser $viewer) { protected function validateAction($object, PhabricatorUser $viewer) {
// Note that we're testing for "Closed", exactly, not just any closed if ($object->isPublished()) {
// status.
$status_closed = ArcanistDifferentialRevisionStatus::CLOSED;
if ($object->getStatus() != $status_closed) {
throw new Exception( throw new Exception(
pht( pht(
'You can not reopen this revision because it is not closed. '. 'You can not reopen this revision because it is not closed. '.

View file

@ -37,8 +37,7 @@ final class DifferentialRevisionRequestReviewTransaction
} }
protected function validateAction($object, PhabricatorUser $viewer) { protected function validateAction($object, PhabricatorUser $viewer) {
$status_review = ArcanistDifferentialRevisionStatus::NEEDS_REVIEW; if ($object->isNeedsReview()) {
if ($object->getStatus() == $status_review) {
throw new Exception( throw new Exception(
pht( pht(
'You can not request review of this revision because this '. 'You can not request review of this revision because this '.

View file

@ -1758,7 +1758,7 @@ final class DiffusionBrowseController extends DiffusionController {
$revisions = id(new DifferentialRevisionQuery()) $revisions = id(new DifferentialRevisionQuery())
->setViewer($viewer) ->setViewer($viewer)
->withPath($repository->getID(), $path_id) ->withPath($repository->getID(), $path_id)
->withStatus(DifferentialRevisionQuery::STATUS_OPEN) ->withStatus(DifferentialLegacyQuery::STATUS_OPEN)
->withUpdatedEpochBetween($recent, null) ->withUpdatedEpochBetween($recent, null)
->setOrder(DifferentialRevisionQuery::ORDER_MODIFIED) ->setOrder(DifferentialRevisionQuery::ORDER_MODIFIED)
->setLimit(10) ->setLimit(10)

View file

@ -109,6 +109,9 @@ final class DiffusionRepositoryProfilePictureController
} }
$builtins = array( $builtins = array(
'repo/repo-git.png',
'repo/repo-svn.png',
'repo/repo-hg.png',
'repo/building.png', 'repo/building.png',
'repo/cloud.png', 'repo/cloud.png',
'repo/commit.png', 'repo/commit.png',

View file

@ -67,6 +67,7 @@ final class DiffusionRepositoryBranchesManagementPanel
public function buildManagementPanelContent() { public function buildManagementPanelContent() {
$repository = $this->getRepository(); $repository = $this->getRepository();
$viewer = $this->getViewer(); $viewer = $this->getViewer();
$content = array();
$view = id(new PHUIPropertyListView()) $view = id(new PHUIPropertyListView())
->setViewer($viewer); ->setViewer($viewer);
@ -90,8 +91,66 @@ final class DiffusionRepositoryBranchesManagementPanel
} }
$view->addProperty(pht('Autoclose Only'), $autoclose_only); $view->addProperty(pht('Autoclose Only'), $autoclose_only);
$content[] = $this->newBox(pht('Branches'), $view);
return $this->newBox(pht('Branches'), $view); // Branch Autoclose Table
if (!$repository->isImporting()) {
$request = $this->getRequest();
$pager = id(new PHUIPagerView())
->readFromRequest($request);
$params = array(
'offset' => $pager->getOffset(),
'limit' => $pager->getPageSize() + 1,
'repository' => $repository->getID(),
);
$branches = id(new ConduitCall('diffusion.branchquery', $params))
->setUser($viewer)
->execute();
$branches = DiffusionRepositoryRef::loadAllFromDictionaries($branches);
$branches = $pager->sliceResults($branches);
$rows = array();
foreach ($branches as $branch) {
$branch_name = $branch->getShortName();
$tracking = $repository->shouldTrackBranch($branch_name);
$autoclosing = $repository->shouldAutocloseBranch($branch_name);
$rows[] = array(
$branch_name,
$tracking ? pht('Tracking') : pht('Off'),
$autoclosing ? pht('Autoclose On') : pht('Off'),
);
}
$branch_table = new AphrontTableView($rows);
$branch_table->setHeaders(
array(
pht('Branch'),
pht('Track'),
pht('Autoclose'),
));
$branch_table->setColumnClasses(
array(
'pri',
'narrow',
'wide',
));
$box = id(new PHUIObjectBoxView())
->setHeaderText(pht('Branch Status'))
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->setTable($branch_table)
->setPager($pager);
$content[] = $box;
} else {
$content[] = id(new PHUIInfoView())
->setSeverity(PHUIInfoView::SEVERITY_NOTICE)
->appendChild(pht('Branch status in unavailable while the repository '.
'is still importing.'));
}
return $content;
} }
} }

View file

@ -25,6 +25,10 @@ abstract class DiffusionRepositoryManagementPanel
return $this->repository; return $this->repository;
} }
final public function getRequest() {
return $this->controller->getRequest();
}
final public function setController(PhabricatorController $controller) { final public function setController(PhabricatorController $controller) {
$this->controller = $controller; $this->controller = $controller;
return $this; return $this;

View file

@ -122,9 +122,8 @@ final class DiffusionLowLevelCommitFieldsQuery
$revisions = array_reverse($revisions); $revisions = array_reverse($revisions);
// Try to find an accepted revision first. // Try to find an accepted revision first.
$status_accepted = ArcanistDifferentialRevisionStatus::ACCEPTED;
foreach ($revisions as $revision) { foreach ($revisions as $revision) {
if ($revision->getStatus() == $status_accepted) { if ($revision->isAccepted()) {
return $revision; return $revision;
} }
} }

View file

@ -289,24 +289,24 @@ final class DrydockLandRepositoryOperation
); );
} }
$status_accepted = ArcanistDifferentialRevisionStatus::ACCEPTED; if ($revision->isAccepted()) {
if ($revision->getStatus() != $status_accepted) { // We can land accepted revisions, so continue below. Otherwise, raise
switch ($revision->getStatus()) { // an error with tailored messaging for the most common cases.
case ArcanistDifferentialRevisionStatus::CLOSED: } else if ($revision->isAbandoned()) {
return array(
'title' => pht('Revision Closed'),
'body' => pht(
'This revision has already been closed. Only open, accepted '.
'revisions may land.'),
);
case ArcanistDifferentialRevisionStatus::ABANDONED:
return array( return array(
'title' => pht('Revision Abandoned'), 'title' => pht('Revision Abandoned'),
'body' => pht( 'body' => pht(
'This revision has been abandoned. Only accepted revisions '. 'This revision has been abandoned. Only accepted revisions '.
'may land.'), 'may land.'),
); );
default: } else if ($revision->isClosed()) {
return array(
'title' => pht('Revision Closed'),
'body' => pht(
'This revision has already been closed. Only open, accepted '.
'revisions may land.'),
);
} else {
return array( return array(
'title' => pht('Revision Not Accepted'), 'title' => pht('Revision Not Accepted'),
'body' => pht( 'body' => pht(
@ -314,7 +314,6 @@ final class DrydockLandRepositoryOperation
'have been accepted may land.'), 'have been accepted may land.'),
); );
} }
}
// Check for other operations. Eventually this should probably be more // Check for other operations. Eventually this should probably be more
// general (e.g., it's OK to land to multiple different branches // general (e.g., it's OK to land to multiple different branches

View file

@ -1,71 +0,0 @@
<?php
final class PhabricatorFilesManagementPurgeWorkflow
extends PhabricatorFilesManagementWorkflow {
protected function didConstruct() {
$this
->setName('purge')
->setSynopsis(pht('Delete files with missing data.'))
->setArguments(
array(
array(
'name' => 'all',
'help' => pht('Update all files.'),
),
array(
'name' => 'dry-run',
'help' => pht('Show what would be updated.'),
),
array(
'name' => 'names',
'wildcard' => true,
),
));
}
public function execute(PhutilArgumentParser $args) {
$console = PhutilConsole::getConsole();
$iterator = $this->buildIterator($args);
if (!$iterator) {
throw new PhutilArgumentUsageException(
pht(
'Either specify a list of files to purge, or use `%s` '.
'to purge all files.',
'--all'));
}
$is_dry_run = $args->getArg('dry-run');
foreach ($iterator as $file) {
$fid = 'F'.$file->getID();
try {
$file->loadFileData();
$okay = true;
} catch (Exception $ex) {
$okay = false;
}
if ($okay) {
$console->writeOut(
"%s\n",
pht('%s: File data is OK, not purging.', $fid));
} else {
if ($is_dry_run) {
$console->writeOut(
"%s\n",
pht('%s: Would purge (dry run).', $fid));
} else {
$console->writeOut(
"%s\n",
pht('%s: Purging.', $fid));
$file->delete();
}
}
}
return 0;
}
}

View file

@ -113,11 +113,12 @@ final class PassphraseCredentialControl extends AphrontFormControl {
'a', 'a',
array( array(
'href' => '#', 'href' => '#',
'class' => 'button button-grey', 'class' => 'button button-grey mll',
'sigil' => 'passphrase-credential-add', 'sigil' => 'passphrase-credential-add',
'mustcapture' => true, 'mustcapture' => true,
'style' => 'height: 20px;', // move aphront-form to tables
), ),
pht('Add Credential')); pht('Add New Credential'));
} else { } else {
$button = null; $button = null;
} }

View file

@ -123,7 +123,8 @@ final class PhortunePaymentMethodCreateController
$next_uri = $this->getApplicationURI( $next_uri = $this->getApplicationURI(
"cart/{$cart_id}/checkout/?paymentMethodID=".$method->getID()); "cart/{$cart_id}/checkout/?paymentMethodID=".$method->getID());
} else if ($subscription_id) { } else if ($subscription_id) {
$next_uri = $cancel_uri; $next_uri = new PhutilURI($cancel_uri);
$next_uri->setQueryParam('added', true);
} else { } else {
$account_uri = $this->getApplicationURI($account->getID().'/'); $account_uri = $this->getApplicationURI($account->getID().'/');
$next_uri = new PhutilURI($account_uri); $next_uri = new PhutilURI($account_uri);

View file

@ -25,11 +25,12 @@ final class PhortunePaymentMethodDisableController
} }
$account = $method->getAccount(); $account = $method->getAccount();
$account_uri = $this->getApplicationURI($account->getID().'/'); $account_id = $account->getID();
$account_uri = $this->getApplicationURI("/account/billing/{$account_id}/");
if ($request->isFormPost()) { if ($request->isFormPost()) {
// TODO: ApplicationTransactions! // TODO: ApplicationTransactions!!!!
$method $method
->setStatus(PhortunePaymentMethod::STATUS_DISABLED) ->setStatus(PhortunePaymentMethod::STATUS_DISABLED)
->save(); ->save();

View file

@ -4,6 +4,7 @@ final class PhortuneSubscriptionEditController extends PhortuneController {
public function handleRequest(AphrontRequest $request) { public function handleRequest(AphrontRequest $request) {
$viewer = $this->getViewer(); $viewer = $this->getViewer();
$added = $request->getBool('added');
$subscription = id(new PhortuneSubscriptionQuery()) $subscription = id(new PhortuneSubscriptionQuery())
->setViewer($viewer) ->setViewer($viewer)
@ -112,6 +113,7 @@ final class PhortuneSubscriptionEditController extends PhortuneController {
pht('Subscription %d', $subscription->getID()), pht('Subscription %d', $subscription->getID()),
$view_uri); $view_uri);
$crumbs->addTextCrumb(pht('Edit')); $crumbs->addTextCrumb(pht('Edit'));
$crumbs->setBorder(true);
$uri = $this->getApplicationURI($account->getID().'/card/new/'); $uri = $this->getApplicationURI($account->getID().'/card/new/');
@ -127,15 +129,19 @@ final class PhortuneSubscriptionEditController extends PhortuneController {
), ),
pht('Add Payment Method...')); pht('Add Payment Method...'));
$form = id(new AphrontFormView()) $radio = id(new AphrontFormRadioButtonControl())
->setUser($viewer)
->appendChild(
id(new AphrontFormSelectControl())
->setName('defaultPaymentMethodPHID') ->setName('defaultPaymentMethodPHID')
->setLabel(pht('Autopay With')) ->setLabel(pht('Autopay With'))
->setValue($current_phid) ->setValue($current_phid)
->setError($e_method) ->setError($e_method);
->setOptions($options))
foreach ($options as $key => $value) {
$radio->addButton($key, $value, null);
}
$form = id(new AphrontFormView())
->setUser($viewer)
->appendChild($radio)
->appendChild( ->appendChild(
id(new AphrontFormMarkupControl()) id(new AphrontFormMarkupControl())
->setValue($add_method_button)) ->setValue($add_method_button))
@ -151,6 +157,13 @@ final class PhortuneSubscriptionEditController extends PhortuneController {
->setFormErrors($errors) ->setFormErrors($errors)
->appendChild($form); ->appendChild($form);
if ($added) {
$info_view = id(new PHUIInfoView())
->setSeverity(PHUIInfoView::SEVERITY_SUCCESS)
->appendChild(pht('Payment method has been successfully added.'));
$box->setInfoView($info_view);
}
$header = id(new PHUIHeaderView()) $header = id(new PHUIHeaderView())
->setHeader(pht('Edit %s', $subscription->getSubscriptionName())) ->setHeader(pht('Edit %s', $subscription->getSubscriptionName()))
->setHeaderIcon('fa-pencil'); ->setHeaderIcon('fa-pencil');

View file

@ -79,8 +79,7 @@ final class DifferentialReleephRequestFieldSpecification extends Phobject {
return null; return null;
} }
$status = $this->getRevision()->getStatus(); if ($this->getRevision()->isClosed()) {
if ($status == ArcanistDifferentialRevisionStatus::CLOSED) {
$verb = $tense[$this->releephAction]['past']; $verb = $tense[$this->releephAction]['past'];
} else { } else {
$verb = $tense[$this->releephAction]['future']; $verb = $tense[$this->releephAction]['future'];

View file

@ -203,10 +203,7 @@ abstract class PhabricatorRepositoryCommitMessageParserWorker
$revision->getID(), $revision->getID(),
$commit->getPHID()); $commit->getPHID());
$status_closed = ArcanistDifferentialRevisionStatus::CLOSED; $should_close = !$revision->isPublished() && $should_autoclose;
$should_close = ($revision->getStatus() != $status_closed) &&
$should_autoclose;
if ($should_close) { if ($should_close) {
$commit_close_xaction = id(new DifferentialTransaction()) $commit_close_xaction = id(new DifferentialTransaction())
->setTransactionType(DifferentialTransaction::TYPE_ACTION) ->setTransactionType(DifferentialTransaction::TYPE_ACTION)

View file

@ -0,0 +1,48 @@
<?php
final class PHUIBigInfoExample extends PhabricatorUIExample {
public function getName() {
return pht('Big Info View');
}
public function getDescription() {
return pht(
'Basic New User State information block.');
}
public function renderExample() {
$request = $this->getRequest();
$viewer = $request->getUser();
$image = PhabricatorFile::loadBuiltin($viewer,
'projects/v3/rocket.png');
$button = id(new PHUIButtonView())
->setTag('a')
->setText(pht('Launch Away'))
->setColor(PHUIButtonView::GREEN)
->setHref('#');
$views = array();
$views[] = id(new PHUIBigInfoView())
->setTitle(pht('Simply Slim'))
->setDescription(pht('A simple description'))
->addAction($button);
$views[] = id(new PHUIBigInfoView())
->setTitle(pht('Basicly Basic'))
->setIcon('fa-rocket')
->setDescription(pht('A more basic description'))
->addAction($button);
$views[] = id(new PHUIBigInfoView())
->setTitle(pht('A Modern Example'))
->setImage($image->getBestURI())
->setDescription(pht('A modern description with lots of frills.'))
->addAction($button);
return phutil_tag_div('ml', $views);
}
}

View file

@ -20,6 +20,7 @@ final class PHUIButtonExample extends PhabricatorUIExample {
$colors = array( $colors = array(
null, null,
PHUIButtonView::GREEN, PHUIButtonView::GREEN,
PHUIButtonView::RED,
PHUIButtonView::GREY, PHUIButtonView::GREY,
); );
$sizes = array(null, PHUIButtonView::SMALL); $sizes = array(null, PHUIButtonView::SMALL);

View file

@ -17,21 +17,19 @@ troubleshoot it.
Troubleshooting Autoclose Troubleshooting Autoclose
========================= =========================
You can check if a branch is currently configured to autoclose on the main You can check if a branch is currently configured to autoclose on the
repository view, or in the branches list view. Hover over the {icon check} or management page for the given repository under the branches menu item.
{icon times} icon and you should see one of these messages: You should see one of these statuses next to the name of the branch:
- {icon check} **Autoclose Enabled** Autoclose is active for this branch. - **Autoclose On** Autoclose is active for this branch.
- {icon times} **Repository Importing** This repository is still importing. - **Repository Importing** This repository is still importing.
Autoclose does not activate until a repository finishes importing for the Autoclose does not activate until a repository finishes importing for the
first time. This prevents situations where you import a repository and first time. This prevents situations where you import a repository and
accidentally close hundreds of related objects during import. Autoclose accidentally close hundreds of related objects during import. Autoclose
will activate for new commits after the initial import completes. will activate for new commits after the initial import completes.
- {icon times} **Repository Autoclose Disabled** Autoclose is disabled for - **Tracking Off** This branch is not tracked. Because it
this entire repository. You can enable it in **Edit Repository**.
- {icon times} **Branch Untracked** This branch is not tracked. Because it
is not tracked, commits on it won't be seen and won't be discovered. is not tracked, commits on it won't be seen and won't be discovered.
- {icon times} **Branch Autoclose Disabled** Autoclose is not enabled for - **Autoclose Off** Autoclose is not enabled for
this branch. You can adjust which branches autoclose in **Edit Repository**. this branch. You can adjust which branches autoclose in **Edit Repository**.
This option is only available in Git. This option is only available in Git.

View file

@ -27,10 +27,12 @@ final class DifferentialRevisionGraph
if ($object) { if ($object) {
$status_icon = $object->getStatusIcon(); $status_icon = $object->getStatusIcon();
$status_color = $object->getStatusIconColor();
$status_name = $object->getStatusDisplayName(); $status_name = $object->getStatusDisplayName();
$status = array( $status = array(
id(new PHUIIconView())->setIcon($status_icon), id(new PHUIIconView())
->setIcon($status_icon, $status_color),
' ', ' ',
$status_name, $status_name,
); );

View file

@ -46,10 +46,17 @@ final class PHUICurtainView extends AphrontTagView {
$panels = $this->renderPanels(); $panels = $this->renderPanels();
return id(new PHUIObjectBoxView()) $box = id(new PHUIObjectBoxView())
->appendChild($action_list) ->appendChild($action_list)
->appendChild($panels) ->appendChild($panels)
->addClass('phui-two-column-properties'); ->addClass('phui-two-column-properties');
// We want to hide this UI on mobile if there are no child panels
if (!$panels) {
$box->addClass('curtain-no-panels');
}
return $box;
} }
private function renderPanels() { private function renderPanels() {

View file

@ -49,6 +49,7 @@ final class PHUIBigInfoView extends AphrontTagView {
protected function getTagContent() { protected function getTagContent() {
require_celerity_resource('phui-big-info-view-css'); require_celerity_resource('phui-big-info-view-css');
$icon = null;
if ($this->icon) { if ($this->icon) {
$icon = id(new PHUIIconView()) $icon = id(new PHUIIconView())
->setIcon($this->icon) ->setIcon($this->icon)

View file

@ -5,6 +5,7 @@ final class PHUIButtonView extends AphrontTagView {
const GREEN = 'green'; const GREEN = 'green';
const GREY = 'grey'; const GREY = 'grey';
const BLUE = 'blue'; const BLUE = 'blue';
const RED = 'red';
const DISABLED = 'disabled'; const DISABLED = 'disabled';
const SMALL = 'small'; const SMALL = 'small';

View file

@ -95,7 +95,6 @@ final class PHUIInfoView extends AphrontTagView {
} }
public function addButton(PHUIButtonView $button) { public function addButton(PHUIButtonView $button) {
$button->setColor(PHUIButtonView::GREY);
$this->buttons[] = $button; $this->buttons[] = $button;
return $this; return $this;
} }

View file

@ -3,7 +3,7 @@
*/ */
.aphront-dialog-view { .aphront-dialog-view {
width: 560px; width: 580px;
margin: 32px auto 16px; margin: 32px auto 16px;
border: 1px solid {$lightblueborder}; border: 1px solid {$lightblueborder};
border-radius: 3px; border-radius: 3px;
@ -32,7 +32,7 @@
} }
.aphront-dialog-view-width-form { .aphront-dialog-view-width-form {
width: 640px; width: 820px;
} }
.aphront-dialog-view-width-full { .aphront-dialog-view-width-full {

View file

@ -184,6 +184,20 @@ a.handle-status-closed:hover {
box-shadow: 0 0 3px 0 rgba(0,0,0,0.2); box-shadow: 0 0 3px 0 rgba(0,0,0,0.2);
} }
.device .phabricator-standard-page-tabs {
margin-bottom: 20px;
}
.device-phone .phabricator-standard-page-tabs {
text-align: center;
}
.device-phone
.phabricator-standard-page-tabs.phui-list-view.phui-list-tabbar > li {
display: inline-block;
float: none;
}
.phabricator-standard-page-tabs.phui-list-tabbar .phui-list-item-href { .phabricator-standard-page-tabs.phui-list-tabbar .phui-list-item-href {
padding: 12px 24px; padding: 12px 24px;
} }

View file

@ -50,7 +50,9 @@ input[type="submit"] {
button .phui-icon-view, button .phui-icon-view,
a.button .phui-icon-view, a.button .phui-icon-view,
button.button-green .phui-icon-view, button.button-green .phui-icon-view,
a.button.button-green .phui-icon-view { a.button.button-green .phui-icon-view,
button.button-red .phui-icon-view,
a.button.button-red .phui-icon-view {
color: white; color: white;
} }
@ -76,6 +78,14 @@ a.button-green.button:visited {
background-image: {$green.button.gradient}; background-image: {$green.button.gradient};
} }
button.button-red,
a.button-red.button,
a.button-red.button:visited {
background-color: {$red.button.color};
border-color: {$red.button.color};
background-image: {$red.button.gradient};
}
button.button-grey, button.button-grey,
input[type="submit"].button-grey, input[type="submit"].button-grey,
a.button-grey, a.button-grey,
@ -123,6 +133,14 @@ button.button-green:hover {
transition: 0.1s; transition: 0.1s;
} }
a.button.button-red:hover,
button.button-red:hover {
border-color: #79150b;
background-color: #0DAD48;
background-image: {$red.button.hover};
transition: 0.1s;
}
body a.button.disabled:hover, body a.button.disabled:hover,
body button.disabled:hover, body button.disabled:hover,
body a.button.disabled:active, body a.button.disabled:active,

View file

@ -46,3 +46,7 @@
.phui-side-column .phui-curtain-panel-body .phui-tag-view { .phui-side-column .phui-curtain-panel-body .phui-tag-view {
white-space: pre-wrap; white-space: pre-wrap;
} }
.device .curtain-no-panels {
display: none;
}

View file

@ -196,6 +196,7 @@
.aphront-form-control-markup .aphront-form-input { .aphront-form-control-markup .aphront-form-input {
font-size: {$normalfontsize}; font-size: {$normalfontsize};
padding: 3px 0;
} }
.aphront-form-control-static .aphront-form-input { .aphront-form-control-static .aphront-form-input {

View file

@ -287,27 +287,39 @@ JX.behavior('fancy-datepicker', function(config, statics) {
}; };
function getValidDate() { function getValidDate() {
var written_date = new Date(value_y, value_m-1, value_d); var year_int = parseInt(value_y, 10);
if (isNaN(written_date.getTime())) { if (isNaN(year_int) || year_int < 0) {
return new Date(); return new Date();
} else {
//year 01 should be 2001, not 1901
if (written_date.getYear() < 70) {
value_y += 2000;
written_date = new Date(value_y, value_m-1, value_d);
} }
// adjust for a date like February 31 // If the user enters "11" for the year, interpret it as "2011" (which
var adjust = 1; // is almost certainly what they mean) not "1911" (which is the default
while (written_date.getMonth() !== value_m-1) { // behavior of Javascript).
written_date = new Date(value_y, value_m-1, value_d-adjust); if (year_int < 70) {
adjust++; year_int += 2000;
}
var month_int = parseInt(value_m, 10);
if (isNaN(month_int) || month_int < 1 || month_int > 12) {
return new Date();
}
// In Javascript, January is "0", not "1", so adjust the value down.
month_int = month_int - 1;
var day_int = parseInt(value_d, 10);
if (isNaN(day_int) || day_int < 1 || day_int > 31) {
return new Date();
}
var written_date = new Date(year_int, month_int, day_int);
if (isNaN(written_date.getTime())) {
return new Date();
} }
return written_date; return written_date;
} }
}
// Render the day-of-week and calendar views. // Render the day-of-week and calendar views.