mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-12 00:26:13 +01:00
(stable) Promote 2016 Week 51
This commit is contained in:
commit
cbba54413f
214 changed files with 5512 additions and 3880 deletions
|
@ -1 +0,0 @@
|
|||
../scripts/setup/manage_hunks.php
|
|
@ -9,7 +9,7 @@ return array(
|
|||
'names' => array(
|
||||
'conpherence.pkg.css' => '0b64e988',
|
||||
'conpherence.pkg.js' => '6249a1cf',
|
||||
'core.pkg.css' => '35e6c1ed',
|
||||
'core.pkg.css' => '55d12594',
|
||||
'core.pkg.js' => 'e4260032',
|
||||
'darkconsole.pkg.js' => 'e7393ebb',
|
||||
'differential.pkg.css' => 'a4ba74b5',
|
||||
|
@ -18,10 +18,10 @@ return array(
|
|||
'diffusion.pkg.js' => '84c8f8fd',
|
||||
'favicon.ico' => '30672e08',
|
||||
'maniphest.pkg.css' => '4845691a',
|
||||
'maniphest.pkg.js' => '949a7498',
|
||||
'maniphest.pkg.js' => '5ab2753f',
|
||||
'rsrc/css/aphront/aphront-bars.css' => '231ac33c',
|
||||
'rsrc/css/aphront/dark-console.css' => 'f54bf286',
|
||||
'rsrc/css/aphront/dialog-view.css' => '49b2a8a3',
|
||||
'rsrc/css/aphront/dialog-view.css' => '938f52c5',
|
||||
'rsrc/css/aphront/list-filter-view.css' => '5d6f0526',
|
||||
'rsrc/css/aphront/multi-column.css' => '84cc6640',
|
||||
'rsrc/css/aphront/notification.css' => '3f6c89c9',
|
||||
|
@ -42,7 +42,7 @@ return array(
|
|||
'rsrc/css/application/chatlog/chatlog.css' => 'd295b020',
|
||||
'rsrc/css/application/conduit/conduit-api.css' => '7bc725c4',
|
||||
'rsrc/css/application/config/config-options.css' => '0ede4c9b',
|
||||
'rsrc/css/application/config/config-page.css' => 'b80124ae',
|
||||
'rsrc/css/application/config/config-page.css' => 'c1d5121b',
|
||||
'rsrc/css/application/config/config-template.css' => '8f18fa41',
|
||||
'rsrc/css/application/config/setup-issue.css' => 'f794cfc3',
|
||||
'rsrc/css/application/config/unhandled-exception.css' => '4c96257a',
|
||||
|
@ -71,7 +71,7 @@ return array(
|
|||
'rsrc/css/application/diffusion/diffusion-source.css' => '68b30fd3',
|
||||
'rsrc/css/application/feed/feed.css' => 'ecd4ec57',
|
||||
'rsrc/css/application/files/global-drag-and-drop.css' => '5c1b47c2',
|
||||
'rsrc/css/application/flag/flag.css' => '5337623f',
|
||||
'rsrc/css/application/flag/flag.css' => 'bba8f811',
|
||||
'rsrc/css/application/harbormaster/harbormaster.css' => 'f491c9f4',
|
||||
'rsrc/css/application/herald/herald-test.css' => 'a52e323e',
|
||||
'rsrc/css/application/herald/herald.css' => 'dc31f6e9',
|
||||
|
@ -83,7 +83,7 @@ return array(
|
|||
'rsrc/css/application/owners/owners-path-editor.css' => '2f00933b',
|
||||
'rsrc/css/application/paste/paste.css' => '1898e534',
|
||||
'rsrc/css/application/people/people-profile.css' => '2473d929',
|
||||
'rsrc/css/application/phame/phame.css' => '654dd9ef',
|
||||
'rsrc/css/application/phame/phame.css' => 'aeb61182',
|
||||
'rsrc/css/application/pholio/pholio-edit.css' => '07676f51',
|
||||
'rsrc/css/application/pholio/pholio-inline-comments.css' => '8e545e49',
|
||||
'rsrc/css/application/pholio/pholio.css' => 'ca89d380',
|
||||
|
@ -97,13 +97,13 @@ return array(
|
|||
'rsrc/css/application/policy/policy.css' => '957ea14c',
|
||||
'rsrc/css/application/ponder/ponder-view.css' => 'fbd45f96',
|
||||
'rsrc/css/application/project/project-card-view.css' => '9418c97d',
|
||||
'rsrc/css/application/project/project-view.css' => '55d99221',
|
||||
'rsrc/css/application/project/project-view.css' => '1e6f7072',
|
||||
'rsrc/css/application/releeph/releeph-core.css' => '9b3c5733',
|
||||
'rsrc/css/application/releeph/releeph-preview-branch.css' => 'b7a6f4a5',
|
||||
'rsrc/css/application/releeph/releeph-request-differential-create-dialog.css' => '8d8b92cd',
|
||||
'rsrc/css/application/releeph/releeph-request-typeahead.css' => '667a48ae',
|
||||
'rsrc/css/application/search/application-search-view.css' => '8452c849',
|
||||
'rsrc/css/application/search/search-results.css' => '7dea472c',
|
||||
'rsrc/css/application/search/search-results.css' => '64ad079a',
|
||||
'rsrc/css/application/slowvote/slowvote.css' => 'a94b7230',
|
||||
'rsrc/css/application/tokens/tokens.css' => '3d0f239e',
|
||||
'rsrc/css/application/uiexample/example.css' => '528b19de',
|
||||
|
@ -117,23 +117,29 @@ return array(
|
|||
'rsrc/css/font/font-lato.css' => 'c7ccd872',
|
||||
'rsrc/css/font/phui-font-icon-base.css' => '870a7360',
|
||||
'rsrc/css/layout/phabricator-filetree-view.css' => 'fccf9f82',
|
||||
'rsrc/css/layout/phabricator-source-code-view.css' => 'cbeef983',
|
||||
'rsrc/css/layout/phabricator-source-code-view.css' => '4383192f',
|
||||
'rsrc/css/phui/calendar/phui-calendar-day.css' => '572b1893',
|
||||
'rsrc/css/phui/calendar/phui-calendar-list.css' => 'fcc9fb41',
|
||||
'rsrc/css/phui/calendar/phui-calendar-month.css' => '8e10e92c',
|
||||
'rsrc/css/phui/calendar/phui-calendar.css' => '477acfaa',
|
||||
'rsrc/css/phui/object-item/phui-oi-big-ui.css' => '19f9369b',
|
||||
'rsrc/css/phui/object-item/phui-oi-color.css' => 'cd2b9b77',
|
||||
'rsrc/css/phui/object-item/phui-oi-drag-ui.css' => 'f12cbc9f',
|
||||
'rsrc/css/phui/object-item/phui-oi-flush-ui.css' => '9d9685d6',
|
||||
'rsrc/css/phui/object-item/phui-oi-list-view.css' => 'bff632a4',
|
||||
'rsrc/css/phui/object-item/phui-oi-simple-ui.css' => 'a8beebea',
|
||||
'rsrc/css/phui/phui-action-list.css' => 'e1d48300',
|
||||
'rsrc/css/phui/phui-action-panel.css' => '91c7b835',
|
||||
'rsrc/css/phui/phui-badge.css' => '3baef8db',
|
||||
'rsrc/css/phui/phui-basic-nav-view.css' => '7093573b',
|
||||
'rsrc/css/phui/phui-big-info-view.css' => 'bd903741',
|
||||
'rsrc/css/phui/phui-box.css' => '5c8387cf',
|
||||
'rsrc/css/phui/phui-button.css' => '4a5fbe3d',
|
||||
'rsrc/css/phui/phui-box.css' => '33b629f8',
|
||||
'rsrc/css/phui/phui-button.css' => '43f4912e',
|
||||
'rsrc/css/phui/phui-chart.css' => '6bf6f78e',
|
||||
'rsrc/css/phui/phui-cms.css' => 'be43c8a8',
|
||||
'rsrc/css/phui/phui-comment-form.css' => 'c953b75e',
|
||||
'rsrc/css/phui/phui-comment-panel.css' => 'f50152ad',
|
||||
'rsrc/css/phui/phui-crumbs-view.css' => '195ac419',
|
||||
'rsrc/css/phui/phui-crumbs-view.css' => 'f82868f2',
|
||||
'rsrc/css/phui/phui-curtain-view.css' => '947bf1a4',
|
||||
'rsrc/css/phui/phui-document-pro.css' => 'c354e312',
|
||||
'rsrc/css/phui/phui-document-summary.css' => '9ca48bdf',
|
||||
|
@ -154,7 +160,6 @@ return array(
|
|||
'rsrc/css/phui/phui-lightbox.css' => '0a035e40',
|
||||
'rsrc/css/phui/phui-list.css' => '9da2aa00',
|
||||
'rsrc/css/phui/phui-object-box.css' => '6b487c57',
|
||||
'rsrc/css/phui/phui-object-item-list-view.css' => '87278fa0',
|
||||
'rsrc/css/phui/phui-pager.css' => 'bea33d23',
|
||||
'rsrc/css/phui/phui-pinboard-view.css' => '2495140e',
|
||||
'rsrc/css/phui/phui-profile-menu.css' => '4768721a',
|
||||
|
@ -163,13 +168,13 @@ return array(
|
|||
'rsrc/css/phui/phui-segment-bar-view.css' => '46342871',
|
||||
'rsrc/css/phui/phui-spacing.css' => '042804d6',
|
||||
'rsrc/css/phui/phui-status.css' => 'd5263e49',
|
||||
'rsrc/css/phui/phui-tag-view.css' => '6bbd83e2',
|
||||
'rsrc/css/phui/phui-tag-view.css' => '84d65f26',
|
||||
'rsrc/css/phui/phui-timeline-view.css' => 'bc523970',
|
||||
'rsrc/css/phui/phui-two-column-view.css' => 'ee61d056',
|
||||
'rsrc/css/phui/phui-two-column-view.css' => '7babf5b9',
|
||||
'rsrc/css/phui/workboards/phui-workboard-color.css' => 'b60ef38a',
|
||||
'rsrc/css/phui/workboards/phui-workboard.css' => '16441d5e',
|
||||
'rsrc/css/phui/workboards/phui-workcard.css' => '0c62d7c5',
|
||||
'rsrc/css/phui/workboards/phui-workpanel.css' => '92197373',
|
||||
'rsrc/css/phui/workboards/phui-workcard.css' => '00979e40',
|
||||
'rsrc/css/phui/workboards/phui-workpanel.css' => 'a3a63478',
|
||||
'rsrc/css/sprite-login.css' => '587d92d7',
|
||||
'rsrc/css/sprite-tokens.css' => '9cdfd599',
|
||||
'rsrc/css/syntax/syntax-default.css' => '9923583c',
|
||||
|
@ -420,7 +425,7 @@ return array(
|
|||
'rsrc/js/application/herald/PathTypeahead.js' => 'f7fc67ec',
|
||||
'rsrc/js/application/herald/herald-rule-editor.js' => '7ebaeed3',
|
||||
'rsrc/js/application/maniphest/behavior-batch-editor.js' => '782ab6e7',
|
||||
'rsrc/js/application/maniphest/behavior-batch-selector.js' => '7b98d7c5',
|
||||
'rsrc/js/application/maniphest/behavior-batch-selector.js' => '0825c27a',
|
||||
'rsrc/js/application/maniphest/behavior-line-chart.js' => 'e4232876',
|
||||
'rsrc/js/application/maniphest/behavior-list-edit.js' => 'a9f88de2',
|
||||
'rsrc/js/application/maniphest/behavior-subpriorityeditor.js' => '71237763',
|
||||
|
@ -544,7 +549,7 @@ return array(
|
|||
'almanac-css' => 'dbb9b3af',
|
||||
'aphront-bars' => '231ac33c',
|
||||
'aphront-dark-console-css' => 'f54bf286',
|
||||
'aphront-dialog-view-css' => '49b2a8a3',
|
||||
'aphront-dialog-view-css' => '938f52c5',
|
||||
'aphront-list-filter-view-css' => '5d6f0526',
|
||||
'aphront-multi-column-view-css' => '84cc6640',
|
||||
'aphront-panel-view-css' => '8427b78d',
|
||||
|
@ -558,7 +563,7 @@ return array(
|
|||
'changeset-view-manager' => 'a2828756',
|
||||
'conduit-api-css' => '7bc725c4',
|
||||
'config-options-css' => '0ede4c9b',
|
||||
'config-page-css' => 'b80124ae',
|
||||
'config-page-css' => 'c1d5121b',
|
||||
'conpherence-durable-column-view' => 'd82e130c',
|
||||
'conpherence-header-pane-css' => '1c81cda6',
|
||||
'conpherence-menu-css' => '4f51db5a',
|
||||
|
@ -654,7 +659,7 @@ return array(
|
|||
'javelin-behavior-line-chart' => 'e4232876',
|
||||
'javelin-behavior-load-blame' => '42126667',
|
||||
'javelin-behavior-maniphest-batch-editor' => '782ab6e7',
|
||||
'javelin-behavior-maniphest-batch-selector' => '7b98d7c5',
|
||||
'javelin-behavior-maniphest-batch-selector' => '0825c27a',
|
||||
'javelin-behavior-maniphest-list-editor' => 'a9f88de2',
|
||||
'javelin-behavior-maniphest-subpriority-editor' => '71237763',
|
||||
'javelin-behavior-owners-path-editor' => '7a68dda3',
|
||||
|
@ -790,7 +795,7 @@ return array(
|
|||
'phabricator-feed-css' => 'ecd4ec57',
|
||||
'phabricator-file-upload' => '680ea2c8',
|
||||
'phabricator-filetree-view-css' => 'fccf9f82',
|
||||
'phabricator-flag-css' => '5337623f',
|
||||
'phabricator-flag-css' => 'bba8f811',
|
||||
'phabricator-keyboard-shortcut' => '1ae869f2',
|
||||
'phabricator-keyboard-shortcut-manager' => '4a021c10',
|
||||
'phabricator-main-menu-view' => 'f03e17be',
|
||||
|
@ -802,10 +807,10 @@ return array(
|
|||
'phabricator-phtize' => 'd254d646',
|
||||
'phabricator-prefab' => '8d40ae75',
|
||||
'phabricator-remarkup-css' => '8606d9c6',
|
||||
'phabricator-search-results-css' => '7dea472c',
|
||||
'phabricator-search-results-css' => '64ad079a',
|
||||
'phabricator-shaped-request' => '7cbe244b',
|
||||
'phabricator-slowvote-css' => 'a94b7230',
|
||||
'phabricator-source-code-view-css' => 'cbeef983',
|
||||
'phabricator-source-code-view-css' => '4383192f',
|
||||
'phabricator-standard-page-view' => '894d8a25',
|
||||
'phabricator-textareautils' => '320810c8',
|
||||
'phabricator-title' => '485aaa6c',
|
||||
|
@ -822,7 +827,7 @@ return array(
|
|||
'phabricator-uiexample-reactor-sendclass' => '1def2711',
|
||||
'phabricator-uiexample-reactor-sendproperties' => 'b1f0ccee',
|
||||
'phabricator-zindex-css' => 'd1270942',
|
||||
'phame-css' => '654dd9ef',
|
||||
'phame-css' => 'aeb61182',
|
||||
'pholio-css' => 'ca89d380',
|
||||
'pholio-edit-css' => '07676f51',
|
||||
'pholio-inline-comments-css' => '8e545e49',
|
||||
|
@ -836,8 +841,8 @@ return array(
|
|||
'phui-badge-view-css' => '3baef8db',
|
||||
'phui-basic-nav-view-css' => '7093573b',
|
||||
'phui-big-info-view-css' => 'bd903741',
|
||||
'phui-box-css' => '5c8387cf',
|
||||
'phui-button-css' => '4a5fbe3d',
|
||||
'phui-box-css' => '33b629f8',
|
||||
'phui-button-css' => '43f4912e',
|
||||
'phui-calendar-css' => '477acfaa',
|
||||
'phui-calendar-day-css' => '572b1893',
|
||||
'phui-calendar-list-css' => 'fcc9fb41',
|
||||
|
@ -846,7 +851,7 @@ return array(
|
|||
'phui-cms-css' => 'be43c8a8',
|
||||
'phui-comment-form-css' => 'c953b75e',
|
||||
'phui-comment-panel-css' => 'f50152ad',
|
||||
'phui-crumbs-view-css' => '195ac419',
|
||||
'phui-crumbs-view-css' => 'f82868f2',
|
||||
'phui-curtain-view-css' => '947bf1a4',
|
||||
'phui-document-summary-view-css' => '9ca48bdf',
|
||||
'phui-document-view-css' => 'c32e8dec',
|
||||
|
@ -870,7 +875,12 @@ return array(
|
|||
'phui-lightbox-css' => '0a035e40',
|
||||
'phui-list-view-css' => '9da2aa00',
|
||||
'phui-object-box-css' => '6b487c57',
|
||||
'phui-object-item-list-view-css' => '87278fa0',
|
||||
'phui-oi-big-ui-css' => '19f9369b',
|
||||
'phui-oi-color-css' => 'cd2b9b77',
|
||||
'phui-oi-drag-ui-css' => 'f12cbc9f',
|
||||
'phui-oi-flush-ui-css' => '9d9685d6',
|
||||
'phui-oi-list-view-css' => 'bff632a4',
|
||||
'phui-oi-simple-ui-css' => 'a8beebea',
|
||||
'phui-pager-css' => 'bea33d23',
|
||||
'phui-pinboard-view-css' => '2495140e',
|
||||
'phui-profile-menu-css' => '4768721a',
|
||||
|
@ -879,14 +889,14 @@ return array(
|
|||
'phui-segment-bar-view-css' => '46342871',
|
||||
'phui-spacing-css' => '042804d6',
|
||||
'phui-status-list-view-css' => 'd5263e49',
|
||||
'phui-tag-view-css' => '6bbd83e2',
|
||||
'phui-tag-view-css' => '84d65f26',
|
||||
'phui-theme-css' => '798c69b8',
|
||||
'phui-timeline-view-css' => 'bc523970',
|
||||
'phui-two-column-view-css' => 'ee61d056',
|
||||
'phui-two-column-view-css' => '7babf5b9',
|
||||
'phui-workboard-color-css' => 'b60ef38a',
|
||||
'phui-workboard-view-css' => '16441d5e',
|
||||
'phui-workcard-view-css' => '0c62d7c5',
|
||||
'phui-workpanel-view-css' => '92197373',
|
||||
'phui-workcard-view-css' => '00979e40',
|
||||
'phui-workpanel-view-css' => 'a3a63478',
|
||||
'phuix-action-list-view' => 'b5c256b8',
|
||||
'phuix-action-view' => '8cf6d262',
|
||||
'phuix-autocomplete' => '6d86ce8b',
|
||||
|
@ -898,7 +908,7 @@ return array(
|
|||
'policy-transaction-detail-css' => '82100a43',
|
||||
'ponder-view-css' => 'fbd45f96',
|
||||
'project-card-view-css' => '9418c97d',
|
||||
'project-view-css' => '55d99221',
|
||||
'project-view-css' => '1e6f7072',
|
||||
'releeph-core' => '9b3c5733',
|
||||
'releeph-preview-branch' => 'b7a6f4a5',
|
||||
'releeph-request-differential-create-dialog' => '8d8b92cd',
|
||||
|
@ -961,6 +971,12 @@ return array(
|
|||
'phabricator-prefab',
|
||||
'phuix-icon-view',
|
||||
),
|
||||
'0825c27a' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
'javelin-stratcom',
|
||||
'javelin-util',
|
||||
),
|
||||
'08675c6d' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-behavior-device',
|
||||
|
@ -1040,6 +1056,9 @@ return array(
|
|||
'185bbd53' => array(
|
||||
'javelin-install',
|
||||
),
|
||||
'19f9369b' => array(
|
||||
'phui-oi-list-view-css',
|
||||
),
|
||||
'1aa4c968' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-stratcom',
|
||||
|
@ -1522,12 +1541,6 @@ return array(
|
|||
'owners-path-editor',
|
||||
'javelin-behavior',
|
||||
),
|
||||
'7b98d7c5' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
'javelin-stratcom',
|
||||
'javelin-util',
|
||||
),
|
||||
'7cbe244b' => array(
|
||||
'javelin-install',
|
||||
'javelin-util',
|
||||
|
@ -1650,9 +1663,6 @@ return array(
|
|||
'javelin-dom',
|
||||
'javelin-request',
|
||||
),
|
||||
92197373 => array(
|
||||
'phui-workcard-view-css',
|
||||
),
|
||||
'92b9ec77' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-stratcom',
|
||||
|
@ -1718,6 +1728,9 @@ return array(
|
|||
'javelin-workflow',
|
||||
'javelin-stratcom',
|
||||
),
|
||||
'9d9685d6' => array(
|
||||
'phui-oi-list-view-css',
|
||||
),
|
||||
'9f36c42d' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-stratcom',
|
||||
|
@ -1747,6 +1760,9 @@ return array(
|
|||
'javelin-behavior-device',
|
||||
'javelin-vector',
|
||||
),
|
||||
'a3a63478' => array(
|
||||
'phui-workcard-view-css',
|
||||
),
|
||||
'a464fe03' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-uri',
|
||||
|
@ -1762,6 +1778,9 @@ return array(
|
|||
'javelin-stratcom',
|
||||
'javelin-dom',
|
||||
),
|
||||
'a8beebea' => array(
|
||||
'phui-oi-list-view-css',
|
||||
),
|
||||
'a8d8459d' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
|
@ -1980,6 +1999,9 @@ return array(
|
|||
'javelin-util',
|
||||
'phabricator-notification-css',
|
||||
),
|
||||
'cd2b9b77' => array(
|
||||
'phui-oi-list-view-css',
|
||||
),
|
||||
'd0c516d5' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
|
@ -2149,6 +2171,9 @@ return array(
|
|||
'f03e17be' => array(
|
||||
'phui-theme-css',
|
||||
),
|
||||
'f12cbc9f' => array(
|
||||
'phui-oi-list-view-css',
|
||||
),
|
||||
'f2e58483' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
|
@ -2285,7 +2310,12 @@ return array(
|
|||
'phabricator-nav-view-css',
|
||||
'phui-basic-nav-view-css',
|
||||
'phui-crumbs-view-css',
|
||||
'phui-object-item-list-view-css',
|
||||
'phui-oi-list-view-css',
|
||||
'phui-oi-color-css',
|
||||
'phui-oi-big-ui-css',
|
||||
'phui-oi-drag-ui-css',
|
||||
'phui-oi-simple-ui-css',
|
||||
'phui-oi-flush-ui-css',
|
||||
'global-drag-and-drop-css',
|
||||
'phui-spacing-css',
|
||||
'phui-form-css',
|
||||
|
|
|
@ -117,7 +117,12 @@ return array(
|
|||
'phabricator-nav-view-css',
|
||||
'phui-basic-nav-view-css',
|
||||
'phui-crumbs-view-css',
|
||||
'phui-object-item-list-view-css',
|
||||
'phui-oi-list-view-css',
|
||||
'phui-oi-color-css',
|
||||
'phui-oi-big-ui-css',
|
||||
'phui-oi-drag-ui-css',
|
||||
'phui-oi-simple-ui-css',
|
||||
'phui-oi-flush-ui-css',
|
||||
'global-drag-and-drop-css',
|
||||
'phui-spacing-css',
|
||||
'phui-form-css',
|
||||
|
|
|
@ -4,27 +4,30 @@ $project_table = new PhabricatorProject();
|
|||
$table_name = $project_table->getTableName();
|
||||
$conn_w = $project_table->establishConnection('w');
|
||||
$slug_table_name = id(new PhabricatorProjectSlug())->getTableName();
|
||||
$time = time();
|
||||
$time = PhabricatorTime::getNow();
|
||||
|
||||
echo pht('Migrating project phriction slugs...')."\n";
|
||||
echo pht('Migrating projects to slugs...')."\n";
|
||||
foreach (new LiskMigrationIterator($project_table) as $project) {
|
||||
$id = $project->getID();
|
||||
|
||||
echo pht('Migrating project %d...', $id)."\n";
|
||||
$phriction_slug = rtrim($project->getPhrictionSlug(), '/');
|
||||
|
||||
$slug_text = PhabricatorSlug::normalizeProjectSlug($project->getName());
|
||||
$slug = id(new PhabricatorProjectSlug())
|
||||
->loadOneWhere('slug = %s', $phriction_slug);
|
||||
->loadOneWhere('slug = %s', $slug_text);
|
||||
|
||||
if ($slug) {
|
||||
echo pht('Already migrated %d... Continuing.', $id)."\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
queryfx(
|
||||
$conn_w,
|
||||
'INSERT INTO %T (projectPHID, slug, dateCreated, dateModified) '.
|
||||
'VALUES (%s, %s, %d, %d)',
|
||||
$slug_table_name,
|
||||
$project->getPHID(),
|
||||
$phriction_slug,
|
||||
$slug_text,
|
||||
$time,
|
||||
$time);
|
||||
echo pht('Migrated %d.', $id)."\n";
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
$project_table = new PhabricatorProject();
|
||||
$conn_w = $project_table->establishConnection('w');
|
||||
|
||||
$panel_table = id(new PhabricatorProfilePanelConfiguration());
|
||||
$panel_table = id(new PhabricatorProfileMenuItemConfiguration());
|
||||
$panel_conn = $panel_table->establishConnection('w');
|
||||
|
||||
foreach (new LiskMigrationIterator($project_table) as $project) {
|
||||
|
@ -50,9 +50,9 @@ foreach (new LiskMigrationIterator($project_table) as $project) {
|
|||
$panel_table->getTableName(),
|
||||
$panel_table->generatePHID(),
|
||||
$project->getPHID(),
|
||||
PhabricatorProjectWorkboardProfilePanel::PANELKEY,
|
||||
PhabricatorProject::PANEL_WORKBOARD,
|
||||
PhabricatorProfilePanelConfiguration::VISIBILITY_DEFAULT,
|
||||
PhabricatorProjectWorkboardProfileMenuItem::MENUITEMKEY,
|
||||
PhabricatorProject::ITEM_WORKBOARD,
|
||||
PhabricatorProfileMenuItemConfiguration::VISIBILITY_DEFAULT,
|
||||
'{}',
|
||||
2,
|
||||
PhabricatorTime::getNow(),
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE {$NAMESPACE}_dashboard.dashboard
|
||||
ADD authorPHID VARBINARY(64) NOT NULL;
|
39
resources/sql/autopatches/20161210.dashboards.02.author.php
Normal file
39
resources/sql/autopatches/20161210.dashboards.02.author.php
Normal file
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
// Set authorPHID on Dashboards
|
||||
//
|
||||
$table = new PhabricatorDashboard();
|
||||
$conn_w = $table->establishConnection('w');
|
||||
|
||||
$txn_table = new PhabricatorDashboardTransaction();
|
||||
$txn_conn = $table->establishConnection('r');
|
||||
|
||||
echo pht("Building Dashboard authorPHIDs...\n");
|
||||
|
||||
foreach (new LiskMigrationIterator($table) as $dashboard) {
|
||||
|
||||
if ($dashboard->getAuthorPHID()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$author_row = queryfx_one(
|
||||
$txn_conn,
|
||||
'SELECT authorPHID FROM %T WHERE objectPHID = %s ORDER BY id ASC LIMIT 1',
|
||||
$txn_table->getTableName(),
|
||||
$dashboard->getPHID());
|
||||
|
||||
if (!$author_row) {
|
||||
$author_phid = id(new PhabricatorDashboardApplication())->getPHID();
|
||||
} else {
|
||||
$author_phid = $author_row['authorPHID'];
|
||||
}
|
||||
|
||||
queryfx(
|
||||
$conn_w,
|
||||
'UPDATE %T SET authorPHID = %s WHERE id = %d',
|
||||
$table->getTableName(),
|
||||
$author_phid,
|
||||
$dashboard->getID());
|
||||
}
|
||||
|
||||
echo pht("Done\n");
|
2
resources/sql/autopatches/20161211.menu.01.itemkey.sql
Normal file
2
resources/sql/autopatches/20161211.menu.01.itemkey.sql
Normal file
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE {$NAMESPACE}_search.search_profilepanelconfiguration
|
||||
CHANGE panelKey menuItemKey VARCHAR(64) NOT NULL COLLATE {$COLLATE_TEXT};
|
3
resources/sql/autopatches/20161211.menu.02.itemprops.sql
Normal file
3
resources/sql/autopatches/20161211.menu.02.itemprops.sql
Normal file
|
@ -0,0 +1,3 @@
|
|||
ALTER TABLE {$NAMESPACE}_search.search_profilepanelconfiguration
|
||||
CHANGE panelProperties menuItemProperties
|
||||
LONGTEXT NOT NULL COLLATE {$COLLATE_TEXT};
|
2
resources/sql/autopatches/20161211.menu.03.order.sql
Normal file
2
resources/sql/autopatches/20161211.menu.03.order.sql
Normal file
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE {$NAMESPACE}_search.search_profilepanelconfiguration
|
||||
CHANGE panelOrder menuItemOrder INT UNSIGNED;
|
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE {$NAMESPACE}_dashboard.dashboard_panel
|
||||
ADD authorPHID VARBINARY(64) NOT NULL;
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
// Set authorPHID on Dashboard Panels
|
||||
//
|
||||
$table = new PhabricatorDashboardPanel();
|
||||
$conn_w = $table->establishConnection('w');
|
||||
|
||||
$txn_table = new PhabricatorDashboardPanelTransaction();
|
||||
$txn_conn = $table->establishConnection('r');
|
||||
|
||||
echo pht("Building Dashboard Panel authorPHIDs...\n");
|
||||
|
||||
foreach (new LiskMigrationIterator($table) as $panel) {
|
||||
|
||||
if ($panel->getAuthorPHID()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$panel_row = queryfx_one(
|
||||
$txn_conn,
|
||||
'SELECT authorPHID FROM %T WHERE objectPHID = %s ORDER BY id ASC LIMIT 1',
|
||||
$txn_table->getTableName(),
|
||||
$panel->getPHID());
|
||||
|
||||
if (!$panel_row) {
|
||||
$author_phid = id(new PhabricatorDashboardApplication())->getPHID();
|
||||
} else {
|
||||
$author_phid = $panel_row['authorPHID'];
|
||||
}
|
||||
|
||||
queryfx(
|
||||
$conn_w,
|
||||
'UPDATE %T SET authorPHID = %s WHERE id = %d',
|
||||
$table->getTableName(),
|
||||
$author_phid,
|
||||
$panel->getID());
|
||||
}
|
||||
|
||||
echo pht("Done\n");
|
|
@ -0,0 +1,5 @@
|
|||
ALTER TABLE {$NAMESPACE}_dashboard.dashboard
|
||||
ADD icon VARCHAR(32) NOT NULL;
|
||||
|
||||
UPDATE {$NAMESPACE}_dashboard.dashboard
|
||||
SET icon = 'fa-dashboard';
|
38
resources/sql/autopatches/20161213.diff.01.hunks.php
Normal file
38
resources/sql/autopatches/20161213.diff.01.hunks.php
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
$conn = id(new DifferentialRevision())->establishConnection('w');
|
||||
$src_table = 'differential_hunk';
|
||||
$dst_table = 'differential_hunk_modern';
|
||||
|
||||
echo tsprintf(
|
||||
"%s\n",
|
||||
pht('Migrating old hunks...'));
|
||||
|
||||
foreach (new LiskRawMigrationIterator($conn, $src_table) as $row) {
|
||||
queryfx(
|
||||
$conn,
|
||||
'INSERT INTO %T
|
||||
(changesetID, oldOffset, oldLen, newOffset, newLen,
|
||||
dataType, dataEncoding, dataFormat, data,
|
||||
dateCreated, dateModified)
|
||||
VALUES
|
||||
(%d, %d, %d, %d, %d,
|
||||
%s, %s, %s, %s,
|
||||
%d, %d)',
|
||||
$dst_table,
|
||||
$row['changesetID'],
|
||||
$row['oldOffset'],
|
||||
$row['oldLen'],
|
||||
$row['newOffset'],
|
||||
$row['newLen'],
|
||||
DifferentialModernHunk::DATATYPE_TEXT,
|
||||
'utf8',
|
||||
DifferentialModernHunk::DATAFORMAT_RAW,
|
||||
$row['changes'],
|
||||
$row['dateCreated'],
|
||||
$row['dateModified']);
|
||||
}
|
||||
|
||||
echo tsprintf(
|
||||
"%s\n",
|
||||
pht('Done.'));
|
15
resources/sql/autopatches/20161216.dashboard.ngram.01.sql
Normal file
15
resources/sql/autopatches/20161216.dashboard.ngram.01.sql
Normal file
|
@ -0,0 +1,15 @@
|
|||
CREATE TABLE {$NAMESPACE}_dashboard.dashboard_dashboard_ngrams (
|
||||
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
objectID INT UNSIGNED NOT NULL,
|
||||
ngram CHAR(3) NOT NULL COLLATE {$COLLATE_TEXT},
|
||||
KEY `key_object` (objectID),
|
||||
KEY `key_ngram` (ngram, objectID)
|
||||
) ENGINE=InnoDB, COLLATE {$COLLATE_TEXT};
|
||||
|
||||
CREATE TABLE {$NAMESPACE}_dashboard.dashboard_dashboardpanel_ngrams (
|
||||
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
objectID INT UNSIGNED NOT NULL,
|
||||
ngram CHAR(3) NOT NULL COLLATE {$COLLATE_TEXT},
|
||||
KEY `key_object` (objectID),
|
||||
KEY `key_ngram` (ngram, objectID)
|
||||
) ENGINE=InnoDB, COLLATE {$COLLATE_TEXT};
|
21
resources/sql/autopatches/20161216.dashboard.ngram.02.php
Normal file
21
resources/sql/autopatches/20161216.dashboard.ngram.02.php
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
$table_db = new PhabricatorDashboard();
|
||||
|
||||
foreach (new LiskMigrationIterator($table_db) as $dashboard) {
|
||||
PhabricatorSearchWorker::queueDocumentForIndexing(
|
||||
$dashboard->getPHID(),
|
||||
array(
|
||||
'force' => true,
|
||||
));
|
||||
}
|
||||
|
||||
$table_dbp = new PhabricatorDashboardPanel();
|
||||
|
||||
foreach (new LiskMigrationIterator($table_dbp) as $panel) {
|
||||
PhabricatorSearchWorker::queueDocumentForIndexing(
|
||||
$panel->getPHID(),
|
||||
array(
|
||||
'force' => true,
|
||||
));
|
||||
}
|
|
@ -96,7 +96,9 @@ function rename_project($project, $projects) {
|
|||
if ($other->getID() == $project->getID()) {
|
||||
continue;
|
||||
}
|
||||
if ($other->getPhrictionSlug() == $new_slug) {
|
||||
|
||||
$other_slug = PhabricatorSlug::normalizeProjectSlug($other->getName());
|
||||
if ($other_slug == $new_slug) {
|
||||
$okay = false;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
$root = dirname(dirname(dirname(__FILE__)));
|
||||
require_once $root.'/scripts/__init_script__.php';
|
||||
|
||||
$args = new PhutilArgumentParser($argv);
|
||||
$args->setTagline(pht('manage hunks'));
|
||||
$args->setSynopsis(<<<EOSYNOPSIS
|
||||
**hunks** __command__ [__options__]
|
||||
Manage Differential hunk storage.
|
||||
|
||||
EOSYNOPSIS
|
||||
);
|
||||
$args->parseStandardArguments();
|
||||
|
||||
$workflows = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('PhabricatorHunksManagementWorkflow')
|
||||
->execute();
|
||||
$workflows[] = new PhutilHelpArgumentWorkflow();
|
||||
$args->parseWorkflows($workflows);
|
|
@ -351,10 +351,10 @@ phutil_register_library_map(array(
|
|||
'DifferentialAddCommentView' => 'applications/differential/view/DifferentialAddCommentView.php',
|
||||
'DifferentialAdjustmentMapTestCase' => 'applications/differential/storage/__tests__/DifferentialAdjustmentMapTestCase.php',
|
||||
'DifferentialAffectedPath' => 'applications/differential/storage/DifferentialAffectedPath.php',
|
||||
'DifferentialApplyPatchField' => 'applications/differential/customfield/DifferentialApplyPatchField.php',
|
||||
'DifferentialAsanaRepresentationField' => 'applications/differential/customfield/DifferentialAsanaRepresentationField.php',
|
||||
'DifferentialAuditorsCommitMessageField' => 'applications/differential/field/DifferentialAuditorsCommitMessageField.php',
|
||||
'DifferentialAuditorsField' => 'applications/differential/customfield/DifferentialAuditorsField.php',
|
||||
'DifferentialAuthorField' => 'applications/differential/customfield/DifferentialAuthorField.php',
|
||||
'DifferentialBlameRevisionCommitMessageField' => 'applications/differential/field/DifferentialBlameRevisionCommitMessageField.php',
|
||||
'DifferentialBlameRevisionField' => 'applications/differential/customfield/DifferentialBlameRevisionField.php',
|
||||
'DifferentialBlockHeraldAction' => 'applications/differential/herald/DifferentialBlockHeraldAction.php',
|
||||
'DifferentialBlockingReviewerDatasource' => 'applications/differential/typeahead/DifferentialBlockingReviewerDatasource.php',
|
||||
|
@ -379,15 +379,16 @@ phutil_register_library_map(array(
|
|||
'DifferentialChangesetTwoUpRenderer' => 'applications/differential/render/DifferentialChangesetTwoUpRenderer.php',
|
||||
'DifferentialChangesetTwoUpTestRenderer' => 'applications/differential/render/DifferentialChangesetTwoUpTestRenderer.php',
|
||||
'DifferentialChangesetViewController' => 'applications/differential/controller/DifferentialChangesetViewController.php',
|
||||
'DifferentialChildRevisionsField' => 'applications/differential/customfield/DifferentialChildRevisionsField.php',
|
||||
'DifferentialCloseConduitAPIMethod' => 'applications/differential/conduit/DifferentialCloseConduitAPIMethod.php',
|
||||
'DifferentialCommentPreviewController' => 'applications/differential/controller/DifferentialCommentPreviewController.php',
|
||||
'DifferentialCommentSaveController' => 'applications/differential/controller/DifferentialCommentSaveController.php',
|
||||
'DifferentialCommitMessageCustomField' => 'applications/differential/field/DifferentialCommitMessageCustomField.php',
|
||||
'DifferentialCommitMessageField' => 'applications/differential/field/DifferentialCommitMessageField.php',
|
||||
'DifferentialCommitMessageParser' => 'applications/differential/parser/DifferentialCommitMessageParser.php',
|
||||
'DifferentialCommitMessageParserTestCase' => 'applications/differential/parser/__tests__/DifferentialCommitMessageParserTestCase.php',
|
||||
'DifferentialCommitsField' => 'applications/differential/customfield/DifferentialCommitsField.php',
|
||||
'DifferentialConduitAPIMethod' => 'applications/differential/conduit/DifferentialConduitAPIMethod.php',
|
||||
'DifferentialConflictsField' => 'applications/differential/customfield/DifferentialConflictsField.php',
|
||||
'DifferentialConflictsCommitMessageField' => 'applications/differential/field/DifferentialConflictsCommitMessageField.php',
|
||||
'DifferentialController' => 'applications/differential/controller/DifferentialController.php',
|
||||
'DifferentialCoreCustomField' => 'applications/differential/customfield/DifferentialCoreCustomField.php',
|
||||
'DifferentialCreateCommentConduitAPIMethod' => 'applications/differential/conduit/DifferentialCreateCommentConduitAPIMethod.php',
|
||||
|
@ -430,7 +431,6 @@ phutil_register_library_map(array(
|
|||
'DifferentialDiffViewController' => 'applications/differential/controller/DifferentialDiffViewController.php',
|
||||
'DifferentialDoorkeeperRevisionFeedStoryPublisher' => 'applications/differential/doorkeeper/DifferentialDoorkeeperRevisionFeedStoryPublisher.php',
|
||||
'DifferentialDraft' => 'applications/differential/storage/DifferentialDraft.php',
|
||||
'DifferentialEditPolicyField' => 'applications/differential/customfield/DifferentialEditPolicyField.php',
|
||||
'DifferentialExactUserFunctionDatasource' => 'applications/differential/typeahead/DifferentialExactUserFunctionDatasource.php',
|
||||
'DifferentialFieldParseException' => 'applications/differential/exception/DifferentialFieldParseException.php',
|
||||
'DifferentialFieldValidationException' => 'applications/differential/exception/DifferentialFieldValidationException.php',
|
||||
|
@ -444,7 +444,7 @@ phutil_register_library_map(array(
|
|||
'DifferentialGetRevisionConduitAPIMethod' => 'applications/differential/conduit/DifferentialGetRevisionConduitAPIMethod.php',
|
||||
'DifferentialGetWorkingCopy' => 'applications/differential/DifferentialGetWorkingCopy.php',
|
||||
'DifferentialGitHubLandingStrategy' => 'applications/differential/landing/DifferentialGitHubLandingStrategy.php',
|
||||
'DifferentialGitSVNIDField' => 'applications/differential/customfield/DifferentialGitSVNIDField.php',
|
||||
'DifferentialGitSVNIDCommitMessageField' => 'applications/differential/field/DifferentialGitSVNIDCommitMessageField.php',
|
||||
'DifferentialHarbormasterField' => 'applications/differential/customfield/DifferentialHarbormasterField.php',
|
||||
'DifferentialHiddenComment' => 'applications/differential/storage/DifferentialHiddenComment.php',
|
||||
'DifferentialHostField' => 'applications/differential/customfield/DifferentialHostField.php',
|
||||
|
@ -461,6 +461,7 @@ phutil_register_library_map(array(
|
|||
'DifferentialInlineCommentMailView' => 'applications/differential/mail/DifferentialInlineCommentMailView.php',
|
||||
'DifferentialInlineCommentPreviewController' => 'applications/differential/controller/DifferentialInlineCommentPreviewController.php',
|
||||
'DifferentialInlineCommentQuery' => 'applications/differential/query/DifferentialInlineCommentQuery.php',
|
||||
'DifferentialJIRAIssuesCommitMessageField' => 'applications/differential/field/DifferentialJIRAIssuesCommitMessageField.php',
|
||||
'DifferentialJIRAIssuesField' => 'applications/differential/customfield/DifferentialJIRAIssuesField.php',
|
||||
'DifferentialLandingActionMenuEventListener' => 'applications/differential/landing/DifferentialLandingActionMenuEventListener.php',
|
||||
'DifferentialLandingStrategy' => 'applications/differential/landing/DifferentialLandingStrategy.php',
|
||||
|
@ -472,14 +473,11 @@ phutil_register_library_map(array(
|
|||
'DifferentialMailView' => 'applications/differential/mail/DifferentialMailView.php',
|
||||
'DifferentialManiphestTasksField' => 'applications/differential/customfield/DifferentialManiphestTasksField.php',
|
||||
'DifferentialModernHunk' => 'applications/differential/storage/DifferentialModernHunk.php',
|
||||
'DifferentialNextStepField' => 'applications/differential/customfield/DifferentialNextStepField.php',
|
||||
'DifferentialParentRevisionsField' => 'applications/differential/customfield/DifferentialParentRevisionsField.php',
|
||||
'DifferentialParseCacheGarbageCollector' => 'applications/differential/garbagecollector/DifferentialParseCacheGarbageCollector.php',
|
||||
'DifferentialParseCommitMessageConduitAPIMethod' => 'applications/differential/conduit/DifferentialParseCommitMessageConduitAPIMethod.php',
|
||||
'DifferentialParseRenderTestCase' => 'applications/differential/__tests__/DifferentialParseRenderTestCase.php',
|
||||
'DifferentialPathField' => 'applications/differential/customfield/DifferentialPathField.php',
|
||||
'DifferentialProjectReviewersField' => 'applications/differential/customfield/DifferentialProjectReviewersField.php',
|
||||
'DifferentialProjectsField' => 'applications/differential/customfield/DifferentialProjectsField.php',
|
||||
'DifferentialQueryConduitAPIMethod' => 'applications/differential/conduit/DifferentialQueryConduitAPIMethod.php',
|
||||
'DifferentialQueryDiffsConduitAPIMethod' => 'applications/differential/conduit/DifferentialQueryDiffsConduitAPIMethod.php',
|
||||
'DifferentialRawDiffRenderer' => 'applications/differential/render/DifferentialRawDiffRenderer.php',
|
||||
|
@ -493,16 +491,18 @@ phutil_register_library_map(array(
|
|||
'DifferentialResponsibleDatasource' => 'applications/differential/typeahead/DifferentialResponsibleDatasource.php',
|
||||
'DifferentialResponsibleUserDatasource' => 'applications/differential/typeahead/DifferentialResponsibleUserDatasource.php',
|
||||
'DifferentialResponsibleViewerFunctionDatasource' => 'applications/differential/typeahead/DifferentialResponsibleViewerFunctionDatasource.php',
|
||||
'DifferentialRevertPlanCommitMessageField' => 'applications/differential/field/DifferentialRevertPlanCommitMessageField.php',
|
||||
'DifferentialRevertPlanField' => 'applications/differential/customfield/DifferentialRevertPlanField.php',
|
||||
'DifferentialReviewedByField' => 'applications/differential/customfield/DifferentialReviewedByField.php',
|
||||
'DifferentialReviewer' => 'applications/differential/storage/DifferentialReviewer.php',
|
||||
'DifferentialReviewedByCommitMessageField' => 'applications/differential/field/DifferentialReviewedByCommitMessageField.php',
|
||||
'DifferentialReviewerDatasource' => 'applications/differential/typeahead/DifferentialReviewerDatasource.php',
|
||||
'DifferentialReviewerForRevisionEdgeType' => 'applications/differential/edge/DifferentialReviewerForRevisionEdgeType.php',
|
||||
'DifferentialReviewerProxy' => 'applications/differential/storage/DifferentialReviewerProxy.php',
|
||||
'DifferentialReviewerStatus' => 'applications/differential/constants/DifferentialReviewerStatus.php',
|
||||
'DifferentialReviewersAddBlockingReviewersHeraldAction' => 'applications/differential/herald/DifferentialReviewersAddBlockingReviewersHeraldAction.php',
|
||||
'DifferentialReviewersAddBlockingSelfHeraldAction' => 'applications/differential/herald/DifferentialReviewersAddBlockingSelfHeraldAction.php',
|
||||
'DifferentialReviewersAddReviewersHeraldAction' => 'applications/differential/herald/DifferentialReviewersAddReviewersHeraldAction.php',
|
||||
'DifferentialReviewersAddSelfHeraldAction' => 'applications/differential/herald/DifferentialReviewersAddSelfHeraldAction.php',
|
||||
'DifferentialReviewersCommitMessageField' => 'applications/differential/field/DifferentialReviewersCommitMessageField.php',
|
||||
'DifferentialReviewersField' => 'applications/differential/customfield/DifferentialReviewersField.php',
|
||||
'DifferentialReviewersHeraldAction' => 'applications/differential/herald/DifferentialReviewersHeraldAction.php',
|
||||
'DifferentialReviewersView' => 'applications/differential/view/DifferentialReviewersView.php',
|
||||
|
@ -517,7 +517,9 @@ phutil_register_library_map(array(
|
|||
'DifferentialRevisionControlSystem' => 'applications/differential/constants/DifferentialRevisionControlSystem.php',
|
||||
'DifferentialRevisionDependedOnByRevisionEdgeType' => 'applications/differential/edge/DifferentialRevisionDependedOnByRevisionEdgeType.php',
|
||||
'DifferentialRevisionDependsOnRevisionEdgeType' => 'applications/differential/edge/DifferentialRevisionDependsOnRevisionEdgeType.php',
|
||||
'DifferentialRevisionEditConduitAPIMethod' => 'applications/differential/conduit/DifferentialRevisionEditConduitAPIMethod.php',
|
||||
'DifferentialRevisionEditController' => 'applications/differential/controller/DifferentialRevisionEditController.php',
|
||||
'DifferentialRevisionEditEngine' => 'applications/differential/editor/DifferentialRevisionEditEngine.php',
|
||||
'DifferentialRevisionFulltextEngine' => 'applications/differential/search/DifferentialRevisionFulltextEngine.php',
|
||||
'DifferentialRevisionGraph' => 'infrastructure/graph/DifferentialRevisionGraph.php',
|
||||
'DifferentialRevisionHasChildRelationship' => 'applications/differential/relationships/DifferentialRevisionHasChildRelationship.php',
|
||||
|
@ -529,7 +531,7 @@ phutil_register_library_map(array(
|
|||
'DifferentialRevisionHasTaskRelationship' => 'applications/differential/relationships/DifferentialRevisionHasTaskRelationship.php',
|
||||
'DifferentialRevisionHeraldField' => 'applications/differential/herald/DifferentialRevisionHeraldField.php',
|
||||
'DifferentialRevisionHeraldFieldGroup' => 'applications/differential/herald/DifferentialRevisionHeraldFieldGroup.php',
|
||||
'DifferentialRevisionIDField' => 'applications/differential/customfield/DifferentialRevisionIDField.php',
|
||||
'DifferentialRevisionIDCommitMessageField' => 'applications/differential/field/DifferentialRevisionIDCommitMessageField.php',
|
||||
'DifferentialRevisionLandController' => 'applications/differential/controller/DifferentialRevisionLandController.php',
|
||||
'DifferentialRevisionListController' => 'applications/differential/controller/DifferentialRevisionListController.php',
|
||||
'DifferentialRevisionListView' => 'applications/differential/view/DifferentialRevisionListView.php',
|
||||
|
@ -543,23 +545,33 @@ phutil_register_library_map(array(
|
|||
'DifferentialRevisionRelationshipSource' => 'applications/search/relationship/DifferentialRevisionRelationshipSource.php',
|
||||
'DifferentialRevisionRepositoryHeraldField' => 'applications/differential/herald/DifferentialRevisionRepositoryHeraldField.php',
|
||||
'DifferentialRevisionRepositoryProjectsHeraldField' => 'applications/differential/herald/DifferentialRevisionRepositoryProjectsHeraldField.php',
|
||||
'DifferentialRevisionRepositoryTransaction' => 'applications/differential/xaction/DifferentialRevisionRepositoryTransaction.php',
|
||||
'DifferentialRevisionRequiredActionResultBucket' => 'applications/differential/query/DifferentialRevisionRequiredActionResultBucket.php',
|
||||
'DifferentialRevisionResultBucket' => 'applications/differential/query/DifferentialRevisionResultBucket.php',
|
||||
'DifferentialRevisionReviewersHeraldField' => 'applications/differential/herald/DifferentialRevisionReviewersHeraldField.php',
|
||||
'DifferentialRevisionReviewersTransaction' => 'applications/differential/xaction/DifferentialRevisionReviewersTransaction.php',
|
||||
'DifferentialRevisionSearchConduitAPIMethod' => 'applications/differential/conduit/DifferentialRevisionSearchConduitAPIMethod.php',
|
||||
'DifferentialRevisionSearchEngine' => 'applications/differential/query/DifferentialRevisionSearchEngine.php',
|
||||
'DifferentialRevisionStatus' => 'applications/differential/constants/DifferentialRevisionStatus.php',
|
||||
'DifferentialRevisionSummaryHeraldField' => 'applications/differential/herald/DifferentialRevisionSummaryHeraldField.php',
|
||||
'DifferentialRevisionSummaryTransaction' => 'applications/differential/xaction/DifferentialRevisionSummaryTransaction.php',
|
||||
'DifferentialRevisionTestPlanTransaction' => 'applications/differential/xaction/DifferentialRevisionTestPlanTransaction.php',
|
||||
'DifferentialRevisionTitleHeraldField' => 'applications/differential/herald/DifferentialRevisionTitleHeraldField.php',
|
||||
'DifferentialRevisionTitleTransaction' => 'applications/differential/xaction/DifferentialRevisionTitleTransaction.php',
|
||||
'DifferentialRevisionTransactionType' => 'applications/differential/xaction/DifferentialRevisionTransactionType.php',
|
||||
'DifferentialRevisionUpdateHistoryView' => 'applications/differential/view/DifferentialRevisionUpdateHistoryView.php',
|
||||
'DifferentialRevisionViewController' => 'applications/differential/controller/DifferentialRevisionViewController.php',
|
||||
'DifferentialSchemaSpec' => 'applications/differential/storage/DifferentialSchemaSpec.php',
|
||||
'DifferentialSetDiffPropertyConduitAPIMethod' => 'applications/differential/conduit/DifferentialSetDiffPropertyConduitAPIMethod.php',
|
||||
'DifferentialStoredCustomField' => 'applications/differential/customfield/DifferentialStoredCustomField.php',
|
||||
'DifferentialSubscribersField' => 'applications/differential/customfield/DifferentialSubscribersField.php',
|
||||
'DifferentialSubscribersCommitMessageField' => 'applications/differential/field/DifferentialSubscribersCommitMessageField.php',
|
||||
'DifferentialSummaryCommitMessageField' => 'applications/differential/field/DifferentialSummaryCommitMessageField.php',
|
||||
'DifferentialSummaryField' => 'applications/differential/customfield/DifferentialSummaryField.php',
|
||||
'DifferentialTagsCommitMessageField' => 'applications/differential/field/DifferentialTagsCommitMessageField.php',
|
||||
'DifferentialTasksCommitMessageField' => 'applications/differential/field/DifferentialTasksCommitMessageField.php',
|
||||
'DifferentialTestPlanCommitMessageField' => 'applications/differential/field/DifferentialTestPlanCommitMessageField.php',
|
||||
'DifferentialTestPlanField' => 'applications/differential/customfield/DifferentialTestPlanField.php',
|
||||
'DifferentialTitleField' => 'applications/differential/customfield/DifferentialTitleField.php',
|
||||
'DifferentialTitleCommitMessageField' => 'applications/differential/field/DifferentialTitleCommitMessageField.php',
|
||||
'DifferentialTransaction' => 'applications/differential/storage/DifferentialTransaction.php',
|
||||
'DifferentialTransactionComment' => 'applications/differential/storage/DifferentialTransactionComment.php',
|
||||
'DifferentialTransactionEditor' => 'applications/differential/editor/DifferentialTransactionEditor.php',
|
||||
|
@ -569,7 +581,6 @@ phutil_register_library_map(array(
|
|||
'DifferentialUnitStatus' => 'applications/differential/constants/DifferentialUnitStatus.php',
|
||||
'DifferentialUnitTestResult' => 'applications/differential/constants/DifferentialUnitTestResult.php',
|
||||
'DifferentialUpdateRevisionConduitAPIMethod' => 'applications/differential/conduit/DifferentialUpdateRevisionConduitAPIMethod.php',
|
||||
'DifferentialViewPolicyField' => 'applications/differential/customfield/DifferentialViewPolicyField.php',
|
||||
'DiffusionAuditorDatasource' => 'applications/diffusion/typeahead/DiffusionAuditorDatasource.php',
|
||||
'DiffusionAuditorFunctionDatasource' => 'applications/diffusion/typeahead/DiffusionAuditorFunctionDatasource.php',
|
||||
'DiffusionAuditorsAddAuditorsHeraldAction' => 'applications/diffusion/herald/DiffusionAuditorsAddAuditorsHeraldAction.php',
|
||||
|
@ -1787,7 +1798,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorApplicationEmailCommandsController' => 'applications/meta/controller/PhabricatorApplicationEmailCommandsController.php',
|
||||
'PhabricatorApplicationLaunchView' => 'applications/meta/view/PhabricatorApplicationLaunchView.php',
|
||||
'PhabricatorApplicationPanelController' => 'applications/meta/controller/PhabricatorApplicationPanelController.php',
|
||||
'PhabricatorApplicationProfilePanel' => 'applications/search/profilepanel/PhabricatorApplicationProfilePanel.php',
|
||||
'PhabricatorApplicationProfileMenuItem' => 'applications/search/menuitem/PhabricatorApplicationProfileMenuItem.php',
|
||||
'PhabricatorApplicationQuery' => 'applications/meta/query/PhabricatorApplicationQuery.php',
|
||||
'PhabricatorApplicationSearchController' => 'applications/search/controller/PhabricatorApplicationSearchController.php',
|
||||
'PhabricatorApplicationSearchEngine' => 'applications/search/engine/PhabricatorApplicationSearchEngine.php',
|
||||
|
@ -2425,23 +2436,28 @@ phutil_register_library_map(array(
|
|||
'PhabricatorDashboardDAO' => 'applications/dashboard/storage/PhabricatorDashboardDAO.php',
|
||||
'PhabricatorDashboardDashboardHasPanelEdgeType' => 'applications/dashboard/edge/PhabricatorDashboardDashboardHasPanelEdgeType.php',
|
||||
'PhabricatorDashboardDashboardPHIDType' => 'applications/dashboard/phid/PhabricatorDashboardDashboardPHIDType.php',
|
||||
'PhabricatorDashboardDatasource' => 'applications/dashboard/typeahead/PhabricatorDashboardDatasource.php',
|
||||
'PhabricatorDashboardEditController' => 'applications/dashboard/controller/PhabricatorDashboardEditController.php',
|
||||
'PhabricatorDashboardIconSet' => 'applications/dashboard/icon/PhabricatorDashboardIconSet.php',
|
||||
'PhabricatorDashboardInstall' => 'applications/dashboard/storage/PhabricatorDashboardInstall.php',
|
||||
'PhabricatorDashboardInstallController' => 'applications/dashboard/controller/PhabricatorDashboardInstallController.php',
|
||||
'PhabricatorDashboardLayoutConfig' => 'applications/dashboard/layoutconfig/PhabricatorDashboardLayoutConfig.php',
|
||||
'PhabricatorDashboardListController' => 'applications/dashboard/controller/PhabricatorDashboardListController.php',
|
||||
'PhabricatorDashboardManageController' => 'applications/dashboard/controller/PhabricatorDashboardManageController.php',
|
||||
'PhabricatorDashboardMovePanelController' => 'applications/dashboard/controller/PhabricatorDashboardMovePanelController.php',
|
||||
'PhabricatorDashboardNgrams' => 'applications/dashboard/storage/PhabricatorDashboardNgrams.php',
|
||||
'PhabricatorDashboardPanel' => 'applications/dashboard/storage/PhabricatorDashboardPanel.php',
|
||||
'PhabricatorDashboardPanelArchiveController' => 'applications/dashboard/controller/PhabricatorDashboardPanelArchiveController.php',
|
||||
'PhabricatorDashboardPanelCoreCustomField' => 'applications/dashboard/customfield/PhabricatorDashboardPanelCoreCustomField.php',
|
||||
'PhabricatorDashboardPanelCustomField' => 'applications/dashboard/customfield/PhabricatorDashboardPanelCustomField.php',
|
||||
'PhabricatorDashboardPanelDatasource' => 'applications/dashboard/typeahead/PhabricatorDashboardPanelDatasource.php',
|
||||
'PhabricatorDashboardPanelEditConduitAPIMethod' => 'applications/dashboard/conduit/PhabricatorDashboardPanelEditConduitAPIMethod.php',
|
||||
'PhabricatorDashboardPanelEditController' => 'applications/dashboard/controller/PhabricatorDashboardPanelEditController.php',
|
||||
'PhabricatorDashboardPanelEditEngine' => 'applications/dashboard/editor/PhabricatorDashboardPanelEditEngine.php',
|
||||
'PhabricatorDashboardPanelEditproController' => 'applications/dashboard/controller/PhabricatorDashboardPanelEditproController.php',
|
||||
'PhabricatorDashboardPanelHasDashboardEdgeType' => 'applications/dashboard/edge/PhabricatorDashboardPanelHasDashboardEdgeType.php',
|
||||
'PhabricatorDashboardPanelListController' => 'applications/dashboard/controller/PhabricatorDashboardPanelListController.php',
|
||||
'PhabricatorDashboardPanelNgrams' => 'applications/dashboard/storage/PhabricatorDashboardPanelNgrams.php',
|
||||
'PhabricatorDashboardPanelPHIDType' => 'applications/dashboard/phid/PhabricatorDashboardPanelPHIDType.php',
|
||||
'PhabricatorDashboardPanelQuery' => 'applications/dashboard/query/PhabricatorDashboardPanelQuery.php',
|
||||
'PhabricatorDashboardPanelRenderController' => 'applications/dashboard/controller/PhabricatorDashboardPanelRenderController.php',
|
||||
|
@ -2455,6 +2471,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorDashboardPanelTransactionQuery' => 'applications/dashboard/query/PhabricatorDashboardPanelTransactionQuery.php',
|
||||
'PhabricatorDashboardPanelType' => 'applications/dashboard/paneltype/PhabricatorDashboardPanelType.php',
|
||||
'PhabricatorDashboardPanelViewController' => 'applications/dashboard/controller/PhabricatorDashboardPanelViewController.php',
|
||||
'PhabricatorDashboardProfileMenuItem' => 'applications/search/menuitem/PhabricatorDashboardProfileMenuItem.php',
|
||||
'PhabricatorDashboardQuery' => 'applications/dashboard/query/PhabricatorDashboardQuery.php',
|
||||
'PhabricatorDashboardQueryPanelType' => 'applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php',
|
||||
'PhabricatorDashboardRemarkupRule' => 'applications/dashboard/remarkup/PhabricatorDashboardRemarkupRule.php',
|
||||
|
@ -2505,7 +2522,8 @@ phutil_register_library_map(array(
|
|||
'PhabricatorDisabledUserController' => 'applications/auth/controller/PhabricatorDisabledUserController.php',
|
||||
'PhabricatorDisplayPreferencesSettingsPanel' => 'applications/settings/panel/PhabricatorDisplayPreferencesSettingsPanel.php',
|
||||
'PhabricatorDisqusAuthProvider' => 'applications/auth/provider/PhabricatorDisqusAuthProvider.php',
|
||||
'PhabricatorDividerProfilePanel' => 'applications/search/profilepanel/PhabricatorDividerProfilePanel.php',
|
||||
'PhabricatorDividerEditField' => 'applications/transactions/editfield/PhabricatorDividerEditField.php',
|
||||
'PhabricatorDividerProfileMenuItem' => 'applications/search/menuitem/PhabricatorDividerProfileMenuItem.php',
|
||||
'PhabricatorDivinerApplication' => 'applications/diviner/application/PhabricatorDivinerApplication.php',
|
||||
'PhabricatorDoorkeeperApplication' => 'applications/doorkeeper/application/PhabricatorDoorkeeperApplication.php',
|
||||
'PhabricatorDraft' => 'applications/draft/storage/PhabricatorDraft.php',
|
||||
|
@ -2547,6 +2565,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorEditEngineConfigurationViewController' => 'applications/transactions/controller/PhabricatorEditEngineConfigurationViewController.php',
|
||||
'PhabricatorEditEngineController' => 'applications/transactions/controller/PhabricatorEditEngineController.php',
|
||||
'PhabricatorEditEngineCreateQuickActions' => 'applications/settings/quickmenu/PhabricatorEditEngineCreateQuickActions.php',
|
||||
'PhabricatorEditEngineDatasource' => 'applications/transactions/typeahead/PhabricatorEditEngineDatasource.php',
|
||||
'PhabricatorEditEngineExtension' => 'applications/transactions/engineextension/PhabricatorEditEngineExtension.php',
|
||||
'PhabricatorEditEngineExtensionModule' => 'applications/transactions/engineextension/PhabricatorEditEngineExtensionModule.php',
|
||||
'PhabricatorEditEngineListController' => 'applications/transactions/controller/PhabricatorEditEngineListController.php',
|
||||
|
@ -2783,8 +2802,6 @@ phutil_register_library_map(array(
|
|||
'PhabricatorHomeQuickCreateController' => 'applications/home/controller/PhabricatorHomeQuickCreateController.php',
|
||||
'PhabricatorHovercardEngineExtension' => 'applications/search/engineextension/PhabricatorHovercardEngineExtension.php',
|
||||
'PhabricatorHovercardEngineExtensionModule' => 'applications/search/engineextension/PhabricatorHovercardEngineExtensionModule.php',
|
||||
'PhabricatorHunksManagementMigrateWorkflow' => 'applications/differential/management/PhabricatorHunksManagementMigrateWorkflow.php',
|
||||
'PhabricatorHunksManagementWorkflow' => 'applications/differential/management/PhabricatorHunksManagementWorkflow.php',
|
||||
'PhabricatorIDsSearchEngineExtension' => 'applications/search/engineextension/PhabricatorIDsSearchEngineExtension.php',
|
||||
'PhabricatorIDsSearchField' => 'applications/search/field/PhabricatorIDsSearchField.php',
|
||||
'PhabricatorIRCProtocolAdapter' => 'infrastructure/daemon/bot/adapter/PhabricatorIRCProtocolAdapter.php',
|
||||
|
@ -2828,7 +2845,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorLegalpadDocumentPHIDType' => 'applications/legalpad/phid/PhabricatorLegalpadDocumentPHIDType.php',
|
||||
'PhabricatorLegalpadSignaturePolicyRule' => 'applications/legalpad/policyrule/PhabricatorLegalpadSignaturePolicyRule.php',
|
||||
'PhabricatorLibraryTestCase' => '__tests__/PhabricatorLibraryTestCase.php',
|
||||
'PhabricatorLinkProfilePanel' => 'applications/search/profilepanel/PhabricatorLinkProfilePanel.php',
|
||||
'PhabricatorLinkProfileMenuItem' => 'applications/search/menuitem/PhabricatorLinkProfileMenuItem.php',
|
||||
'PhabricatorLipsumArtist' => 'applications/lipsum/image/PhabricatorLipsumArtist.php',
|
||||
'PhabricatorLipsumContentSource' => 'infrastructure/contentsource/PhabricatorLipsumContentSource.php',
|
||||
'PhabricatorLipsumGenerateWorkflow' => 'applications/lipsum/management/PhabricatorLipsumGenerateWorkflow.php',
|
||||
|
@ -2966,7 +2983,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorModularTransactionType' => 'applications/transactions/storage/PhabricatorModularTransactionType.php',
|
||||
'PhabricatorMonospacedFontSetting' => 'applications/settings/setting/PhabricatorMonospacedFontSetting.php',
|
||||
'PhabricatorMonospacedTextareasSetting' => 'applications/settings/setting/PhabricatorMonospacedTextareasSetting.php',
|
||||
'PhabricatorMotivatorProfilePanel' => 'applications/search/profilepanel/PhabricatorMotivatorProfilePanel.php',
|
||||
'PhabricatorMotivatorProfileMenuItem' => 'applications/search/menuitem/PhabricatorMotivatorProfileMenuItem.php',
|
||||
'PhabricatorMultiColumnUIExample' => 'applications/uiexample/examples/PhabricatorMultiColumnUIExample.php',
|
||||
'PhabricatorMultiFactorSettingsPanel' => 'applications/settings/panel/PhabricatorMultiFactorSettingsPanel.php',
|
||||
'PhabricatorMultimeterApplication' => 'applications/multimeter/application/PhabricatorMultimeterApplication.php',
|
||||
|
@ -3244,7 +3261,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorPeopleCreateGuidanceContext' => 'applications/people/guidance/PhabricatorPeopleCreateGuidanceContext.php',
|
||||
'PhabricatorPeopleDatasource' => 'applications/people/typeahead/PhabricatorPeopleDatasource.php',
|
||||
'PhabricatorPeopleDeleteController' => 'applications/people/controller/PhabricatorPeopleDeleteController.php',
|
||||
'PhabricatorPeopleDetailsProfilePanel' => 'applications/people/profilepanel/PhabricatorPeopleDetailsProfilePanel.php',
|
||||
'PhabricatorPeopleDetailsProfileMenuItem' => 'applications/people/menuitem/PhabricatorPeopleDetailsProfileMenuItem.php',
|
||||
'PhabricatorPeopleDisableController' => 'applications/people/controller/PhabricatorPeopleDisableController.php',
|
||||
'PhabricatorPeopleEmpowerController' => 'applications/people/controller/PhabricatorPeopleEmpowerController.php',
|
||||
'PhabricatorPeopleExternalPHIDType' => 'applications/people/phid/PhabricatorPeopleExternalPHIDType.php',
|
||||
|
@ -3258,14 +3275,14 @@ phutil_register_library_map(array(
|
|||
'PhabricatorPeopleLogSearchEngine' => 'applications/people/query/PhabricatorPeopleLogSearchEngine.php',
|
||||
'PhabricatorPeopleLogsController' => 'applications/people/controller/PhabricatorPeopleLogsController.php',
|
||||
'PhabricatorPeopleMainMenuBarExtension' => 'applications/people/extension/PhabricatorPeopleMainMenuBarExtension.php',
|
||||
'PhabricatorPeopleManageProfilePanel' => 'applications/people/profilepanel/PhabricatorPeopleManageProfilePanel.php',
|
||||
'PhabricatorPeopleManageProfileMenuItem' => 'applications/people/menuitem/PhabricatorPeopleManageProfileMenuItem.php',
|
||||
'PhabricatorPeopleNewController' => 'applications/people/controller/PhabricatorPeopleNewController.php',
|
||||
'PhabricatorPeopleNoOwnerDatasource' => 'applications/people/typeahead/PhabricatorPeopleNoOwnerDatasource.php',
|
||||
'PhabricatorPeopleOwnerDatasource' => 'applications/people/typeahead/PhabricatorPeopleOwnerDatasource.php',
|
||||
'PhabricatorPeopleProfileController' => 'applications/people/controller/PhabricatorPeopleProfileController.php',
|
||||
'PhabricatorPeopleProfileEditController' => 'applications/people/controller/PhabricatorPeopleProfileEditController.php',
|
||||
'PhabricatorPeopleProfileManageController' => 'applications/people/controller/PhabricatorPeopleProfileManageController.php',
|
||||
'PhabricatorPeopleProfilePanelEngine' => 'applications/people/engine/PhabricatorPeopleProfilePanelEngine.php',
|
||||
'PhabricatorPeopleProfileMenuEngine' => 'applications/people/engine/PhabricatorPeopleProfileMenuEngine.php',
|
||||
'PhabricatorPeopleProfilePictureController' => 'applications/people/controller/PhabricatorPeopleProfilePictureController.php',
|
||||
'PhabricatorPeopleProfileViewController' => 'applications/people/controller/PhabricatorPeopleProfileViewController.php',
|
||||
'PhabricatorPeopleQuery' => 'applications/people/query/PhabricatorPeopleQuery.php',
|
||||
|
@ -3364,16 +3381,16 @@ phutil_register_library_map(array(
|
|||
'PhabricatorPolicyType' => 'applications/policy/constants/PhabricatorPolicyType.php',
|
||||
'PhabricatorPonderApplication' => 'applications/ponder/application/PhabricatorPonderApplication.php',
|
||||
'PhabricatorProfileMenuCollapsedSetting' => 'applications/settings/setting/PhabricatorProfileMenuCollapsedSetting.php',
|
||||
'PhabricatorProfilePanel' => 'applications/search/profilepanel/PhabricatorProfilePanel.php',
|
||||
'PhabricatorProfilePanelConfiguration' => 'applications/search/storage/PhabricatorProfilePanelConfiguration.php',
|
||||
'PhabricatorProfilePanelConfigurationQuery' => 'applications/search/query/PhabricatorProfilePanelConfigurationQuery.php',
|
||||
'PhabricatorProfilePanelConfigurationTransaction' => 'applications/search/storage/PhabricatorProfilePanelConfigurationTransaction.php',
|
||||
'PhabricatorProfilePanelConfigurationTransactionQuery' => 'applications/search/query/PhabricatorProfilePanelConfigurationTransactionQuery.php',
|
||||
'PhabricatorProfilePanelEditEngine' => 'applications/search/editor/PhabricatorProfilePanelEditEngine.php',
|
||||
'PhabricatorProfilePanelEditor' => 'applications/search/editor/PhabricatorProfilePanelEditor.php',
|
||||
'PhabricatorProfilePanelEngine' => 'applications/search/engine/PhabricatorProfilePanelEngine.php',
|
||||
'PhabricatorProfilePanelIconSet' => 'applications/search/profilepanel/PhabricatorProfilePanelIconSet.php',
|
||||
'PhabricatorProfilePanelPHIDType' => 'applications/search/phidtype/PhabricatorProfilePanelPHIDType.php',
|
||||
'PhabricatorProfileMenuEditEngine' => 'applications/search/editor/PhabricatorProfileMenuEditEngine.php',
|
||||
'PhabricatorProfileMenuEditor' => 'applications/search/editor/PhabricatorProfileMenuEditor.php',
|
||||
'PhabricatorProfileMenuEngine' => 'applications/search/engine/PhabricatorProfileMenuEngine.php',
|
||||
'PhabricatorProfileMenuItem' => 'applications/search/menuitem/PhabricatorProfileMenuItem.php',
|
||||
'PhabricatorProfileMenuItemConfiguration' => 'applications/search/storage/PhabricatorProfileMenuItemConfiguration.php',
|
||||
'PhabricatorProfileMenuItemConfigurationQuery' => 'applications/search/query/PhabricatorProfileMenuItemConfigurationQuery.php',
|
||||
'PhabricatorProfileMenuItemConfigurationTransaction' => 'applications/search/storage/PhabricatorProfileMenuItemConfigurationTransaction.php',
|
||||
'PhabricatorProfileMenuItemConfigurationTransactionQuery' => 'applications/search/query/PhabricatorProfileMenuItemConfigurationTransactionQuery.php',
|
||||
'PhabricatorProfileMenuItemIconSet' => 'applications/search/menuitem/PhabricatorProfileMenuItemIconSet.php',
|
||||
'PhabricatorProfileMenuItemPHIDType' => 'applications/search/phidtype/PhabricatorProfileMenuItemPHIDType.php',
|
||||
'PhabricatorProject' => 'applications/project/storage/PhabricatorProject.php',
|
||||
'PhabricatorProjectAddHeraldAction' => 'applications/project/herald/PhabricatorProjectAddHeraldAction.php',
|
||||
'PhabricatorProjectApplication' => 'applications/project/application/PhabricatorProjectApplication.php',
|
||||
|
@ -3411,7 +3428,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorProjectDatasource' => 'applications/project/typeahead/PhabricatorProjectDatasource.php',
|
||||
'PhabricatorProjectDefaultController' => 'applications/project/controller/PhabricatorProjectDefaultController.php',
|
||||
'PhabricatorProjectDescriptionField' => 'applications/project/customfield/PhabricatorProjectDescriptionField.php',
|
||||
'PhabricatorProjectDetailsProfilePanel' => 'applications/project/profilepanel/PhabricatorProjectDetailsProfilePanel.php',
|
||||
'PhabricatorProjectDetailsProfileMenuItem' => 'applications/project/menuitem/PhabricatorProjectDetailsProfileMenuItem.php',
|
||||
'PhabricatorProjectEditController' => 'applications/project/controller/PhabricatorProjectEditController.php',
|
||||
'PhabricatorProjectEditEngine' => 'applications/project/engine/PhabricatorProjectEditEngine.php',
|
||||
'PhabricatorProjectEditPictureController' => 'applications/project/controller/PhabricatorProjectEditPictureController.php',
|
||||
|
@ -3432,16 +3449,17 @@ phutil_register_library_map(array(
|
|||
'PhabricatorProjectLogicalUserDatasource' => 'applications/project/typeahead/PhabricatorProjectLogicalUserDatasource.php',
|
||||
'PhabricatorProjectLogicalViewerDatasource' => 'applications/project/typeahead/PhabricatorProjectLogicalViewerDatasource.php',
|
||||
'PhabricatorProjectManageController' => 'applications/project/controller/PhabricatorProjectManageController.php',
|
||||
'PhabricatorProjectManageProfilePanel' => 'applications/project/profilepanel/PhabricatorProjectManageProfilePanel.php',
|
||||
'PhabricatorProjectManageProfileMenuItem' => 'applications/project/menuitem/PhabricatorProjectManageProfileMenuItem.php',
|
||||
'PhabricatorProjectMaterializedMemberEdgeType' => 'applications/project/edge/PhabricatorProjectMaterializedMemberEdgeType.php',
|
||||
'PhabricatorProjectMemberListView' => 'applications/project/view/PhabricatorProjectMemberListView.php',
|
||||
'PhabricatorProjectMemberOfProjectEdgeType' => 'applications/project/edge/PhabricatorProjectMemberOfProjectEdgeType.php',
|
||||
'PhabricatorProjectMembersAddController' => 'applications/project/controller/PhabricatorProjectMembersAddController.php',
|
||||
'PhabricatorProjectMembersDatasource' => 'applications/project/typeahead/PhabricatorProjectMembersDatasource.php',
|
||||
'PhabricatorProjectMembersPolicyRule' => 'applications/project/policyrule/PhabricatorProjectMembersPolicyRule.php',
|
||||
'PhabricatorProjectMembersProfilePanel' => 'applications/project/profilepanel/PhabricatorProjectMembersProfilePanel.php',
|
||||
'PhabricatorProjectMembersProfileMenuItem' => 'applications/project/menuitem/PhabricatorProjectMembersProfileMenuItem.php',
|
||||
'PhabricatorProjectMembersRemoveController' => 'applications/project/controller/PhabricatorProjectMembersRemoveController.php',
|
||||
'PhabricatorProjectMembersViewController' => 'applications/project/controller/PhabricatorProjectMembersViewController.php',
|
||||
'PhabricatorProjectMenuItemController' => 'applications/project/controller/PhabricatorProjectMenuItemController.php',
|
||||
'PhabricatorProjectMoveController' => 'applications/project/controller/PhabricatorProjectMoveController.php',
|
||||
'PhabricatorProjectNameContextFreeGrammar' => 'applications/project/lipsum/PhabricatorProjectNameContextFreeGrammar.php',
|
||||
'PhabricatorProjectNoProjectsDatasource' => 'applications/project/typeahead/PhabricatorProjectNoProjectsDatasource.php',
|
||||
|
@ -3449,10 +3467,10 @@ phutil_register_library_map(array(
|
|||
'PhabricatorProjectOrUserDatasource' => 'applications/project/typeahead/PhabricatorProjectOrUserDatasource.php',
|
||||
'PhabricatorProjectOrUserFunctionDatasource' => 'applications/project/typeahead/PhabricatorProjectOrUserFunctionDatasource.php',
|
||||
'PhabricatorProjectPHIDResolver' => 'applications/phid/resolver/PhabricatorProjectPHIDResolver.php',
|
||||
'PhabricatorProjectPanelController' => 'applications/project/controller/PhabricatorProjectPanelController.php',
|
||||
'PhabricatorProjectPointsProfilePanel' => 'applications/project/profilepanel/PhabricatorProjectPointsProfilePanel.php',
|
||||
'PhabricatorProjectPointsProfileMenuItem' => 'applications/project/menuitem/PhabricatorProjectPointsProfileMenuItem.php',
|
||||
'PhabricatorProjectProfileController' => 'applications/project/controller/PhabricatorProjectProfileController.php',
|
||||
'PhabricatorProjectProfilePanelEngine' => 'applications/project/engine/PhabricatorProjectProfilePanelEngine.php',
|
||||
'PhabricatorProjectProfileMenuEngine' => 'applications/project/engine/PhabricatorProjectProfileMenuEngine.php',
|
||||
'PhabricatorProjectProfileMenuItem' => 'applications/search/menuitem/PhabricatorProjectProfileMenuItem.php',
|
||||
'PhabricatorProjectProjectHasMemberEdgeType' => 'applications/project/edge/PhabricatorProjectProjectHasMemberEdgeType.php',
|
||||
'PhabricatorProjectProjectHasObjectEdgeType' => 'applications/project/edge/PhabricatorProjectProjectHasObjectEdgeType.php',
|
||||
'PhabricatorProjectProjectPHIDType' => 'applications/project/phid/PhabricatorProjectProjectPHIDType.php',
|
||||
|
@ -3468,7 +3486,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorProjectStatus' => 'applications/project/constants/PhabricatorProjectStatus.php',
|
||||
'PhabricatorProjectSubprojectWarningController' => 'applications/project/controller/PhabricatorProjectSubprojectWarningController.php',
|
||||
'PhabricatorProjectSubprojectsController' => 'applications/project/controller/PhabricatorProjectSubprojectsController.php',
|
||||
'PhabricatorProjectSubprojectsProfilePanel' => 'applications/project/profilepanel/PhabricatorProjectSubprojectsProfilePanel.php',
|
||||
'PhabricatorProjectSubprojectsProfileMenuItem' => 'applications/project/menuitem/PhabricatorProjectSubprojectsProfileMenuItem.php',
|
||||
'PhabricatorProjectTestDataGenerator' => 'applications/project/lipsum/PhabricatorProjectTestDataGenerator.php',
|
||||
'PhabricatorProjectTransaction' => 'applications/project/storage/PhabricatorProjectTransaction.php',
|
||||
'PhabricatorProjectTransactionEditor' => 'applications/project/editor/PhabricatorProjectTransactionEditor.php',
|
||||
|
@ -3481,7 +3499,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorProjectWatchController' => 'applications/project/controller/PhabricatorProjectWatchController.php',
|
||||
'PhabricatorProjectWatcherListView' => 'applications/project/view/PhabricatorProjectWatcherListView.php',
|
||||
'PhabricatorProjectWorkboardBackgroundColor' => 'applications/project/constants/PhabricatorProjectWorkboardBackgroundColor.php',
|
||||
'PhabricatorProjectWorkboardProfilePanel' => 'applications/project/profilepanel/PhabricatorProjectWorkboardProfilePanel.php',
|
||||
'PhabricatorProjectWorkboardProfileMenuItem' => 'applications/project/menuitem/PhabricatorProjectWorkboardProfileMenuItem.php',
|
||||
'PhabricatorProjectsCurtainExtension' => 'applications/project/engineextension/PhabricatorProjectsCurtainExtension.php',
|
||||
'PhabricatorProjectsEditEngineExtension' => 'applications/project/engineextension/PhabricatorProjectsEditEngineExtension.php',
|
||||
'PhabricatorProjectsEditField' => 'applications/transactions/editfield/PhabricatorProjectsEditField.php',
|
||||
|
@ -3818,6 +3836,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorStreamingProtocolAdapter' => 'infrastructure/daemon/bot/adapter/PhabricatorStreamingProtocolAdapter.php',
|
||||
'PhabricatorStringListEditField' => 'applications/transactions/editfield/PhabricatorStringListEditField.php',
|
||||
'PhabricatorStringSetting' => 'applications/settings/setting/PhabricatorStringSetting.php',
|
||||
'PhabricatorSubmitEditField' => 'applications/transactions/editfield/PhabricatorSubmitEditField.php',
|
||||
'PhabricatorSubscribableInterface' => 'applications/subscriptions/interface/PhabricatorSubscribableInterface.php',
|
||||
'PhabricatorSubscribedToObjectEdgeType' => 'applications/transactions/edges/PhabricatorSubscribedToObjectEdgeType.php',
|
||||
'PhabricatorSubscribersEditField' => 'applications/transactions/editfield/PhabricatorSubscribersEditField.php',
|
||||
|
@ -4966,10 +4985,10 @@ phutil_register_library_map(array(
|
|||
'DifferentialAddCommentView' => 'AphrontView',
|
||||
'DifferentialAdjustmentMapTestCase' => 'PhutilTestCase',
|
||||
'DifferentialAffectedPath' => 'DifferentialDAO',
|
||||
'DifferentialApplyPatchField' => 'DifferentialCustomField',
|
||||
'DifferentialAsanaRepresentationField' => 'DifferentialCustomField',
|
||||
'DifferentialAuditorsCommitMessageField' => 'DifferentialCommitMessageCustomField',
|
||||
'DifferentialAuditorsField' => 'DifferentialStoredCustomField',
|
||||
'DifferentialAuthorField' => 'DifferentialCustomField',
|
||||
'DifferentialBlameRevisionCommitMessageField' => 'DifferentialCommitMessageCustomField',
|
||||
'DifferentialBlameRevisionField' => 'DifferentialStoredCustomField',
|
||||
'DifferentialBlockHeraldAction' => 'HeraldAction',
|
||||
'DifferentialBlockingReviewerDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
|
||||
|
@ -4997,15 +5016,16 @@ phutil_register_library_map(array(
|
|||
'DifferentialChangesetTwoUpRenderer' => 'DifferentialChangesetHTMLRenderer',
|
||||
'DifferentialChangesetTwoUpTestRenderer' => 'DifferentialChangesetTestRenderer',
|
||||
'DifferentialChangesetViewController' => 'DifferentialController',
|
||||
'DifferentialChildRevisionsField' => 'DifferentialCustomField',
|
||||
'DifferentialCloseConduitAPIMethod' => 'DifferentialConduitAPIMethod',
|
||||
'DifferentialCommentPreviewController' => 'DifferentialController',
|
||||
'DifferentialCommentSaveController' => 'DifferentialController',
|
||||
'DifferentialCommitMessageCustomField' => 'DifferentialCommitMessageField',
|
||||
'DifferentialCommitMessageField' => 'Phobject',
|
||||
'DifferentialCommitMessageParser' => 'Phobject',
|
||||
'DifferentialCommitMessageParserTestCase' => 'PhabricatorTestCase',
|
||||
'DifferentialCommitsField' => 'DifferentialCustomField',
|
||||
'DifferentialConduitAPIMethod' => 'ConduitAPIMethod',
|
||||
'DifferentialConflictsField' => 'DifferentialCustomField',
|
||||
'DifferentialConflictsCommitMessageField' => 'DifferentialCommitMessageField',
|
||||
'DifferentialController' => 'PhabricatorController',
|
||||
'DifferentialCoreCustomField' => 'DifferentialCustomField',
|
||||
'DifferentialCreateCommentConduitAPIMethod' => 'DifferentialConduitAPIMethod',
|
||||
|
@ -5055,7 +5075,6 @@ phutil_register_library_map(array(
|
|||
'DifferentialDiffViewController' => 'DifferentialController',
|
||||
'DifferentialDoorkeeperRevisionFeedStoryPublisher' => 'DoorkeeperFeedStoryPublisher',
|
||||
'DifferentialDraft' => 'DifferentialDAO',
|
||||
'DifferentialEditPolicyField' => 'DifferentialCoreCustomField',
|
||||
'DifferentialExactUserFunctionDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
|
||||
'DifferentialFieldParseException' => 'Exception',
|
||||
'DifferentialFieldValidationException' => 'Exception',
|
||||
|
@ -5069,7 +5088,7 @@ phutil_register_library_map(array(
|
|||
'DifferentialGetRevisionConduitAPIMethod' => 'DifferentialConduitAPIMethod',
|
||||
'DifferentialGetWorkingCopy' => 'Phobject',
|
||||
'DifferentialGitHubLandingStrategy' => 'DifferentialLandingStrategy',
|
||||
'DifferentialGitSVNIDField' => 'DifferentialCustomField',
|
||||
'DifferentialGitSVNIDCommitMessageField' => 'DifferentialCommitMessageField',
|
||||
'DifferentialHarbormasterField' => 'DifferentialCustomField',
|
||||
'DifferentialHiddenComment' => 'DifferentialDAO',
|
||||
'DifferentialHostField' => 'DifferentialCustomField',
|
||||
|
@ -5092,6 +5111,7 @@ phutil_register_library_map(array(
|
|||
'DifferentialInlineCommentMailView' => 'DifferentialMailView',
|
||||
'DifferentialInlineCommentPreviewController' => 'PhabricatorInlineCommentPreviewController',
|
||||
'DifferentialInlineCommentQuery' => 'PhabricatorOffsetPagedQuery',
|
||||
'DifferentialJIRAIssuesCommitMessageField' => 'DifferentialCommitMessageCustomField',
|
||||
'DifferentialJIRAIssuesField' => 'DifferentialStoredCustomField',
|
||||
'DifferentialLandingActionMenuEventListener' => 'PhabricatorEventListener',
|
||||
'DifferentialLandingStrategy' => 'Phobject',
|
||||
|
@ -5103,14 +5123,11 @@ phutil_register_library_map(array(
|
|||
'DifferentialMailView' => 'Phobject',
|
||||
'DifferentialManiphestTasksField' => 'DifferentialCoreCustomField',
|
||||
'DifferentialModernHunk' => 'DifferentialHunk',
|
||||
'DifferentialNextStepField' => 'DifferentialCustomField',
|
||||
'DifferentialParentRevisionsField' => 'DifferentialCustomField',
|
||||
'DifferentialParseCacheGarbageCollector' => 'PhabricatorGarbageCollector',
|
||||
'DifferentialParseCommitMessageConduitAPIMethod' => 'DifferentialConduitAPIMethod',
|
||||
'DifferentialParseRenderTestCase' => 'PhabricatorTestCase',
|
||||
'DifferentialPathField' => 'DifferentialCustomField',
|
||||
'DifferentialProjectReviewersField' => 'DifferentialCustomField',
|
||||
'DifferentialProjectsField' => 'DifferentialCoreCustomField',
|
||||
'DifferentialQueryConduitAPIMethod' => 'DifferentialConduitAPIMethod',
|
||||
'DifferentialQueryDiffsConduitAPIMethod' => 'DifferentialConduitAPIMethod',
|
||||
'DifferentialRawDiffRenderer' => 'Phobject',
|
||||
|
@ -5124,16 +5141,18 @@ phutil_register_library_map(array(
|
|||
'DifferentialResponsibleDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
|
||||
'DifferentialResponsibleUserDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
|
||||
'DifferentialResponsibleViewerFunctionDatasource' => 'PhabricatorTypeaheadDatasource',
|
||||
'DifferentialRevertPlanCommitMessageField' => 'DifferentialCommitMessageCustomField',
|
||||
'DifferentialRevertPlanField' => 'DifferentialStoredCustomField',
|
||||
'DifferentialReviewedByField' => 'DifferentialCoreCustomField',
|
||||
'DifferentialReviewer' => 'Phobject',
|
||||
'DifferentialReviewedByCommitMessageField' => 'DifferentialCommitMessageField',
|
||||
'DifferentialReviewerDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
|
||||
'DifferentialReviewerForRevisionEdgeType' => 'PhabricatorEdgeType',
|
||||
'DifferentialReviewerProxy' => 'Phobject',
|
||||
'DifferentialReviewerStatus' => 'Phobject',
|
||||
'DifferentialReviewersAddBlockingReviewersHeraldAction' => 'DifferentialReviewersHeraldAction',
|
||||
'DifferentialReviewersAddBlockingSelfHeraldAction' => 'DifferentialReviewersHeraldAction',
|
||||
'DifferentialReviewersAddReviewersHeraldAction' => 'DifferentialReviewersHeraldAction',
|
||||
'DifferentialReviewersAddSelfHeraldAction' => 'DifferentialReviewersHeraldAction',
|
||||
'DifferentialReviewersCommitMessageField' => 'DifferentialCommitMessageField',
|
||||
'DifferentialReviewersField' => 'DifferentialCoreCustomField',
|
||||
'DifferentialReviewersHeraldAction' => 'HeraldAction',
|
||||
'DifferentialReviewersView' => 'AphrontView',
|
||||
|
@ -5164,7 +5183,9 @@ phutil_register_library_map(array(
|
|||
'DifferentialRevisionControlSystem' => 'Phobject',
|
||||
'DifferentialRevisionDependedOnByRevisionEdgeType' => 'PhabricatorEdgeType',
|
||||
'DifferentialRevisionDependsOnRevisionEdgeType' => 'PhabricatorEdgeType',
|
||||
'DifferentialRevisionEditConduitAPIMethod' => 'PhabricatorEditEngineAPIMethod',
|
||||
'DifferentialRevisionEditController' => 'DifferentialController',
|
||||
'DifferentialRevisionEditEngine' => 'PhabricatorEditEngine',
|
||||
'DifferentialRevisionFulltextEngine' => 'PhabricatorFulltextEngine',
|
||||
'DifferentialRevisionGraph' => 'PhabricatorObjectGraph',
|
||||
'DifferentialRevisionHasChildRelationship' => 'DifferentialRevisionRelationship',
|
||||
|
@ -5176,7 +5197,7 @@ phutil_register_library_map(array(
|
|||
'DifferentialRevisionHasTaskRelationship' => 'DifferentialRevisionRelationship',
|
||||
'DifferentialRevisionHeraldField' => 'HeraldField',
|
||||
'DifferentialRevisionHeraldFieldGroup' => 'HeraldFieldGroup',
|
||||
'DifferentialRevisionIDField' => 'DifferentialCustomField',
|
||||
'DifferentialRevisionIDCommitMessageField' => 'DifferentialCommitMessageField',
|
||||
'DifferentialRevisionLandController' => 'DifferentialController',
|
||||
'DifferentialRevisionListController' => 'DifferentialController',
|
||||
'DifferentialRevisionListView' => 'AphrontView',
|
||||
|
@ -5190,24 +5211,34 @@ phutil_register_library_map(array(
|
|||
'DifferentialRevisionRelationshipSource' => 'PhabricatorObjectRelationshipSource',
|
||||
'DifferentialRevisionRepositoryHeraldField' => 'DifferentialRevisionHeraldField',
|
||||
'DifferentialRevisionRepositoryProjectsHeraldField' => 'DifferentialRevisionHeraldField',
|
||||
'DifferentialRevisionRepositoryTransaction' => 'DifferentialRevisionTransactionType',
|
||||
'DifferentialRevisionRequiredActionResultBucket' => 'DifferentialRevisionResultBucket',
|
||||
'DifferentialRevisionResultBucket' => 'PhabricatorSearchResultBucket',
|
||||
'DifferentialRevisionReviewersHeraldField' => 'DifferentialRevisionHeraldField',
|
||||
'DifferentialRevisionReviewersTransaction' => 'DifferentialRevisionTransactionType',
|
||||
'DifferentialRevisionSearchConduitAPIMethod' => 'PhabricatorSearchEngineAPIMethod',
|
||||
'DifferentialRevisionSearchEngine' => 'PhabricatorApplicationSearchEngine',
|
||||
'DifferentialRevisionStatus' => 'Phobject',
|
||||
'DifferentialRevisionSummaryHeraldField' => 'DifferentialRevisionHeraldField',
|
||||
'DifferentialRevisionSummaryTransaction' => 'DifferentialRevisionTransactionType',
|
||||
'DifferentialRevisionTestPlanTransaction' => 'DifferentialRevisionTransactionType',
|
||||
'DifferentialRevisionTitleHeraldField' => 'DifferentialRevisionHeraldField',
|
||||
'DifferentialRevisionTitleTransaction' => 'DifferentialRevisionTransactionType',
|
||||
'DifferentialRevisionTransactionType' => 'PhabricatorModularTransactionType',
|
||||
'DifferentialRevisionUpdateHistoryView' => 'AphrontView',
|
||||
'DifferentialRevisionViewController' => 'DifferentialController',
|
||||
'DifferentialSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
||||
'DifferentialSetDiffPropertyConduitAPIMethod' => 'DifferentialConduitAPIMethod',
|
||||
'DifferentialStoredCustomField' => 'DifferentialCustomField',
|
||||
'DifferentialSubscribersField' => 'DifferentialCoreCustomField',
|
||||
'DifferentialSubscribersCommitMessageField' => 'DifferentialCommitMessageField',
|
||||
'DifferentialSummaryCommitMessageField' => 'DifferentialCommitMessageField',
|
||||
'DifferentialSummaryField' => 'DifferentialCoreCustomField',
|
||||
'DifferentialTagsCommitMessageField' => 'DifferentialCommitMessageField',
|
||||
'DifferentialTasksCommitMessageField' => 'DifferentialCommitMessageField',
|
||||
'DifferentialTestPlanCommitMessageField' => 'DifferentialCommitMessageField',
|
||||
'DifferentialTestPlanField' => 'DifferentialCoreCustomField',
|
||||
'DifferentialTitleField' => 'DifferentialCoreCustomField',
|
||||
'DifferentialTransaction' => 'PhabricatorApplicationTransaction',
|
||||
'DifferentialTitleCommitMessageField' => 'DifferentialCommitMessageField',
|
||||
'DifferentialTransaction' => 'PhabricatorModularTransaction',
|
||||
'DifferentialTransactionComment' => 'PhabricatorApplicationTransactionComment',
|
||||
'DifferentialTransactionEditor' => 'PhabricatorApplicationTransactionEditor',
|
||||
'DifferentialTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
|
||||
|
@ -5216,7 +5247,6 @@ phutil_register_library_map(array(
|
|||
'DifferentialUnitStatus' => 'Phobject',
|
||||
'DifferentialUnitTestResult' => 'Phobject',
|
||||
'DifferentialUpdateRevisionConduitAPIMethod' => 'DifferentialConduitAPIMethod',
|
||||
'DifferentialViewPolicyField' => 'DifferentialCoreCustomField',
|
||||
'DiffusionAuditorDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
|
||||
'DiffusionAuditorFunctionDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
|
||||
'DiffusionAuditorsAddAuditorsHeraldAction' => 'DiffusionAuditorsHeraldAction',
|
||||
|
@ -6610,7 +6640,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorApplicationEmailCommandsController' => 'PhabricatorApplicationsController',
|
||||
'PhabricatorApplicationLaunchView' => 'AphrontTagView',
|
||||
'PhabricatorApplicationPanelController' => 'PhabricatorApplicationsController',
|
||||
'PhabricatorApplicationProfilePanel' => 'PhabricatorProfilePanel',
|
||||
'PhabricatorApplicationProfileMenuItem' => 'PhabricatorProfileMenuItem',
|
||||
'PhabricatorApplicationQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
||||
'PhabricatorApplicationSearchController' => 'PhabricatorSearchBaseController',
|
||||
'PhabricatorApplicationSearchEngine' => 'Phobject',
|
||||
|
@ -7354,6 +7384,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorFlaggableInterface',
|
||||
'PhabricatorDestructibleInterface',
|
||||
'PhabricatorProjectInterface',
|
||||
'PhabricatorNgramsInterface',
|
||||
),
|
||||
'PhabricatorDashboardAddPanelController' => 'PhabricatorDashboardController',
|
||||
'PhabricatorDashboardApplication' => 'PhabricatorApplication',
|
||||
|
@ -7363,13 +7394,16 @@ phutil_register_library_map(array(
|
|||
'PhabricatorDashboardDAO' => 'PhabricatorLiskDAO',
|
||||
'PhabricatorDashboardDashboardHasPanelEdgeType' => 'PhabricatorEdgeType',
|
||||
'PhabricatorDashboardDashboardPHIDType' => 'PhabricatorPHIDType',
|
||||
'PhabricatorDashboardDatasource' => 'PhabricatorTypeaheadDatasource',
|
||||
'PhabricatorDashboardEditController' => 'PhabricatorDashboardController',
|
||||
'PhabricatorDashboardIconSet' => 'PhabricatorIconSet',
|
||||
'PhabricatorDashboardInstall' => 'PhabricatorDashboardDAO',
|
||||
'PhabricatorDashboardInstallController' => 'PhabricatorDashboardController',
|
||||
'PhabricatorDashboardLayoutConfig' => 'Phobject',
|
||||
'PhabricatorDashboardListController' => 'PhabricatorDashboardController',
|
||||
'PhabricatorDashboardManageController' => 'PhabricatorDashboardController',
|
||||
'PhabricatorDashboardMovePanelController' => 'PhabricatorDashboardController',
|
||||
'PhabricatorDashboardNgrams' => 'PhabricatorSearchNgrams',
|
||||
'PhabricatorDashboardPanel' => array(
|
||||
'PhabricatorDashboardDAO',
|
||||
'PhabricatorApplicationTransactionInterface',
|
||||
|
@ -7377,6 +7411,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorCustomFieldInterface',
|
||||
'PhabricatorFlaggableInterface',
|
||||
'PhabricatorDestructibleInterface',
|
||||
'PhabricatorNgramsInterface',
|
||||
),
|
||||
'PhabricatorDashboardPanelArchiveController' => 'PhabricatorDashboardController',
|
||||
'PhabricatorDashboardPanelCoreCustomField' => array(
|
||||
|
@ -7384,12 +7419,14 @@ phutil_register_library_map(array(
|
|||
'PhabricatorStandardCustomFieldInterface',
|
||||
),
|
||||
'PhabricatorDashboardPanelCustomField' => 'PhabricatorCustomField',
|
||||
'PhabricatorDashboardPanelDatasource' => 'PhabricatorTypeaheadDatasource',
|
||||
'PhabricatorDashboardPanelEditConduitAPIMethod' => 'PhabricatorEditEngineAPIMethod',
|
||||
'PhabricatorDashboardPanelEditController' => 'PhabricatorDashboardController',
|
||||
'PhabricatorDashboardPanelEditEngine' => 'PhabricatorEditEngine',
|
||||
'PhabricatorDashboardPanelEditproController' => 'PhabricatorDashboardController',
|
||||
'PhabricatorDashboardPanelHasDashboardEdgeType' => 'PhabricatorEdgeType',
|
||||
'PhabricatorDashboardPanelListController' => 'PhabricatorDashboardController',
|
||||
'PhabricatorDashboardPanelNgrams' => 'PhabricatorSearchNgrams',
|
||||
'PhabricatorDashboardPanelPHIDType' => 'PhabricatorPHIDType',
|
||||
'PhabricatorDashboardPanelQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
||||
'PhabricatorDashboardPanelRenderController' => 'PhabricatorDashboardController',
|
||||
|
@ -7403,6 +7440,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorDashboardPanelTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
|
||||
'PhabricatorDashboardPanelType' => 'Phobject',
|
||||
'PhabricatorDashboardPanelViewController' => 'PhabricatorDashboardController',
|
||||
'PhabricatorDashboardProfileMenuItem' => 'PhabricatorProfileMenuItem',
|
||||
'PhabricatorDashboardQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
||||
'PhabricatorDashboardQueryPanelType' => 'PhabricatorDashboardPanelType',
|
||||
'PhabricatorDashboardRemarkupRule' => 'PhabricatorObjectRemarkupRule',
|
||||
|
@ -7452,7 +7490,8 @@ phutil_register_library_map(array(
|
|||
'PhabricatorDisabledUserController' => 'PhabricatorAuthController',
|
||||
'PhabricatorDisplayPreferencesSettingsPanel' => 'PhabricatorEditEngineSettingsPanel',
|
||||
'PhabricatorDisqusAuthProvider' => 'PhabricatorOAuth2AuthProvider',
|
||||
'PhabricatorDividerProfilePanel' => 'PhabricatorProfilePanel',
|
||||
'PhabricatorDividerEditField' => 'PhabricatorEditField',
|
||||
'PhabricatorDividerProfileMenuItem' => 'PhabricatorProfileMenuItem',
|
||||
'PhabricatorDivinerApplication' => 'PhabricatorApplication',
|
||||
'PhabricatorDoorkeeperApplication' => 'PhabricatorApplication',
|
||||
'PhabricatorDraft' => 'PhabricatorDraftDAO',
|
||||
|
@ -7501,6 +7540,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorEditEngineConfigurationViewController' => 'PhabricatorEditEngineController',
|
||||
'PhabricatorEditEngineController' => 'PhabricatorApplicationTransactionController',
|
||||
'PhabricatorEditEngineCreateQuickActions' => 'PhabricatorQuickActions',
|
||||
'PhabricatorEditEngineDatasource' => 'PhabricatorTypeaheadDatasource',
|
||||
'PhabricatorEditEngineExtension' => 'Phobject',
|
||||
'PhabricatorEditEngineExtensionModule' => 'PhabricatorConfigModule',
|
||||
'PhabricatorEditEngineListController' => 'PhabricatorEditEngineController',
|
||||
|
@ -7775,8 +7815,6 @@ phutil_register_library_map(array(
|
|||
'PhabricatorHomeQuickCreateController' => 'PhabricatorHomeController',
|
||||
'PhabricatorHovercardEngineExtension' => 'Phobject',
|
||||
'PhabricatorHovercardEngineExtensionModule' => 'PhabricatorConfigModule',
|
||||
'PhabricatorHunksManagementMigrateWorkflow' => 'PhabricatorHunksManagementWorkflow',
|
||||
'PhabricatorHunksManagementWorkflow' => 'PhabricatorManagementWorkflow',
|
||||
'PhabricatorIDsSearchEngineExtension' => 'PhabricatorSearchEngineExtension',
|
||||
'PhabricatorIDsSearchField' => 'PhabricatorSearchField',
|
||||
'PhabricatorIRCProtocolAdapter' => 'PhabricatorProtocolAdapter',
|
||||
|
@ -7820,7 +7858,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorLegalpadDocumentPHIDType' => 'PhabricatorPHIDType',
|
||||
'PhabricatorLegalpadSignaturePolicyRule' => 'PhabricatorPolicyRule',
|
||||
'PhabricatorLibraryTestCase' => 'PhutilLibraryTestCase',
|
||||
'PhabricatorLinkProfilePanel' => 'PhabricatorProfilePanel',
|
||||
'PhabricatorLinkProfileMenuItem' => 'PhabricatorProfileMenuItem',
|
||||
'PhabricatorLipsumArtist' => 'Phobject',
|
||||
'PhabricatorLipsumContentSource' => 'PhabricatorContentSource',
|
||||
'PhabricatorLipsumGenerateWorkflow' => 'PhabricatorLipsumManagementWorkflow',
|
||||
|
@ -7968,7 +8006,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorModularTransactionType' => 'Phobject',
|
||||
'PhabricatorMonospacedFontSetting' => 'PhabricatorStringSetting',
|
||||
'PhabricatorMonospacedTextareasSetting' => 'PhabricatorSelectSetting',
|
||||
'PhabricatorMotivatorProfilePanel' => 'PhabricatorProfilePanel',
|
||||
'PhabricatorMotivatorProfileMenuItem' => 'PhabricatorProfileMenuItem',
|
||||
'PhabricatorMultiColumnUIExample' => 'PhabricatorUIExample',
|
||||
'PhabricatorMultiFactorSettingsPanel' => 'PhabricatorSettingsPanel',
|
||||
'PhabricatorMultimeterApplication' => 'PhabricatorApplication',
|
||||
|
@ -8310,7 +8348,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorPeopleCreateGuidanceContext' => 'PhabricatorGuidanceContext',
|
||||
'PhabricatorPeopleDatasource' => 'PhabricatorTypeaheadDatasource',
|
||||
'PhabricatorPeopleDeleteController' => 'PhabricatorPeopleController',
|
||||
'PhabricatorPeopleDetailsProfilePanel' => 'PhabricatorProfilePanel',
|
||||
'PhabricatorPeopleDetailsProfileMenuItem' => 'PhabricatorProfileMenuItem',
|
||||
'PhabricatorPeopleDisableController' => 'PhabricatorPeopleController',
|
||||
'PhabricatorPeopleEmpowerController' => 'PhabricatorPeopleController',
|
||||
'PhabricatorPeopleExternalPHIDType' => 'PhabricatorPHIDType',
|
||||
|
@ -8324,14 +8362,14 @@ phutil_register_library_map(array(
|
|||
'PhabricatorPeopleLogSearchEngine' => 'PhabricatorApplicationSearchEngine',
|
||||
'PhabricatorPeopleLogsController' => 'PhabricatorPeopleController',
|
||||
'PhabricatorPeopleMainMenuBarExtension' => 'PhabricatorMainMenuBarExtension',
|
||||
'PhabricatorPeopleManageProfilePanel' => 'PhabricatorProfilePanel',
|
||||
'PhabricatorPeopleManageProfileMenuItem' => 'PhabricatorProfileMenuItem',
|
||||
'PhabricatorPeopleNewController' => 'PhabricatorPeopleController',
|
||||
'PhabricatorPeopleNoOwnerDatasource' => 'PhabricatorTypeaheadDatasource',
|
||||
'PhabricatorPeopleOwnerDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
|
||||
'PhabricatorPeopleProfileController' => 'PhabricatorPeopleController',
|
||||
'PhabricatorPeopleProfileEditController' => 'PhabricatorPeopleProfileController',
|
||||
'PhabricatorPeopleProfileManageController' => 'PhabricatorPeopleProfileController',
|
||||
'PhabricatorPeopleProfilePanelEngine' => 'PhabricatorProfilePanelEngine',
|
||||
'PhabricatorPeopleProfileMenuEngine' => 'PhabricatorProfileMenuEngine',
|
||||
'PhabricatorPeopleProfilePictureController' => 'PhabricatorPeopleProfileController',
|
||||
'PhabricatorPeopleProfileViewController' => 'PhabricatorPeopleProfileController',
|
||||
'PhabricatorPeopleQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
||||
|
@ -8450,21 +8488,21 @@ phutil_register_library_map(array(
|
|||
'PhabricatorPolicyType' => 'PhabricatorPolicyConstants',
|
||||
'PhabricatorPonderApplication' => 'PhabricatorApplication',
|
||||
'PhabricatorProfileMenuCollapsedSetting' => 'PhabricatorInternalSetting',
|
||||
'PhabricatorProfilePanel' => 'Phobject',
|
||||
'PhabricatorProfilePanelConfiguration' => array(
|
||||
'PhabricatorProfileMenuEditEngine' => 'PhabricatorEditEngine',
|
||||
'PhabricatorProfileMenuEditor' => 'PhabricatorApplicationTransactionEditor',
|
||||
'PhabricatorProfileMenuEngine' => 'Phobject',
|
||||
'PhabricatorProfileMenuItem' => 'Phobject',
|
||||
'PhabricatorProfileMenuItemConfiguration' => array(
|
||||
'PhabricatorSearchDAO',
|
||||
'PhabricatorPolicyInterface',
|
||||
'PhabricatorExtendedPolicyInterface',
|
||||
'PhabricatorApplicationTransactionInterface',
|
||||
),
|
||||
'PhabricatorProfilePanelConfigurationQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
||||
'PhabricatorProfilePanelConfigurationTransaction' => 'PhabricatorApplicationTransaction',
|
||||
'PhabricatorProfilePanelConfigurationTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
|
||||
'PhabricatorProfilePanelEditEngine' => 'PhabricatorEditEngine',
|
||||
'PhabricatorProfilePanelEditor' => 'PhabricatorApplicationTransactionEditor',
|
||||
'PhabricatorProfilePanelEngine' => 'Phobject',
|
||||
'PhabricatorProfilePanelIconSet' => 'PhabricatorIconSet',
|
||||
'PhabricatorProfilePanelPHIDType' => 'PhabricatorPHIDType',
|
||||
'PhabricatorProfileMenuItemConfigurationQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
||||
'PhabricatorProfileMenuItemConfigurationTransaction' => 'PhabricatorApplicationTransaction',
|
||||
'PhabricatorProfileMenuItemConfigurationTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
|
||||
'PhabricatorProfileMenuItemIconSet' => 'PhabricatorIconSet',
|
||||
'PhabricatorProfileMenuItemPHIDType' => 'PhabricatorPHIDType',
|
||||
'PhabricatorProject' => array(
|
||||
'PhabricatorProjectDAO',
|
||||
'PhabricatorApplicationTransactionInterface',
|
||||
|
@ -8525,7 +8563,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorProjectDatasource' => 'PhabricatorTypeaheadDatasource',
|
||||
'PhabricatorProjectDefaultController' => 'PhabricatorProjectBoardController',
|
||||
'PhabricatorProjectDescriptionField' => 'PhabricatorProjectStandardCustomField',
|
||||
'PhabricatorProjectDetailsProfilePanel' => 'PhabricatorProfilePanel',
|
||||
'PhabricatorProjectDetailsProfileMenuItem' => 'PhabricatorProfileMenuItem',
|
||||
'PhabricatorProjectEditController' => 'PhabricatorProjectController',
|
||||
'PhabricatorProjectEditEngine' => 'PhabricatorEditEngine',
|
||||
'PhabricatorProjectEditPictureController' => 'PhabricatorProjectController',
|
||||
|
@ -8545,16 +8583,17 @@ phutil_register_library_map(array(
|
|||
'PhabricatorProjectLogicalUserDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
|
||||
'PhabricatorProjectLogicalViewerDatasource' => 'PhabricatorTypeaheadDatasource',
|
||||
'PhabricatorProjectManageController' => 'PhabricatorProjectController',
|
||||
'PhabricatorProjectManageProfilePanel' => 'PhabricatorProfilePanel',
|
||||
'PhabricatorProjectManageProfileMenuItem' => 'PhabricatorProfileMenuItem',
|
||||
'PhabricatorProjectMaterializedMemberEdgeType' => 'PhabricatorEdgeType',
|
||||
'PhabricatorProjectMemberListView' => 'PhabricatorProjectUserListView',
|
||||
'PhabricatorProjectMemberOfProjectEdgeType' => 'PhabricatorEdgeType',
|
||||
'PhabricatorProjectMembersAddController' => 'PhabricatorProjectController',
|
||||
'PhabricatorProjectMembersDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
|
||||
'PhabricatorProjectMembersPolicyRule' => 'PhabricatorPolicyRule',
|
||||
'PhabricatorProjectMembersProfilePanel' => 'PhabricatorProfilePanel',
|
||||
'PhabricatorProjectMembersProfileMenuItem' => 'PhabricatorProfileMenuItem',
|
||||
'PhabricatorProjectMembersRemoveController' => 'PhabricatorProjectController',
|
||||
'PhabricatorProjectMembersViewController' => 'PhabricatorProjectController',
|
||||
'PhabricatorProjectMenuItemController' => 'PhabricatorProjectController',
|
||||
'PhabricatorProjectMoveController' => 'PhabricatorProjectController',
|
||||
'PhabricatorProjectNameContextFreeGrammar' => 'PhutilContextFreeGrammar',
|
||||
'PhabricatorProjectNoProjectsDatasource' => 'PhabricatorTypeaheadDatasource',
|
||||
|
@ -8562,10 +8601,10 @@ phutil_register_library_map(array(
|
|||
'PhabricatorProjectOrUserDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
|
||||
'PhabricatorProjectOrUserFunctionDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
|
||||
'PhabricatorProjectPHIDResolver' => 'PhabricatorPHIDResolver',
|
||||
'PhabricatorProjectPanelController' => 'PhabricatorProjectController',
|
||||
'PhabricatorProjectPointsProfilePanel' => 'PhabricatorProfilePanel',
|
||||
'PhabricatorProjectPointsProfileMenuItem' => 'PhabricatorProfileMenuItem',
|
||||
'PhabricatorProjectProfileController' => 'PhabricatorProjectController',
|
||||
'PhabricatorProjectProfilePanelEngine' => 'PhabricatorProfilePanelEngine',
|
||||
'PhabricatorProjectProfileMenuEngine' => 'PhabricatorProfileMenuEngine',
|
||||
'PhabricatorProjectProfileMenuItem' => 'PhabricatorProfileMenuItem',
|
||||
'PhabricatorProjectProjectHasMemberEdgeType' => 'PhabricatorEdgeType',
|
||||
'PhabricatorProjectProjectHasObjectEdgeType' => 'PhabricatorEdgeType',
|
||||
'PhabricatorProjectProjectPHIDType' => 'PhabricatorPHIDType',
|
||||
|
@ -8584,7 +8623,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorProjectStatus' => 'Phobject',
|
||||
'PhabricatorProjectSubprojectWarningController' => 'PhabricatorProjectController',
|
||||
'PhabricatorProjectSubprojectsController' => 'PhabricatorProjectController',
|
||||
'PhabricatorProjectSubprojectsProfilePanel' => 'PhabricatorProfilePanel',
|
||||
'PhabricatorProjectSubprojectsProfileMenuItem' => 'PhabricatorProfileMenuItem',
|
||||
'PhabricatorProjectTestDataGenerator' => 'PhabricatorTestDataGenerator',
|
||||
'PhabricatorProjectTransaction' => 'PhabricatorApplicationTransaction',
|
||||
'PhabricatorProjectTransactionEditor' => 'PhabricatorApplicationTransactionEditor',
|
||||
|
@ -8597,7 +8636,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorProjectWatchController' => 'PhabricatorProjectController',
|
||||
'PhabricatorProjectWatcherListView' => 'PhabricatorProjectUserListView',
|
||||
'PhabricatorProjectWorkboardBackgroundColor' => 'Phobject',
|
||||
'PhabricatorProjectWorkboardProfilePanel' => 'PhabricatorProfilePanel',
|
||||
'PhabricatorProjectWorkboardProfileMenuItem' => 'PhabricatorProfileMenuItem',
|
||||
'PhabricatorProjectsCurtainExtension' => 'PHUICurtainExtension',
|
||||
'PhabricatorProjectsEditEngineExtension' => 'PhabricatorEditEngineExtension',
|
||||
'PhabricatorProjectsEditField' => 'PhabricatorTokenizerEditField',
|
||||
|
@ -9010,6 +9049,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorStreamingProtocolAdapter' => 'PhabricatorProtocolAdapter',
|
||||
'PhabricatorStringListEditField' => 'PhabricatorEditField',
|
||||
'PhabricatorStringSetting' => 'PhabricatorSetting',
|
||||
'PhabricatorSubmitEditField' => 'PhabricatorEditField',
|
||||
'PhabricatorSubscribedToObjectEdgeType' => 'PhabricatorEdgeType',
|
||||
'PhabricatorSubscribersEditField' => 'PhabricatorTokenizerEditField',
|
||||
'PhabricatorSubscribersQuery' => 'PhabricatorQuery',
|
||||
|
|
|
@ -303,18 +303,7 @@ abstract class AphrontApplicationConfiguration extends Phobject {
|
|||
phlog($unexpected_output);
|
||||
|
||||
if ($response instanceof AphrontWebpageResponse) {
|
||||
echo phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'style' =>
|
||||
'background: #eeddff;'.
|
||||
'white-space: pre-wrap;'.
|
||||
'z-index: 200000;'.
|
||||
'position: relative;'.
|
||||
'padding: 8px;'.
|
||||
'font-family: monospace',
|
||||
),
|
||||
$unexpected_output);
|
||||
$response->setUnexpectedOutput($unexpected_output);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,14 +3,46 @@
|
|||
final class AphrontWebpageResponse extends AphrontHTMLResponse {
|
||||
|
||||
private $content;
|
||||
private $unexpectedOutput;
|
||||
|
||||
public function setContent($content) {
|
||||
$this->content = $content;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setUnexpectedOutput($unexpected_output) {
|
||||
$this->unexpectedOutput = $unexpected_output;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getUnexpectedOutput() {
|
||||
return $this->unexpectedOutput;
|
||||
}
|
||||
|
||||
public function buildResponseString() {
|
||||
return hsprintf('%s', $this->content);
|
||||
$unexpected_output = $this->getUnexpectedOutput();
|
||||
if (strlen($unexpected_output)) {
|
||||
$style = array(
|
||||
'background: linear-gradient(180deg, #eeddff, #ddbbff);',
|
||||
'white-space: pre-wrap;',
|
||||
'z-index: 200000;',
|
||||
'position: relative;',
|
||||
'padding: 16px;',
|
||||
'font-family: monospace;',
|
||||
'text-shadow: 1px 1px 1px white;',
|
||||
);
|
||||
|
||||
$unexpected_header = phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'style' => implode(' ', $style),
|
||||
),
|
||||
$unexpected_output);
|
||||
} else {
|
||||
$unexpected_header = '';
|
||||
}
|
||||
|
||||
return hsprintf('%s%s', $unexpected_header, $this->content);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -627,18 +627,18 @@ abstract class PhabricatorApplication
|
|||
return $base.'(?:query/(?P<queryKey>[^/]+)/)?';
|
||||
}
|
||||
|
||||
protected function getPanelRouting($controller) {
|
||||
protected function getProfileMenuRouting($controller) {
|
||||
$edit_route = $this->getEditRoutePattern();
|
||||
|
||||
return array(
|
||||
'(?P<panelAction>view)/(?P<panelID>[^/]+)/' => $controller,
|
||||
'(?P<panelAction>hide)/(?P<panelID>[^/]+)/' => $controller,
|
||||
'(?P<panelAction>default)/(?P<panelID>[^/]+)/' => $controller,
|
||||
'(?P<panelAction>configure)/' => $controller,
|
||||
'(?P<panelAction>reorder)/' => $controller,
|
||||
'(?P<panelAction>edit)/'.$edit_route => $controller,
|
||||
'(?P<panelAction>new)/(?<panelKey>[^/]+)/'.$edit_route => $controller,
|
||||
'(?P<panelAction>builtin)/(?<panelID>[^/]+)/'.$edit_route
|
||||
'(?P<itemAction>view)/(?P<itemID>[^/]+)/' => $controller,
|
||||
'(?P<itemAction>hide)/(?P<itemID>[^/]+)/' => $controller,
|
||||
'(?P<itemAction>default)/(?P<itemID>[^/]+)/' => $controller,
|
||||
'(?P<itemAction>configure)/' => $controller,
|
||||
'(?P<itemAction>reorder)/' => $controller,
|
||||
'(?P<itemAction>edit)/'.$edit_route => $controller,
|
||||
'(?P<itemAction>new)/(?<itemKey>[^/]+)/'.$edit_route => $controller,
|
||||
'(?P<itemAction>builtin)/(?<itemID>[^/]+)/'.$edit_route
|
||||
=> $controller,
|
||||
);
|
||||
}
|
||||
|
|
|
@ -39,8 +39,20 @@ final class PhabricatorConfigVersionController
|
|||
$versions = $this->loadVersions($viewer);
|
||||
|
||||
$version_property_list = id(new PHUIPropertyListView());
|
||||
foreach ($versions as $name => $version) {
|
||||
$version_property_list->addProperty($name, $version);
|
||||
foreach ($versions as $name => $info) {
|
||||
$version = $info['version'];
|
||||
|
||||
if ($info['branchpoint']) {
|
||||
$display = pht(
|
||||
'%s (branched from %s on %s)',
|
||||
$version,
|
||||
$info['branchpoint'],
|
||||
$info['upstream']);
|
||||
} else {
|
||||
$display = $version;
|
||||
}
|
||||
|
||||
$version_property_list->addProperty($name, $display);
|
||||
}
|
||||
|
||||
$phabricator_root = dirname(phutil_get_library_root('phabricator'));
|
||||
|
@ -67,16 +79,109 @@ final class PhabricatorConfigVersionController
|
|||
$other_libraries = array_diff($all_libraries, $specs);
|
||||
$specs = array_merge($specs, $other_libraries);
|
||||
|
||||
$futures = array();
|
||||
$log_futures = array();
|
||||
$remote_futures = array();
|
||||
|
||||
foreach ($specs as $lib) {
|
||||
$root = dirname(phutil_get_library_root($lib));
|
||||
$futures[$lib] =
|
||||
id(new ExecFuture('git log --format=%s -n 1 --', '%H %ct'))
|
||||
|
||||
$log_command = csprintf(
|
||||
'git log --format=%s -n 1 --',
|
||||
'%H %ct');
|
||||
|
||||
$remote_command = csprintf(
|
||||
'git remote -v');
|
||||
|
||||
$log_futures[$lib] = id(new ExecFuture('%C', $log_command))
|
||||
->setCWD($root);
|
||||
|
||||
$remote_futures[$lib] = id(new ExecFuture('%C', $remote_command))
|
||||
->setCWD($root);
|
||||
}
|
||||
|
||||
$all_futures = array_merge($log_futures, $remote_futures);
|
||||
|
||||
id(new FutureIterator($all_futures))
|
||||
->resolveAll();
|
||||
|
||||
// A repository may have a bunch of remotes, but we're only going to look
|
||||
// for remotes we host to try to figure out where this repository branched.
|
||||
$upstream_pattern = '(github\.com/phacility/|secure\.phabricator\.com/)';
|
||||
|
||||
$upstream_futures = array();
|
||||
$lib_upstreams = array();
|
||||
foreach ($specs as $lib) {
|
||||
$remote_future = $remote_futures[$lib];
|
||||
|
||||
list($err, $stdout) = $remote_future->resolve();
|
||||
if ($err) {
|
||||
// If this fails for whatever reason, just move on.
|
||||
continue;
|
||||
}
|
||||
|
||||
// These look like this, with a tab separating the first two fields:
|
||||
// remote-name http://remote.uri/ (push)
|
||||
|
||||
$upstreams = array();
|
||||
|
||||
$remotes = phutil_split_lines($stdout, false);
|
||||
foreach ($remotes as $remote) {
|
||||
$remote_pattern = '/^([^\t]+)\t([^ ]+) \(([^)]+)\)\z/';
|
||||
$matches = null;
|
||||
if (!preg_match($remote_pattern, $remote, $matches)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Remote URIs are either "push" or "fetch": we only care about "fetch"
|
||||
// URIs.
|
||||
$type = $matches[3];
|
||||
if ($type != 'fetch') {
|
||||
continue;
|
||||
}
|
||||
|
||||
$uri = $matches[2];
|
||||
$is_upstream = preg_match($upstream_pattern, $uri);
|
||||
if (!$is_upstream) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$name = $matches[1];
|
||||
$upstreams[$name] = $name;
|
||||
}
|
||||
|
||||
// If we have several suitable upstreams, try to pick the one named
|
||||
// "origin", if it exists. Otherwise, just pick the first one.
|
||||
if (isset($upstreams['origin'])) {
|
||||
$upstream = $upstreams['origin'];
|
||||
} else if ($upstreams) {
|
||||
$upstream = head($upstreams);
|
||||
} else {
|
||||
$upstream = null;
|
||||
}
|
||||
|
||||
if (!$upstream) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$lib_upstreams[$lib] = $upstream;
|
||||
|
||||
$merge_base_command = csprintf(
|
||||
'git merge-base HEAD %s/master --',
|
||||
$upstream);
|
||||
|
||||
$root = dirname(phutil_get_library_root($lib));
|
||||
|
||||
$upstream_futures[$lib] = id(new ExecFuture('%C', $merge_base_command))
|
||||
->setCWD($root);
|
||||
}
|
||||
|
||||
if ($upstream_futures) {
|
||||
id(new FutureIterator($upstream_futures))
|
||||
->resolveAll();
|
||||
}
|
||||
|
||||
$results = array();
|
||||
foreach ($futures as $key => $future) {
|
||||
foreach ($log_futures as $lib => $future) {
|
||||
list($err, $stdout) = $future->resolve();
|
||||
if (!$err) {
|
||||
list($hash, $epoch) = explode(' ', $stdout);
|
||||
|
@ -84,7 +189,29 @@ final class PhabricatorConfigVersionController
|
|||
} else {
|
||||
$version = pht('Unknown');
|
||||
}
|
||||
$results[$key] = $version;
|
||||
|
||||
$result = array(
|
||||
'version' => $version,
|
||||
'upstream' => null,
|
||||
'branchpoint' => null,
|
||||
);
|
||||
|
||||
$upstream_future = idx($upstream_futures, $lib);
|
||||
if ($upstream_future) {
|
||||
list($err, $stdout) = $upstream_future->resolve();
|
||||
if (!$err) {
|
||||
$branchpoint = trim($stdout);
|
||||
if (strlen($branchpoint)) {
|
||||
// We only list a branchpoint if it differs from HEAD.
|
||||
if ($branchpoint != $hash) {
|
||||
$result['upstream'] = $lib_upstreams[$lib];
|
||||
$result['branchpoint'] = trim($stdout);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$results[$lib] = $result;
|
||||
}
|
||||
|
||||
return $results;
|
||||
|
|
|
@ -98,16 +98,6 @@ EODOC
|
|||
You can disable the "To:" and "Cc:" footers in mail if users prefer smaller
|
||||
messages.
|
||||
EODOC
|
||||
));
|
||||
|
||||
$bulk_description = $this->deformat(pht(<<<EODOC
|
||||
If this option is enabled, Phabricator will add a "Precedence: bulk" header to
|
||||
transactional mail (e.g., Differential, Maniphest and Herald notifications).
|
||||
This may improve the behavior of some auto-responder software and prevent it
|
||||
from replying. However, it may also cause deliverability issues -- notably, you
|
||||
currently can not send this header via Amazon SES, and enabling this option with
|
||||
SES will prevent delivery of any affected mail.
|
||||
EODOC
|
||||
));
|
||||
|
||||
$email_preferences_description = $this->deformat(pht(<<<EODOC
|
||||
|
|
|
@ -67,12 +67,14 @@ final class PhabricatorDashboardEditController
|
|||
}
|
||||
|
||||
$v_name = $dashboard->getName();
|
||||
$v_icon = $dashboard->getIcon();
|
||||
$v_layout_mode = $dashboard->getLayoutConfigObject()->getLayoutMode();
|
||||
$e_name = true;
|
||||
|
||||
$validation_exception = null;
|
||||
if ($request->isFormPost() && $request->getStr('edit')) {
|
||||
$v_name = $request->getStr('name');
|
||||
$v_icon = $request->getStr('icon');
|
||||
$v_layout_mode = $request->getStr('layout_mode');
|
||||
$v_view_policy = $request->getStr('viewPolicy');
|
||||
$v_edit_policy = $request->getStr('editPolicy');
|
||||
|
@ -81,6 +83,7 @@ final class PhabricatorDashboardEditController
|
|||
$xactions = array();
|
||||
|
||||
$type_name = PhabricatorDashboardTransaction::TYPE_NAME;
|
||||
$type_icon = PhabricatorDashboardTransaction::TYPE_ICON;
|
||||
$type_layout_mode = PhabricatorDashboardTransaction::TYPE_LAYOUT_MODE;
|
||||
$type_view_policy = PhabricatorTransactions::TYPE_VIEW_POLICY;
|
||||
$type_edit_policy = PhabricatorTransactions::TYPE_EDIT_POLICY;
|
||||
|
@ -91,6 +94,9 @@ final class PhabricatorDashboardEditController
|
|||
$xactions[] = id(new PhabricatorDashboardTransaction())
|
||||
->setTransactionType($type_layout_mode)
|
||||
->setNewValue($v_layout_mode);
|
||||
$xactions[] = id(new PhabricatorDashboardTransaction())
|
||||
->setTransactionType($type_icon)
|
||||
->setNewValue($v_icon);
|
||||
$xactions[] = id(new PhabricatorDashboardTransaction())
|
||||
->setTransactionType($type_view_policy)
|
||||
->setNewValue($v_view_policy);
|
||||
|
@ -146,6 +152,12 @@ final class PhabricatorDashboardEditController
|
|||
->setName('layout_mode')
|
||||
->setValue($v_layout_mode)
|
||||
->setOptions($layout_mode_options))
|
||||
->appendChild(
|
||||
id(new PHUIFormIconSetControl())
|
||||
->setLabel(pht('Icon'))
|
||||
->setName('icon')
|
||||
->setIconSet(new PhabricatorDashboardIconSet())
|
||||
->setValue($v_icon))
|
||||
->appendChild(
|
||||
id(new AphrontFormPolicyControl())
|
||||
->setName('viewPolicy')
|
||||
|
|
|
@ -109,7 +109,7 @@ final class PhabricatorDashboardManageController
|
|||
->setHeader($dashboard->getName())
|
||||
->setPolicyObject($dashboard)
|
||||
->setStatus($status_icon, $status_color, $status_name)
|
||||
->setHeaderIcon('fa-dashboard')
|
||||
->setHeaderIcon($dashboard->getIcon())
|
||||
->addActionLink($button);
|
||||
}
|
||||
|
||||
|
|
|
@ -400,7 +400,7 @@ final class PhabricatorDashboardPanelEditController
|
|||
$viewer = $request->getUser();
|
||||
|
||||
$copy = PhabricatorDashboardPanel::initializeNewPanel($viewer);
|
||||
$copy = PhabricatorDashboardPanel::copyPanel($copy, $panel);
|
||||
$copy = PhabricatorDashboardPanel::copyPanel($copy, $panel, $viewer);
|
||||
|
||||
$copy->openTransaction();
|
||||
$copy->save();
|
||||
|
|
|
@ -28,12 +28,16 @@ final class PhabricatorDashboardPanelEditEngine
|
|||
return pht('Edit Dashboard Panels');
|
||||
}
|
||||
|
||||
protected function supportsSearch() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getSummaryText() {
|
||||
return pht('This engine is used to modify dashboard panels.');
|
||||
}
|
||||
|
||||
public function getEngineApplicationClass() {
|
||||
return 'PhabricatorSearchApplication';
|
||||
return 'PhabricatorDashboardApplication';
|
||||
}
|
||||
|
||||
protected function newEditableObject() {
|
||||
|
|
|
@ -51,6 +51,7 @@ final class PhabricatorDashboardTransactionEditor
|
|||
$types[] = PhabricatorTransactions::TYPE_EDGE;
|
||||
|
||||
$types[] = PhabricatorDashboardTransaction::TYPE_NAME;
|
||||
$types[] = PhabricatorDashboardTransaction::TYPE_ICON;
|
||||
$types[] = PhabricatorDashboardTransaction::TYPE_STATUS;
|
||||
$types[] = PhabricatorDashboardTransaction::TYPE_LAYOUT_MODE;
|
||||
|
||||
|
@ -66,6 +67,11 @@ final class PhabricatorDashboardTransactionEditor
|
|||
return null;
|
||||
}
|
||||
return $object->getName();
|
||||
case PhabricatorDashboardTransaction::TYPE_ICON:
|
||||
if ($this->getIsNewObject()) {
|
||||
return null;
|
||||
}
|
||||
return $object->getIcon();
|
||||
case PhabricatorDashboardTransaction::TYPE_STATUS:
|
||||
if ($this->getIsNewObject()) {
|
||||
return null;
|
||||
|
@ -87,6 +93,7 @@ final class PhabricatorDashboardTransactionEditor
|
|||
PhabricatorApplicationTransaction $xaction) {
|
||||
switch ($xaction->getTransactionType()) {
|
||||
case PhabricatorDashboardTransaction::TYPE_NAME:
|
||||
case PhabricatorDashboardTransaction::TYPE_ICON:
|
||||
case PhabricatorDashboardTransaction::TYPE_STATUS:
|
||||
case PhabricatorDashboardTransaction::TYPE_LAYOUT_MODE:
|
||||
return $xaction->getNewValue();
|
||||
|
@ -101,6 +108,9 @@ final class PhabricatorDashboardTransactionEditor
|
|||
case PhabricatorDashboardTransaction::TYPE_NAME:
|
||||
$object->setName($xaction->getNewValue());
|
||||
return;
|
||||
case PhabricatorDashboardTransaction::TYPE_ICON:
|
||||
$object->setIcon($xaction->getNewValue());
|
||||
return;
|
||||
case PhabricatorDashboardTransaction::TYPE_STATUS:
|
||||
$object->setStatus($xaction->getNewValue());
|
||||
return;
|
||||
|
@ -130,6 +140,7 @@ final class PhabricatorDashboardTransactionEditor
|
|||
|
||||
switch ($xaction->getTransactionType()) {
|
||||
case PhabricatorDashboardTransaction::TYPE_NAME:
|
||||
case PhabricatorDashboardTransaction::TYPE_ICON:
|
||||
case PhabricatorDashboardTransaction::TYPE_STATUS:
|
||||
case PhabricatorDashboardTransaction::TYPE_LAYOUT_MODE:
|
||||
return;
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
|
||||
final class PhabricatorDashboardIconSet
|
||||
extends PhabricatorIconSet {
|
||||
|
||||
const ICONSETKEY = 'dashboards';
|
||||
|
||||
public function getSelectIconTitleText() {
|
||||
return pht('Choose Dashboard Icon');
|
||||
}
|
||||
|
||||
protected function newIcons() {
|
||||
$map = array(
|
||||
'fa-home' => pht('Home'),
|
||||
'fa-th-large' => pht('Blocks'),
|
||||
'fa-columns' => pht('Columns'),
|
||||
'fa-bookmark' => pht('Page Saver'),
|
||||
|
||||
'fa-book' => pht('Knowledge'),
|
||||
'fa-bomb' => pht('Kaboom'),
|
||||
'fa-pie-chart' => pht('Apple Blueberry'),
|
||||
'fa-bar-chart' => pht('Serious Business'),
|
||||
|
||||
'fa-bell' => pht('Ding Ding'),
|
||||
'fa-credit-card' => pht('Plastic Debt'),
|
||||
'fa-code' => pht('PHP is Life'),
|
||||
'fa-sticky-note' => pht('To Self'),
|
||||
|
||||
'fa-newspaper-o' => pht('Stay Woke'),
|
||||
'fa-server' => pht('Metallica'),
|
||||
'fa-hashtag' => pht('Corned Beef'),
|
||||
'fa-group' => pht('Triplets'),
|
||||
);
|
||||
|
||||
$icons = array();
|
||||
foreach ($map as $key => $label) {
|
||||
$icons[] = id(new PhabricatorIconSetIcon())
|
||||
->setKey($key)
|
||||
->setLabel($label);
|
||||
}
|
||||
|
||||
return $icons;
|
||||
}
|
||||
|
||||
}
|
|
@ -7,6 +7,7 @@ final class PhabricatorDashboardPanelQuery
|
|||
private $phids;
|
||||
private $archived;
|
||||
private $panelTypes;
|
||||
private $authorPHIDs;
|
||||
|
||||
public function withIDs(array $ids) {
|
||||
$this->ids = $ids;
|
||||
|
@ -28,6 +29,17 @@ final class PhabricatorDashboardPanelQuery
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function withAuthorPHIDs(array $authors) {
|
||||
$this->authorPHIDs = $authors;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function withNameNgrams($ngrams) {
|
||||
return $this->withNgramsConstraint(
|
||||
id(new PhabricatorDashboardPanelNgrams()),
|
||||
$ngrams);
|
||||
}
|
||||
|
||||
protected function loadPage() {
|
||||
return $this->loadStandardPage($this->newResultObject());
|
||||
}
|
||||
|
@ -75,6 +87,13 @@ final class PhabricatorDashboardPanelQuery
|
|||
$this->panelTypes);
|
||||
}
|
||||
|
||||
if ($this->authorPHIDs !== null) {
|
||||
$where[] = qsprintf(
|
||||
$conn,
|
||||
'authorPHID IN (%Ls)',
|
||||
$this->authorPHIDs);
|
||||
}
|
||||
|
||||
return $where;
|
||||
}
|
||||
|
||||
|
@ -82,4 +101,8 @@ final class PhabricatorDashboardPanelQuery
|
|||
return 'PhabricatorDashboardApplication';
|
||||
}
|
||||
|
||||
protected function getPrimaryTableAlias() {
|
||||
return 'dashboard_panel';
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -34,12 +34,28 @@ final class PhabricatorDashboardPanelSearchEngine
|
|||
$query->withPanelTypes(array($map['paneltype']));
|
||||
}
|
||||
|
||||
if ($map['authorPHIDs']) {
|
||||
$query->withAuthorPHIDs($map['authorPHIDs']);
|
||||
}
|
||||
|
||||
if ($map['name'] !== null) {
|
||||
$query->withNameNgrams($map['name']);
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
protected function buildCustomSearchFields() {
|
||||
|
||||
return array(
|
||||
id(new PhabricatorSearchTextField())
|
||||
->setLabel(pht('Name Contains'))
|
||||
->setKey('name')
|
||||
->setDescription(pht('Search for panels by name substring.')),
|
||||
id(new PhabricatorSearchDatasourceField())
|
||||
->setLabel(pht('Authored By'))
|
||||
->setKey('authorPHIDs')
|
||||
->setDatasource(new PhabricatorPeopleUserFunctionDatasource()),
|
||||
id(new PhabricatorSearchSelectField())
|
||||
->setKey('status')
|
||||
->setLabel(pht('Status'))
|
||||
|
@ -60,19 +76,32 @@ final class PhabricatorDashboardPanelSearchEngine
|
|||
}
|
||||
|
||||
protected function getBuiltinQueryNames() {
|
||||
return array(
|
||||
'active' => pht('Active Panels'),
|
||||
'all' => pht('All Panels'),
|
||||
);
|
||||
$names = array();
|
||||
|
||||
if ($this->requireViewer()->isLoggedIn()) {
|
||||
$names['authored'] = pht('Authored');
|
||||
}
|
||||
|
||||
$names['active'] = pht('Active Panels');
|
||||
$names['all'] = pht('All Panels');
|
||||
|
||||
return $names;
|
||||
}
|
||||
|
||||
public function buildSavedQueryFromBuiltin($query_key) {
|
||||
$query = $this->newSavedQuery();
|
||||
$query->setQueryKey($query_key);
|
||||
$viewer = $this->requireViewer();
|
||||
|
||||
switch ($query_key) {
|
||||
case 'active':
|
||||
return $query->setParameter('status', 'active');
|
||||
case 'authored':
|
||||
return $query->setParameter(
|
||||
'authorPHIDs',
|
||||
array(
|
||||
$viewer->getPHID(),
|
||||
));
|
||||
case 'all':
|
||||
return $query;
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ final class PhabricatorDashboardQuery
|
|||
private $ids;
|
||||
private $phids;
|
||||
private $statuses;
|
||||
private $authorPHIDs;
|
||||
|
||||
private $needPanels;
|
||||
private $needProjects;
|
||||
|
@ -25,6 +26,11 @@ final class PhabricatorDashboardQuery
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function withAuthorPHIDs(array $authors) {
|
||||
$this->authorPHIDs = $authors;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function needPanels($need_panels) {
|
||||
$this->needPanels = $need_panels;
|
||||
return $this;
|
||||
|
@ -35,6 +41,12 @@ final class PhabricatorDashboardQuery
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function withNameNgrams($ngrams) {
|
||||
return $this->withNgramsConstraint(
|
||||
id(new PhabricatorDashboardNgrams()),
|
||||
$ngrams);
|
||||
}
|
||||
|
||||
protected function loadPage() {
|
||||
return $this->loadStandardPage($this->newResultObject());
|
||||
}
|
||||
|
@ -121,6 +133,13 @@ final class PhabricatorDashboardQuery
|
|||
$this->statuses);
|
||||
}
|
||||
|
||||
if ($this->authorPHIDs !== null) {
|
||||
$where[] = qsprintf(
|
||||
$conn,
|
||||
'authorPHID IN (%Ls)',
|
||||
$this->authorPHIDs);
|
||||
}
|
||||
|
||||
return $where;
|
||||
}
|
||||
|
||||
|
@ -128,4 +147,8 @@ final class PhabricatorDashboardQuery
|
|||
return 'PhabricatorDashboardApplication';
|
||||
}
|
||||
|
||||
protected function getPrimaryTableAlias() {
|
||||
return 'dashboard';
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -18,6 +18,14 @@ final class PhabricatorDashboardSearchEngine
|
|||
|
||||
protected function buildCustomSearchFields() {
|
||||
return array(
|
||||
id(new PhabricatorSearchTextField())
|
||||
->setLabel(pht('Name Contains'))
|
||||
->setKey('name')
|
||||
->setDescription(pht('Search for dashboards by name substring.')),
|
||||
id(new PhabricatorSearchDatasourceField())
|
||||
->setLabel(pht('Authored By'))
|
||||
->setKey('authorPHIDs')
|
||||
->setDatasource(new PhabricatorPeopleUserFunctionDatasource()),
|
||||
id(new PhabricatorSearchCheckboxesField())
|
||||
->setKey('statuses')
|
||||
->setLabel(pht('Status'))
|
||||
|
@ -30,19 +38,32 @@ final class PhabricatorDashboardSearchEngine
|
|||
}
|
||||
|
||||
protected function getBuiltinQueryNames() {
|
||||
return array(
|
||||
'open' => pht('Active Dashboards'),
|
||||
'all' => pht('All Dashboards'),
|
||||
);
|
||||
$names = array();
|
||||
|
||||
if ($this->requireViewer()->isLoggedIn()) {
|
||||
$names['authored'] = pht('Authored');
|
||||
}
|
||||
|
||||
$names['open'] = pht('Active Dashboards');
|
||||
$names['all'] = pht('All Dashboards');
|
||||
|
||||
return $names;
|
||||
}
|
||||
|
||||
public function buildSavedQueryFromBuiltin($query_key) {
|
||||
$query = $this->newSavedQuery();
|
||||
$query->setQueryKey($query_key);
|
||||
$viewer = $this->requireViewer();
|
||||
|
||||
switch ($query_key) {
|
||||
case 'all':
|
||||
return $query;
|
||||
case 'authored':
|
||||
return $query->setParameter(
|
||||
'authorPHIDs',
|
||||
array(
|
||||
$viewer->getPHID(),
|
||||
));
|
||||
case 'open':
|
||||
return $query->setParameter(
|
||||
'statuses',
|
||||
|
@ -61,6 +82,14 @@ final class PhabricatorDashboardSearchEngine
|
|||
$query->withStatuses($map['statuses']);
|
||||
}
|
||||
|
||||
if ($map['authorPHIDs']) {
|
||||
$query->withAuthorPHIDs($map['authorPHIDs']);
|
||||
}
|
||||
|
||||
if ($map['name'] !== null) {
|
||||
$query->withNameNgrams($map['name']);
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
|
|
|
@ -9,12 +9,15 @@ final class PhabricatorDashboard extends PhabricatorDashboardDAO
|
|||
PhabricatorPolicyInterface,
|
||||
PhabricatorFlaggableInterface,
|
||||
PhabricatorDestructibleInterface,
|
||||
PhabricatorProjectInterface {
|
||||
PhabricatorProjectInterface,
|
||||
PhabricatorNgramsInterface {
|
||||
|
||||
protected $name;
|
||||
protected $authorPHID;
|
||||
protected $viewPolicy;
|
||||
protected $editPolicy;
|
||||
protected $status;
|
||||
protected $icon;
|
||||
protected $layoutConfig = array();
|
||||
|
||||
const STATUS_ACTIVE = 'active';
|
||||
|
@ -28,9 +31,11 @@ final class PhabricatorDashboard extends PhabricatorDashboardDAO
|
|||
public static function initializeNewDashboard(PhabricatorUser $actor) {
|
||||
return id(new PhabricatorDashboard())
|
||||
->setName('')
|
||||
->setIcon('fa-dashboard')
|
||||
->setViewPolicy(PhabricatorPolicies::POLICY_USER)
|
||||
->setEditPolicy($actor->getPHID())
|
||||
->setStatus(self::STATUS_ACTIVE)
|
||||
->setAuthorPHID($actor->getPHID())
|
||||
->attachPanels(array())
|
||||
->attachPanelPHIDs(array());
|
||||
}
|
||||
|
@ -59,8 +64,10 @@ final class PhabricatorDashboard extends PhabricatorDashboardDAO
|
|||
'layoutConfig' => self::SERIALIZATION_JSON,
|
||||
),
|
||||
self::CONFIG_COLUMN_SCHEMA => array(
|
||||
'name' => 'text255',
|
||||
'name' => 'sort255',
|
||||
'status' => 'text32',
|
||||
'icon' => 'text32',
|
||||
'authorPHID' => 'phid',
|
||||
),
|
||||
) + parent::getConfiguration();
|
||||
}
|
||||
|
@ -113,6 +120,10 @@ final class PhabricatorDashboard extends PhabricatorDashboardDAO
|
|||
return ($this->getStatus() == self::STATUS_ARCHIVED);
|
||||
}
|
||||
|
||||
public function getViewURI() {
|
||||
return '/dashboard/view/'.$this->getID().'/';
|
||||
}
|
||||
|
||||
|
||||
/* -( PhabricatorApplicationTransactionInterface )------------------------- */
|
||||
|
||||
|
@ -180,4 +191,14 @@ final class PhabricatorDashboard extends PhabricatorDashboardDAO
|
|||
}
|
||||
|
||||
|
||||
/* -( PhabricatorNgramInterface )------------------------------------------ */
|
||||
|
||||
|
||||
public function newNgrams() {
|
||||
return array(
|
||||
id(new PhabricatorDashboardNgrams())
|
||||
->setValue($this->getName()),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
final class PhabricatorDashboardNgrams
|
||||
extends PhabricatorSearchNgrams {
|
||||
|
||||
public function getNgramKey() {
|
||||
return 'dashboard';
|
||||
}
|
||||
|
||||
public function getColumnName() {
|
||||
return 'name';
|
||||
}
|
||||
|
||||
public function getApplicationName() {
|
||||
return 'dashboard';
|
||||
}
|
||||
|
||||
}
|
|
@ -10,12 +10,14 @@ final class PhabricatorDashboardPanel
|
|||
PhabricatorPolicyInterface,
|
||||
PhabricatorCustomFieldInterface,
|
||||
PhabricatorFlaggableInterface,
|
||||
PhabricatorDestructibleInterface {
|
||||
PhabricatorDestructibleInterface,
|
||||
PhabricatorNgramsInterface {
|
||||
|
||||
protected $name;
|
||||
protected $panelType;
|
||||
protected $viewPolicy;
|
||||
protected $editPolicy;
|
||||
protected $authorPHID;
|
||||
protected $isArchived = 0;
|
||||
protected $properties = array();
|
||||
|
||||
|
@ -24,17 +26,20 @@ final class PhabricatorDashboardPanel
|
|||
public static function initializeNewPanel(PhabricatorUser $actor) {
|
||||
return id(new PhabricatorDashboardPanel())
|
||||
->setName('')
|
||||
->setAuthorPHID($actor->getPHID())
|
||||
->setViewPolicy(PhabricatorPolicies::POLICY_USER)
|
||||
->setEditPolicy($actor->getPHID());
|
||||
}
|
||||
|
||||
public static function copyPanel(
|
||||
PhabricatorDashboardPanel $dst,
|
||||
PhabricatorDashboardPanel $src) {
|
||||
PhabricatorDashboardPanel $src,
|
||||
PhabricatorUser $user) {
|
||||
|
||||
$dst->name = $src->name;
|
||||
$dst->panelType = $src->panelType;
|
||||
$dst->properties = $src->properties;
|
||||
$dst->authorPHID = $user->getPHID();
|
||||
|
||||
return $dst;
|
||||
}
|
||||
|
@ -46,8 +51,9 @@ final class PhabricatorDashboardPanel
|
|||
'properties' => self::SERIALIZATION_JSON,
|
||||
),
|
||||
self::CONFIG_COLUMN_SCHEMA => array(
|
||||
'name' => 'text255',
|
||||
'name' => 'sort255',
|
||||
'panelType' => 'text64',
|
||||
'authorPHID' => 'phid',
|
||||
'isArchived' => 'bool',
|
||||
),
|
||||
) + parent::getConfiguration();
|
||||
|
@ -192,4 +198,15 @@ final class PhabricatorDashboardPanel
|
|||
$this->saveTransaction();
|
||||
}
|
||||
|
||||
|
||||
/* -( PhabricatorNgramInterface )------------------------------------------ */
|
||||
|
||||
|
||||
public function newNgrams() {
|
||||
return array(
|
||||
id(new PhabricatorDashboardPanelNgrams())
|
||||
->setValue($this->getName()),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
final class PhabricatorDashboardPanelNgrams
|
||||
extends PhabricatorSearchNgrams {
|
||||
|
||||
public function getNgramKey() {
|
||||
return 'dashboardpanel';
|
||||
}
|
||||
|
||||
public function getColumnName() {
|
||||
return 'name';
|
||||
}
|
||||
|
||||
public function getApplicationName() {
|
||||
return 'dashboard';
|
||||
}
|
||||
|
||||
}
|
|
@ -4,6 +4,7 @@ final class PhabricatorDashboardTransaction
|
|||
extends PhabricatorApplicationTransaction {
|
||||
|
||||
const TYPE_NAME = 'dashboard:name';
|
||||
const TYPE_ICON = 'dashboard:icon';
|
||||
const TYPE_STATUS = 'dashboard:status';
|
||||
const TYPE_LAYOUT_MODE = 'dashboard:layoutmode';
|
||||
|
||||
|
@ -39,6 +40,19 @@ final class PhabricatorDashboardTransaction
|
|||
$new);
|
||||
}
|
||||
break;
|
||||
case self::TYPE_ICON:
|
||||
if (!strlen($old)) {
|
||||
return pht(
|
||||
'%s set the dashboard icon.',
|
||||
$author_link);
|
||||
} else {
|
||||
return pht(
|
||||
'%s changed this dashboard icon from "%s" to "%s".',
|
||||
$author_link,
|
||||
$old,
|
||||
$new);
|
||||
}
|
||||
break;
|
||||
case self::TYPE_STATUS:
|
||||
if ($new == PhabricatorDashboard::STATUS_ACTIVE) {
|
||||
return pht(
|
||||
|
@ -82,6 +96,21 @@ final class PhabricatorDashboardTransaction
|
|||
$new);
|
||||
}
|
||||
break;
|
||||
case self::TYPE_ICON:
|
||||
if (!strlen($old)) {
|
||||
return pht(
|
||||
'%s set dashboard icon for %s.',
|
||||
$author_link,
|
||||
$object_link);
|
||||
} else {
|
||||
return pht(
|
||||
'%s set the dashboard icon on %s from "%s" to "%s".',
|
||||
$author_link,
|
||||
$object_link,
|
||||
$old,
|
||||
$new);
|
||||
}
|
||||
break;
|
||||
case self::TYPE_STATUS:
|
||||
if ($new == PhabricatorDashboard::STATUS_ACTIVE) {
|
||||
return pht(
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
final class PhabricatorDashboardDatasource
|
||||
extends PhabricatorTypeaheadDatasource {
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Dashboards');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type a dashboard name...');
|
||||
}
|
||||
|
||||
public function getDatasourceApplicationClass() {
|
||||
return 'PhabricatorDashboardApplication';
|
||||
}
|
||||
|
||||
public function loadResults() {
|
||||
$query = id(new PhabricatorDashboardQuery());
|
||||
|
||||
$dashboards = $this->executeQuery($query);
|
||||
$results = array();
|
||||
foreach ($dashboards as $dashboard) {
|
||||
$result = id(new PhabricatorTypeaheadResult())
|
||||
->setName($dashboard->getName())
|
||||
->setPHID($dashboard->getPHID())
|
||||
->addAttribute(pht('Dashboard'));
|
||||
|
||||
if ($dashboard->isArchived()) {
|
||||
$result->setClosed(pht('Archived'));
|
||||
}
|
||||
|
||||
$results[] = $result;
|
||||
}
|
||||
|
||||
return $this->filterResultsAgainstTokens($results);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
|
||||
final class PhabricatorDashboardPanelDatasource
|
||||
extends PhabricatorTypeaheadDatasource {
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Dashboard Panels');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type a panel name...');
|
||||
}
|
||||
|
||||
public function getDatasourceApplicationClass() {
|
||||
return 'PhabricatorDashboardApplication';
|
||||
}
|
||||
|
||||
public function loadResults() {
|
||||
$query = id(new PhabricatorDashboardPanelQuery());
|
||||
|
||||
$panels = $this->executeQuery($query);
|
||||
$results = array();
|
||||
foreach ($panels as $panel) {
|
||||
$impl = $panel->getImplementation();
|
||||
if ($impl) {
|
||||
$type_text = $impl->getPanelTypeName();
|
||||
} else {
|
||||
$type_text = nonempty($panel->getPanelType(), pht('Unknown Type'));
|
||||
}
|
||||
|
||||
$result = id(new PhabricatorTypeaheadResult())
|
||||
->setName($panel->getName())
|
||||
->setPHID($panel->getPHID())
|
||||
->addAttribute($type_text);
|
||||
|
||||
if ($panel->getIsArchived()) {
|
||||
$result->setClosed(pht('Archived'));
|
||||
}
|
||||
|
||||
$results[] = $result;
|
||||
}
|
||||
|
||||
return $this->filterResultsAgainstTokens($results);
|
||||
}
|
||||
|
||||
}
|
|
@ -65,7 +65,9 @@ final class PhabricatorDifferentialApplication extends PhabricatorApplication {
|
|||
),
|
||||
'changeset/' => 'DifferentialChangesetViewController',
|
||||
'revision/' => array(
|
||||
'edit/(?:(?P<id>[1-9]\d*)/)?'
|
||||
$this->getEditRoutePattern('edit/')
|
||||
=> 'DifferentialRevisionEditController',
|
||||
$this->getEditRoutePattern('attach/(?P<diffID>[^/]+)/to/')
|
||||
=> 'DifferentialRevisionEditController',
|
||||
'land/(?:(?P<id>[1-9]\d*))/(?P<strategy>[^/]+)/'
|
||||
=> 'DifferentialRevisionLandController',
|
||||
|
|
|
@ -53,21 +53,16 @@ abstract class DifferentialConduitAPIMethod extends ConduitAPIMethod {
|
|||
|
||||
$viewer = $request->getUser();
|
||||
|
||||
$field_list = PhabricatorCustomField::getObjectFields(
|
||||
$revision,
|
||||
DifferentialCustomField::ROLE_COMMITMESSAGEEDIT);
|
||||
|
||||
$field_list
|
||||
->setViewer($viewer)
|
||||
->readFieldsFromStorage($revision);
|
||||
$field_map = mpull($field_list->getFields(), null, 'getFieldKeyForConduit');
|
||||
// We're going to build the body of a "differential.revision.edit" API
|
||||
// request, then just call that code directly.
|
||||
|
||||
$xactions = array();
|
||||
$xactions[] = array(
|
||||
'type' => DifferentialRevisionEditEngine::KEY_UPDATE,
|
||||
'value' => $diff->getPHID(),
|
||||
);
|
||||
|
||||
$xactions[] = id(new DifferentialTransaction())
|
||||
->setTransactionType(DifferentialTransaction::TYPE_UPDATE)
|
||||
->setNewValue($diff->getPHID());
|
||||
|
||||
$field_map = DifferentialCommitMessageField::newEnabledFields($viewer);
|
||||
$values = $request->getValue('fields', array());
|
||||
foreach ($values as $key => $value) {
|
||||
$field = idx($field_map, $key);
|
||||
|
@ -79,70 +74,48 @@ abstract class DifferentialConduitAPIMethod extends ConduitAPIMethod {
|
|||
continue;
|
||||
}
|
||||
|
||||
$role = PhabricatorCustomField::ROLE_APPLICATIONTRANSACTIONS;
|
||||
if (!$field->shouldEnableForRole($role)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// TODO: This is fairly similar to PhabricatorCustomField's
|
||||
// buildFieldTransactionsFromRequest() method, but that's currently not
|
||||
// easy to reuse.
|
||||
|
||||
$transaction_type = $field->getApplicationTransactionType();
|
||||
$xaction = id(new DifferentialTransaction())
|
||||
->setTransactionType($transaction_type);
|
||||
|
||||
if ($transaction_type == PhabricatorTransactions::TYPE_CUSTOMFIELD) {
|
||||
// For TYPE_CUSTOMFIELD transactions only, we provide the old value
|
||||
// as an input.
|
||||
$old_value = $field->getOldValueForApplicationTransactions();
|
||||
$xaction->setOldValue($old_value);
|
||||
}
|
||||
|
||||
// The transaction itself will be validated so this is somewhat
|
||||
// redundant, but this validator will sometimes give us a better error
|
||||
// message or a better reaction to a bad value type.
|
||||
$field->validateCommitMessageValue($value);
|
||||
$field->readValueFromCommitMessage($value);
|
||||
|
||||
$xaction
|
||||
->setNewValue($field->getNewValueForApplicationTransactions());
|
||||
|
||||
if ($transaction_type == PhabricatorTransactions::TYPE_CUSTOMFIELD) {
|
||||
// For TYPE_CUSTOMFIELD transactions, add the field key in metadata.
|
||||
$xaction->setMetadataValue('customfield:key', $field->getFieldKey());
|
||||
}
|
||||
|
||||
$metadata = $field->getApplicationTransactionMetadata();
|
||||
foreach ($metadata as $meta_key => $meta_value) {
|
||||
$xaction->setMetadataValue($meta_key, $meta_value);
|
||||
}
|
||||
$value = $field->readFieldValueFromConduit($value);
|
||||
|
||||
foreach ($field->getFieldTransactions($value) as $xaction) {
|
||||
$xactions[] = $xaction;
|
||||
}
|
||||
}
|
||||
|
||||
$message = $request->getValue('message');
|
||||
if (strlen($message)) {
|
||||
// This is a little awkward, and should maybe move inside the transaction
|
||||
// editor. It largely exists for legacy reasons.
|
||||
// This is a little awkward, and should move elsewhere or be removed. It
|
||||
// largely exists for legacy reasons. See some discussion in T7899.
|
||||
$first_line = head(phutil_split_lines($message, false));
|
||||
|
||||
$first_line = id(new PhutilUTF8StringTruncator())
|
||||
->setMaximumBytes(250)
|
||||
->setMaximumGlyphs(80)
|
||||
->truncateString($first_line);
|
||||
|
||||
$diff->setDescription($first_line);
|
||||
$diff->save();
|
||||
|
||||
$xactions[] = id(new DifferentialTransaction())
|
||||
->setTransactionType(PhabricatorTransactions::TYPE_COMMENT)
|
||||
->attachComment(
|
||||
id(new DifferentialTransactionComment())
|
||||
->setContent($message));
|
||||
$xactions[] = array(
|
||||
'type' => PhabricatorCommentEditEngineExtension::EDITKEY,
|
||||
'value' => $message,
|
||||
);
|
||||
}
|
||||
|
||||
$editor = id(new DifferentialTransactionEditor())
|
||||
->setActor($viewer)
|
||||
->setContentSource($request->newContentSource())
|
||||
->setContinueOnNoEffect(true)
|
||||
->setContinueOnMissingFields(true);
|
||||
$method = 'differential.revision.edit';
|
||||
$params = array(
|
||||
'transactions' => $xactions,
|
||||
);
|
||||
|
||||
$editor->applyTransactions($revision, $xactions);
|
||||
if ($revision->getID()) {
|
||||
$params['objectIdentifier'] = $revision->getID();
|
||||
}
|
||||
|
||||
return id(new ConduitCall($method, $params, $strict = true))
|
||||
->setUser($viewer)
|
||||
->execute();
|
||||
}
|
||||
|
||||
protected function loadCustomFieldsForRevisions(
|
||||
|
|
|
@ -45,16 +45,18 @@ final class DifferentialCreateRevisionConduitAPIMethod
|
|||
$revision = DifferentialRevision::initializeNewRevision($viewer);
|
||||
$revision->attachReviewerStatus(array());
|
||||
|
||||
$this->applyFieldEdit(
|
||||
$result = $this->applyFieldEdit(
|
||||
$request,
|
||||
$revision,
|
||||
$diff,
|
||||
$request->getValue('fields', array()),
|
||||
$message = null);
|
||||
|
||||
$revision_id = $result['object']['id'];
|
||||
|
||||
return array(
|
||||
'revisionid' => $revision->getID(),
|
||||
'uri' => PhabricatorEnv::getURI('/D'.$revision->getID()),
|
||||
'revisionid' => $revision_id,
|
||||
'uri' => PhabricatorEnv::getURI('/D'.$revision_id),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -47,95 +47,78 @@ final class DifferentialGetCommitMessageConduitAPIMethod
|
|||
}
|
||||
} else {
|
||||
$revision = DifferentialRevision::initializeNewRevision($viewer);
|
||||
$revision->attachReviewerStatus(array());
|
||||
$revision->attachActiveDiff(null);
|
||||
}
|
||||
|
||||
$is_edit = $request->getValue('edit');
|
||||
$is_create = ($is_edit == 'create');
|
||||
// There are three modes here: "edit", "create", and "read" (which has
|
||||
// no value for the "edit" parameter).
|
||||
|
||||
$field_list = PhabricatorCustomField::getObjectFields(
|
||||
$revision,
|
||||
($is_edit
|
||||
? DifferentialCustomField::ROLE_COMMITMESSAGEEDIT
|
||||
: DifferentialCustomField::ROLE_COMMITMESSAGE));
|
||||
// In edit or create mode, we hide read-only fields. In create mode, we
|
||||
// show "Field:" templates for some fields even if they are empty.
|
||||
$edit_mode = $request->getValue('edit');
|
||||
|
||||
$field_list
|
||||
->setViewer($viewer)
|
||||
->readFieldsFromStorage($revision);
|
||||
$is_any_edit = (bool)strlen($edit_mode);
|
||||
$is_create = ($edit_mode == 'create');
|
||||
|
||||
$field_map = mpull($field_list->getFields(), null, 'getFieldKeyForConduit');
|
||||
$field_list = DifferentialCommitMessageField::newEnabledFields($viewer);
|
||||
|
||||
if ($is_edit) {
|
||||
$fields = $request->getValue('fields', array());
|
||||
foreach ($fields as $field => $value) {
|
||||
$custom_field = idx($field_map, $field);
|
||||
if (!$custom_field) {
|
||||
// Just ignore this, these workflows don't make strong distictions
|
||||
// about field editability on the client side.
|
||||
continue;
|
||||
$custom_storage = $this->loadCustomFieldStorage($viewer, $revision);
|
||||
foreach ($field_list as $field) {
|
||||
$field->setCustomFieldStorage($custom_storage);
|
||||
}
|
||||
if ($is_create ||
|
||||
$custom_field->shouldOverwriteWhenCommitMessageIsEdited()) {
|
||||
$custom_field->readValueFromCommitMessage($value);
|
||||
|
||||
// If we're editing the message, remove fields like "Conflicts" and
|
||||
// "git-svn-id" which should not be presented to the user for editing.
|
||||
if ($is_any_edit) {
|
||||
foreach ($field_list as $field_key => $field) {
|
||||
if (!$field->isFieldEditable()) {
|
||||
unset($field_list[$field_key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$phids = array();
|
||||
foreach ($field_list->getFields() as $key => $field) {
|
||||
$field_phids = $field->getRequiredHandlePHIDsForCommitMessage();
|
||||
if (!is_array($field_phids)) {
|
||||
throw new Exception(
|
||||
pht(
|
||||
'Custom field "%s" was expected to return an array of handle '.
|
||||
'PHIDs required for commit message rendering, but returned "%s" '.
|
||||
'instead.',
|
||||
$field->getFieldKey(),
|
||||
gettype($field_phids)));
|
||||
}
|
||||
$phids[$key] = $field_phids;
|
||||
}
|
||||
$overrides = $request->getValue('fields', array());
|
||||
|
||||
$all_phids = array_mergev($phids);
|
||||
if ($all_phids) {
|
||||
$all_handles = id(new PhabricatorHandleQuery())
|
||||
->setViewer($viewer)
|
||||
->withPHIDs($all_phids)
|
||||
->execute();
|
||||
$value_map = array();
|
||||
foreach ($field_list as $field_key => $field) {
|
||||
if (array_key_exists($field_key, $overrides)) {
|
||||
$field_value = $overrides[$field_key];
|
||||
} else {
|
||||
$all_handles = array();
|
||||
$field_value = $field->readFieldValueFromObject($revision);
|
||||
}
|
||||
|
||||
$key_title = id(new DifferentialTitleField())->getFieldKey();
|
||||
$default_title = DifferentialTitleField::getDefaultTitle();
|
||||
// We're calling this method on the value no matter where we got it
|
||||
// from, so we hit the same validation logic for values which came over
|
||||
// the wire and which we generated.
|
||||
$field_value = $field->readFieldValueFromConduit($field_value);
|
||||
|
||||
$value_map[$field_key] = $field_value;
|
||||
}
|
||||
|
||||
$key_title = DifferentialTitleCommitMessageField::FIELDKEY;
|
||||
|
||||
$commit_message = array();
|
||||
foreach ($field_list->getFields() as $key => $field) {
|
||||
$handles = array_select_keys($all_handles, $phids[$key]);
|
||||
foreach ($field_list as $field_key => $field) {
|
||||
$label = $field->getFieldName();
|
||||
$wire_value = $value_map[$field_key];
|
||||
$value = $field->renderFieldValue($wire_value);
|
||||
|
||||
$label = $field->renderCommitMessageLabel();
|
||||
$value = $field->renderCommitMessageValue($handles);
|
||||
$is_template = ($is_create && $field->isTemplateField());
|
||||
|
||||
if (!is_string($value) && !is_null($value)) {
|
||||
throw new Exception(
|
||||
pht(
|
||||
'Custom field "%s" was expected to render a string or null value, '.
|
||||
'but rendered a "%s" instead.',
|
||||
'Commit message field "%s" was expected to render a string or '.
|
||||
'null value, but rendered a "%s" instead.',
|
||||
$field->getFieldKey(),
|
||||
gettype($value)));
|
||||
}
|
||||
|
||||
$is_title = ($key == $key_title);
|
||||
$is_title = ($field_key == $key_title);
|
||||
|
||||
if (!strlen($value)) {
|
||||
if ($is_title) {
|
||||
$commit_message[] = $default_title;
|
||||
} else {
|
||||
if ($is_edit && $field->shouldAppearInCommitMessageTemplate()) {
|
||||
if ($is_template) {
|
||||
$commit_message[] = $label.': ';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ($is_title) {
|
||||
$commit_message[] = $value;
|
||||
|
@ -153,46 +136,31 @@ final class DifferentialGetCommitMessageConduitAPIMethod
|
|||
}
|
||||
}
|
||||
|
||||
if ($is_edit) {
|
||||
$tip = $this->getProTip($field_list);
|
||||
if ($tip !== null) {
|
||||
$commit_message[] = "\n".$tip;
|
||||
}
|
||||
return implode("\n\n", $commit_message);
|
||||
}
|
||||
|
||||
$commit_message = implode("\n\n", $commit_message);
|
||||
private function loadCustomFieldStorage(
|
||||
PhabricatorUser $viewer,
|
||||
DifferentialRevision $revision) {
|
||||
$custom_field_list = PhabricatorCustomField::getObjectFields(
|
||||
$revision,
|
||||
DifferentialCustomField::ROLE_COMMITMESSAGE);
|
||||
$custom_field_list
|
||||
->setViewer($viewer)
|
||||
->readFieldsFromStorage($revision);
|
||||
|
||||
return $commit_message;
|
||||
$custom_field_map = array();
|
||||
foreach ($custom_field_list->getFields() as $custom_field) {
|
||||
if (!$custom_field->shouldUseStorage()) {
|
||||
continue;
|
||||
}
|
||||
$custom_field_key = $custom_field->getFieldKey();
|
||||
$custom_field_value = $custom_field->getValueForStorage();
|
||||
$custom_field_map[$custom_field_key] = $custom_field_value;
|
||||
}
|
||||
|
||||
private function getProTip() {
|
||||
// Any field can provide tips, whether it normally appears on commit
|
||||
// messages or not.
|
||||
$field_list = PhabricatorCustomField::getObjectFields(
|
||||
new DifferentialRevision(),
|
||||
PhabricatorCustomField::ROLE_DEFAULT);
|
||||
|
||||
$tips = array();
|
||||
foreach ($field_list->getFields() as $key => $field) {
|
||||
$tips[] = $field->getProTips();
|
||||
}
|
||||
$tips = array_mergev($tips);
|
||||
|
||||
if (!$tips) {
|
||||
return null;
|
||||
return $custom_field_map;
|
||||
}
|
||||
|
||||
shuffle($tips);
|
||||
|
||||
$tip = pht('Tip: %s', head($tips));
|
||||
$tip = wordwrap($tip, 78, "\n", true);
|
||||
|
||||
$lines = explode("\n", $tip);
|
||||
foreach ($lines as $key => $line) {
|
||||
$lines[$key] = '# '.$line;
|
||||
}
|
||||
|
||||
return implode("\n", $lines);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
final class DifferentialParseCommitMessageConduitAPIMethod
|
||||
extends DifferentialConduitAPIMethod {
|
||||
|
||||
private $errors;
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'differential.parsecommitmessage';
|
||||
}
|
||||
|
@ -25,63 +23,28 @@ final class DifferentialParseCommitMessageConduitAPIMethod
|
|||
}
|
||||
|
||||
protected function execute(ConduitAPIRequest $request) {
|
||||
$viewer = $request->getUser();
|
||||
$corpus = $request->getValue('corpus');
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$parser = DifferentialCommitMessageParser::newStandardParser($viewer);
|
||||
|
||||
$is_partial = $request->getValue('partial');
|
||||
|
||||
$field_list = PhabricatorCustomField::getObjectFields(
|
||||
new DifferentialRevision(),
|
||||
DifferentialCustomField::ROLE_COMMITMESSAGE);
|
||||
$field_list->setViewer($viewer);
|
||||
$field_map = mpull($field_list->getFields(), null, 'getFieldKeyForConduit');
|
||||
|
||||
$corpus_map = $this->parseCommitMessage($corpus);
|
||||
|
||||
$values = array();
|
||||
foreach ($corpus_map as $field_key => $text_value) {
|
||||
$field = idx($field_map, $field_key);
|
||||
|
||||
if (!$field) {
|
||||
throw new Exception(
|
||||
pht(
|
||||
'Parser emitted text value for field key "%s", but no such '.
|
||||
'field exists.',
|
||||
$field_key));
|
||||
if ($is_partial) {
|
||||
$parser->setRaiseMissingFieldErrors(false);
|
||||
}
|
||||
|
||||
try {
|
||||
$values[$field_key] = $field->parseValueFromCommitMessage($text_value);
|
||||
} catch (DifferentialFieldParseException $ex) {
|
||||
$this->errors[] = pht(
|
||||
'Error parsing field "%s": %s',
|
||||
$field->renderCommitMessageLabel(),
|
||||
$ex->getMessage());
|
||||
}
|
||||
}
|
||||
$corpus = $request->getValue('corpus');
|
||||
$field_map = $parser->parseFields($corpus);
|
||||
|
||||
if (!$is_partial) {
|
||||
foreach ($field_map as $key => $field) {
|
||||
try {
|
||||
$field->validateCommitMessageValue(idx($values, $key));
|
||||
} catch (DifferentialFieldValidationException $ex) {
|
||||
$this->errors[] = pht(
|
||||
'Invalid or missing field "%s": %s',
|
||||
$field->renderCommitMessageLabel(),
|
||||
$ex->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
$errors = $parser->getErrors();
|
||||
|
||||
// grab some extra information about the Differential Revision: field...
|
||||
$revision_id_field = new DifferentialRevisionIDField();
|
||||
$revision_id_value = idx(
|
||||
$corpus_map,
|
||||
$revision_id_field->getFieldKeyForConduit());
|
||||
$field_map,
|
||||
DifferentialRevisionIDCommitMessageField::FIELDKEY);
|
||||
$revision_id_valid_domain = PhabricatorEnv::getProductionURI('');
|
||||
|
||||
return array(
|
||||
'errors' => $this->errors,
|
||||
'fields' => $values,
|
||||
'errors' => $errors,
|
||||
'fields' => $field_map,
|
||||
'revisionIDFieldInfo' => array(
|
||||
'value' => $revision_id_value,
|
||||
'validDomain' => $revision_id_valid_domain,
|
||||
|
@ -89,17 +52,4 @@ final class DifferentialParseCommitMessageConduitAPIMethod
|
|||
);
|
||||
}
|
||||
|
||||
private function parseCommitMessage($corpus) {
|
||||
$viewer = $this->getViewer();
|
||||
$parser = DifferentialCommitMessageParser::newStandardParser($viewer);
|
||||
$result = $parser->parseCorpus($corpus);
|
||||
|
||||
$this->errors = array();
|
||||
foreach ($parser->getErrors() as $error) {
|
||||
$this->errors[] = $error;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialRevisionEditConduitAPIMethod
|
||||
extends PhabricatorEditEngineAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'differential.revision.edit';
|
||||
}
|
||||
|
||||
public function newEditEngine() {
|
||||
return new DifferentialRevisionEditEngine();
|
||||
}
|
||||
|
||||
public function getMethodSummary() {
|
||||
return pht('Apply transactions to create or update a revision.');
|
||||
}
|
||||
|
||||
}
|
|
@ -25,23 +25,12 @@ final class PhabricatorDifferentialConfigOptions
|
|||
$custom_field_type = 'custom:PhabricatorCustomFieldConfigOptionType';
|
||||
|
||||
$fields = array(
|
||||
new DifferentialNextStepField(),
|
||||
|
||||
new DifferentialTitleField(),
|
||||
new DifferentialSummaryField(),
|
||||
new DifferentialTestPlanField(),
|
||||
new DifferentialAuthorField(),
|
||||
new DifferentialReviewersField(),
|
||||
new DifferentialProjectReviewersField(),
|
||||
new DifferentialReviewedByField(),
|
||||
new DifferentialSubscribersField(),
|
||||
new DifferentialRepositoryField(),
|
||||
new DifferentialProjectsField(),
|
||||
new DifferentialViewPolicyField(),
|
||||
new DifferentialEditPolicyField(),
|
||||
|
||||
new DifferentialParentRevisionsField(),
|
||||
new DifferentialChildRevisionsField(),
|
||||
new DifferentialManiphestTasksField(),
|
||||
new DifferentialCommitsField(),
|
||||
|
||||
|
@ -57,10 +46,6 @@ final class PhabricatorDifferentialConfigOptions
|
|||
new DifferentialLintField(),
|
||||
new DifferentialUnitField(),
|
||||
new DifferentialRevertPlanField(),
|
||||
|
||||
new DifferentialApplyPatchField(),
|
||||
|
||||
new DifferentialRevisionIDField(),
|
||||
);
|
||||
|
||||
$default_fields = array();
|
||||
|
|
|
@ -64,7 +64,7 @@ final class DifferentialCommentSaveController
|
|||
if (isset($current_reviewers[$reviewer_phid])) {
|
||||
continue;
|
||||
}
|
||||
$reviewer = new DifferentialReviewer(
|
||||
$reviewer = new DifferentialReviewerProxy(
|
||||
$reviewer_phid,
|
||||
array(
|
||||
'status' => DifferentialReviewerStatus::STATUS_ADDED,
|
||||
|
|
|
@ -23,6 +23,20 @@ final class DifferentialDiffViewController extends DifferentialController {
|
|||
->setURI('/D'.$diff->getRevisionID().'?id='.$diff->getID());
|
||||
}
|
||||
|
||||
if ($request->isFormPost()) {
|
||||
$diff_id = $diff->getID();
|
||||
$revision_id = $request->getInt('revisionID');
|
||||
if ($revision_id) {
|
||||
$attach_uri = "/revision/attach/{$diff_id}/to/{$revision_id}/";
|
||||
} else {
|
||||
$attach_uri = "/revision/attach/{$diff_id}/to/";
|
||||
}
|
||||
$attach_uri = $this->getApplicationURI($attach_uri);
|
||||
|
||||
return id(new AphrontRedirectResponse())
|
||||
->setURI($attach_uri);
|
||||
}
|
||||
|
||||
$diff_phid = $diff->getPHID();
|
||||
$buildables = id(new HarbormasterBuildableQuery())
|
||||
->setViewer($viewer)
|
||||
|
@ -78,13 +92,7 @@ final class DifferentialDiffViewController extends DifferentialController {
|
|||
$select);
|
||||
|
||||
$form = id(new AphrontFormView())
|
||||
->setUser($request->getUser())
|
||||
->setAction('/differential/revision/edit/')
|
||||
->addHiddenInput('diffID', $diff->getID())
|
||||
->addHiddenInput('viaDiffView', 1)
|
||||
->addHiddenInput(
|
||||
id(new DifferentialRepositoryField())->getFieldKey(),
|
||||
$diff->getRepositoryPHID())
|
||||
->setViewer($viewer)
|
||||
->appendRemarkupInstructions(
|
||||
pht(
|
||||
'Review the diff for correctness. When you are satisfied, either '.
|
||||
|
|
|
@ -5,34 +5,12 @@ final class DifferentialRevisionEditController
|
|||
|
||||
public function handleRequest(AphrontRequest $request) {
|
||||
$viewer = $this->getViewer();
|
||||
$id = $request->getURIData('id');
|
||||
|
||||
if (!$id) {
|
||||
$id = $request->getInt('revisionID');
|
||||
}
|
||||
// If we have a Diff ID, this is an "/attach/123/to/456/" action. The
|
||||
// user just created a diff and is trying to use it to create or update
|
||||
// a revision.
|
||||
$diff_id = $request->getURIData('diffID');
|
||||
|
||||
if ($id) {
|
||||
$revision = id(new DifferentialRevisionQuery())
|
||||
->setViewer($viewer)
|
||||
->withIDs(array($id))
|
||||
->needRelationships(true)
|
||||
->needReviewerStatus(true)
|
||||
->needActiveDiffs(true)
|
||||
->requireCapabilities(
|
||||
array(
|
||||
PhabricatorPolicyCapability::CAN_VIEW,
|
||||
PhabricatorPolicyCapability::CAN_EDIT,
|
||||
))
|
||||
->executeOne();
|
||||
if (!$revision) {
|
||||
return new Aphront404Response();
|
||||
}
|
||||
} else {
|
||||
$revision = DifferentialRevision::initializeNewRevision($viewer);
|
||||
$revision->attachReviewerStatus(array());
|
||||
}
|
||||
|
||||
$diff_id = $request->getInt('diffID');
|
||||
if ($diff_id) {
|
||||
$diff = id(new DifferentialDiffQuery())
|
||||
->setViewer($viewer)
|
||||
|
@ -41,174 +19,38 @@ final class DifferentialRevisionEditController
|
|||
if (!$diff) {
|
||||
return new Aphront404Response();
|
||||
}
|
||||
|
||||
if ($diff->getRevisionID()) {
|
||||
// TODO: Redirect?
|
||||
throw new Exception(
|
||||
pht('This diff is already attached to a revision!'));
|
||||
$revision = $diff->getRevision();
|
||||
return $this->newDialog()
|
||||
->setTitle(pht('Diff Already Attached'))
|
||||
->appendParagraph(
|
||||
pht(
|
||||
'This diff is already attached to a revision.'))
|
||||
->addCancelButton($revision->getURI(), pht('Continue'));
|
||||
}
|
||||
} else {
|
||||
$diff = null;
|
||||
}
|
||||
|
||||
if (!$diff) {
|
||||
if (!$revision->getID()) {
|
||||
throw new Exception(
|
||||
pht('You can not create a new revision without a diff!'));
|
||||
}
|
||||
} else {
|
||||
// TODO: It would be nice to show the diff being attached in the UI.
|
||||
$revision_id = $request->getURIData('id');
|
||||
if (!$diff && !$revision_id) {
|
||||
return $this->newDialog()
|
||||
->setTitle(pht('Diff Required'))
|
||||
->appendParagraph(
|
||||
pht(
|
||||
'You can not create a revision without a diff.'))
|
||||
->addCancelButton($this->getApplicationURI());
|
||||
}
|
||||
|
||||
$field_list = PhabricatorCustomField::getObjectFields(
|
||||
$revision,
|
||||
PhabricatorCustomField::ROLE_EDIT);
|
||||
$field_list
|
||||
->setViewer($viewer)
|
||||
->readFieldsFromStorage($revision);
|
||||
|
||||
if ($request->getStr('viaDiffView') && $diff) {
|
||||
$repo_key = id(new DifferentialRepositoryField())->getFieldKey();
|
||||
$repository_field = idx(
|
||||
$field_list->getFields(),
|
||||
$repo_key);
|
||||
if ($repository_field) {
|
||||
$repository_field->setValue($request->getStr($repo_key));
|
||||
}
|
||||
$view_policy_key = id(new DifferentialViewPolicyField())->getFieldKey();
|
||||
$view_policy_field = idx(
|
||||
$field_list->getFields(),
|
||||
$view_policy_key);
|
||||
if ($view_policy_field) {
|
||||
$view_policy_field->setValue($diff->getViewPolicy());
|
||||
}
|
||||
}
|
||||
|
||||
$validation_exception = null;
|
||||
if ($request->isFormPost() && !$request->getStr('viaDiffView')) {
|
||||
|
||||
$editor = id(new DifferentialTransactionEditor())
|
||||
->setActor($viewer)
|
||||
->setContentSourceFromRequest($request)
|
||||
->setContinueOnNoEffect(true);
|
||||
|
||||
$xactions = $field_list->buildFieldTransactionsFromRequest(
|
||||
new DifferentialTransaction(),
|
||||
$request);
|
||||
$engine = id(new DifferentialRevisionEditEngine())
|
||||
->setController($this);
|
||||
|
||||
if ($diff) {
|
||||
$repository_phid = null;
|
||||
$repository_tokenizer = $request->getArr(
|
||||
id(new DifferentialRepositoryField())->getFieldKey());
|
||||
if ($repository_tokenizer) {
|
||||
$repository_phid = reset($repository_tokenizer);
|
||||
$engine->setDiff($diff);
|
||||
}
|
||||
|
||||
$xactions[] = id(new DifferentialTransaction())
|
||||
->setTransactionType(DifferentialTransaction::TYPE_UPDATE)
|
||||
->setNewValue($diff->getPHID());
|
||||
|
||||
$editor->setRepositoryPHIDOverride($repository_phid);
|
||||
}
|
||||
|
||||
$comments = $request->getStr('comments');
|
||||
if (strlen($comments)) {
|
||||
$xactions[] = id(new DifferentialTransaction())
|
||||
->setTransactionType(PhabricatorTransactions::TYPE_COMMENT)
|
||||
->attachComment(
|
||||
id(new DifferentialTransactionComment())
|
||||
->setContent($comments));
|
||||
}
|
||||
|
||||
try {
|
||||
$editor->applyTransactions($revision, $xactions);
|
||||
$revision_uri = '/D'.$revision->getID();
|
||||
return id(new AphrontRedirectResponse())->setURI($revision_uri);
|
||||
} catch (PhabricatorApplicationTransactionValidationException $ex) {
|
||||
$validation_exception = $ex;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$form = new AphrontFormView();
|
||||
$form->setUser($request->getUser());
|
||||
if ($diff) {
|
||||
$form->addHiddenInput('diffID', $diff->getID());
|
||||
}
|
||||
|
||||
if ($revision->getID()) {
|
||||
$form->setAction('/differential/revision/edit/'.$revision->getID().'/');
|
||||
} else {
|
||||
$form->setAction('/differential/revision/edit/');
|
||||
}
|
||||
|
||||
if ($diff && $revision->getID()) {
|
||||
$form
|
||||
->appendChild(
|
||||
id(new AphrontFormTextAreaControl())
|
||||
->setLabel(pht('Comments'))
|
||||
->setName('comments')
|
||||
->setCaption(pht("Explain what's new in this diff."))
|
||||
->setValue($request->getStr('comments')))
|
||||
->appendChild(
|
||||
id(new AphrontFormSubmitControl())
|
||||
->setValue(pht('Save')))
|
||||
->appendChild(
|
||||
id(new AphrontFormDividerControl()));
|
||||
}
|
||||
|
||||
$field_list->appendFieldsToForm($form);
|
||||
|
||||
$submit = id(new AphrontFormSubmitControl())
|
||||
->setValue('Save');
|
||||
if ($diff) {
|
||||
$submit->addCancelButton('/differential/diff/'.$diff->getID().'/');
|
||||
} else {
|
||||
$submit->addCancelButton('/D'.$revision->getID());
|
||||
}
|
||||
|
||||
$form->appendChild($submit);
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
if ($revision->getID()) {
|
||||
if ($diff) {
|
||||
$header_icon = 'fa-upload';
|
||||
$title = pht('Update Revision');
|
||||
$crumbs->addTextCrumb(
|
||||
'D'.$revision->getID(),
|
||||
'/differential/diff/'.$diff->getID().'/');
|
||||
} else {
|
||||
$header_icon = 'fa-pencil';
|
||||
$title = pht('Edit Revision: %s', $revision->getTitle());
|
||||
$crumbs->addTextCrumb(
|
||||
'D'.$revision->getID(),
|
||||
'/D'.$revision->getID());
|
||||
}
|
||||
} else {
|
||||
$header_icon = 'fa-plus-square';
|
||||
$title = pht('Create New Differential Revision');
|
||||
}
|
||||
|
||||
$form_box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText('Revision')
|
||||
->setValidationException($validation_exception)
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setForm($form);
|
||||
|
||||
$crumbs->addTextCrumb($title);
|
||||
$crumbs->setBorder(true);
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setHeaderIcon($header_icon);
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setFooter($form_box);
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->appendChild($view);
|
||||
return $engine->buildResponse();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialApplyPatchField
|
||||
extends DifferentialCustomField {
|
||||
|
||||
public function getFieldKey() {
|
||||
return 'differential:apply-patch';
|
||||
}
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('Apply Patch');
|
||||
}
|
||||
|
||||
public function getFieldDescription() {
|
||||
return pht('Provides instructions for applying a local patch.');
|
||||
}
|
||||
|
||||
public function shouldAppearInPropertyView() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function renderPropertyViewLabel() {
|
||||
return $this->getFieldName();
|
||||
}
|
||||
|
||||
public function renderPropertyViewValue(array $handles) {
|
||||
$mono = $this->getObject()->getMonogram();
|
||||
|
||||
return phutil_tag('tt', array(), "arc patch {$mono}");
|
||||
}
|
||||
|
||||
}
|
|
@ -16,7 +16,7 @@ final class DifferentialAuditorsField
|
|||
}
|
||||
|
||||
public function getValueForStorage() {
|
||||
return json_encode($this->getValue());
|
||||
return phutil_json_encode($this->getValue());
|
||||
}
|
||||
|
||||
public function setValueFromStorage($value) {
|
||||
|
@ -28,33 +28,28 @@ final class DifferentialAuditorsField
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function shouldAppearInCommitMessage() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function shouldAllowEditInCommitMessage() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function canDisableField() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getRequiredHandlePHIDsForCommitMessage() {
|
||||
return nonempty($this->getValue(), array());
|
||||
public function shouldAppearInEditEngine() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function parseCommitMessageValue($value) {
|
||||
return $this->parseObjectList(
|
||||
$value,
|
||||
array(
|
||||
PhabricatorPeopleUserPHIDType::TYPECONST,
|
||||
PhabricatorProjectProjectPHIDType::TYPECONST,
|
||||
));
|
||||
public function shouldAppearInCommitMessage() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function renderCommitMessageValue(array $handles) {
|
||||
return $this->renderObjectList($handles);
|
||||
public function shouldAppearInConduitTransactions() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function newConduitEditParameterType() {
|
||||
return new ConduitPHIDListParameterType();
|
||||
}
|
||||
|
||||
public function shouldAppearInApplicationTransactions() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialAuthorField
|
||||
extends DifferentialCustomField {
|
||||
|
||||
public function getFieldKey() {
|
||||
return 'differential:author';
|
||||
}
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('Author');
|
||||
}
|
||||
|
||||
public function getFieldDescription() {
|
||||
return pht('Stores the revision author.');
|
||||
}
|
||||
|
||||
public function canDisableField() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function shouldAppearInPropertyView() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function renderPropertyViewLabel() {
|
||||
return $this->getFieldName();
|
||||
}
|
||||
|
||||
public function getRequiredHandlePHIDsForPropertyView() {
|
||||
return array($this->getObject()->getAuthorPHID());
|
||||
}
|
||||
|
||||
public function renderPropertyViewValue(array $handles) {
|
||||
return $handles[$this->getObject()->getAuthorPHID()]->renderHovercardLink();
|
||||
}
|
||||
|
||||
}
|
|
@ -32,6 +32,10 @@ final class DifferentialBlameRevisionField
|
|||
}
|
||||
|
||||
public function renderPropertyViewValue(array $handles) {
|
||||
if (!strlen($this->getValue())) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $this->getValue();
|
||||
}
|
||||
|
||||
|
@ -91,27 +95,16 @@ final class DifferentialBlameRevisionField
|
|||
return true;
|
||||
}
|
||||
|
||||
public function shouldAllowEditInCommitMessage() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function shouldOverwriteWhenCommitMessageIsEdited() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getCommitMessageLabels() {
|
||||
return array(
|
||||
'Blame Revision',
|
||||
'Blame Rev',
|
||||
);
|
||||
}
|
||||
|
||||
public function renderCommitMessageValue(array $handles) {
|
||||
return $this->getValue();
|
||||
}
|
||||
|
||||
public function shouldAppearInConduitDictionary() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function shouldAppearInConduitTransactions() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function newConduitEditParameterType() {
|
||||
return new ConduitStringParameterType();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialChildRevisionsField
|
||||
extends DifferentialCustomField {
|
||||
|
||||
public function getFieldKey() {
|
||||
return 'differential:dependencies';
|
||||
}
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('Child Revisions');
|
||||
}
|
||||
|
||||
public function canDisableField() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getFieldDescription() {
|
||||
return pht('Lists revisions this one is depended on by.');
|
||||
}
|
||||
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* This field doesn't do anything, it just parses the "Conflicts:" field which
|
||||
* `git` can insert after a merge, so we don't squish the field value into
|
||||
* some other field.
|
||||
*/
|
||||
final class DifferentialConflictsField
|
||||
extends DifferentialCustomField {
|
||||
|
||||
public function getFieldKey() {
|
||||
return 'differential:conflicts';
|
||||
}
|
||||
|
||||
public function getFieldKeyForConduit() {
|
||||
return 'conflicts';
|
||||
}
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('Conflicts');
|
||||
}
|
||||
|
||||
public function getFieldDescription() {
|
||||
return pht(
|
||||
'Parses the "%s" field which Git can inject into commit messages.',
|
||||
'Conflicts');
|
||||
}
|
||||
|
||||
public function canDisableField() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function shouldAppearInCommitMessage() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function shouldAllowEditInCommitMessage() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function renderCommitMessageValue(array $handles) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
|
@ -118,10 +118,6 @@ abstract class DifferentialCoreCustomField
|
|||
return true;
|
||||
}
|
||||
|
||||
public function shouldAppearInEditView() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function readValueFromObject(PhabricatorCustomFieldInterface $object) {
|
||||
if ($this->isCoreFieldRequired()) {
|
||||
$this->setFieldError(true);
|
||||
|
|
|
@ -20,6 +20,11 @@ abstract class DifferentialCustomField
|
|||
return $this->getFieldKey();
|
||||
}
|
||||
|
||||
// TODO: As above.
|
||||
public function getModernFieldKey() {
|
||||
return $this->getFieldKeyForConduit();
|
||||
}
|
||||
|
||||
public function shouldEnableForRole($role) {
|
||||
switch ($role) {
|
||||
case self::ROLE_COMMITMESSAGE:
|
||||
|
|
|
@ -1,50 +0,0 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialEditPolicyField
|
||||
extends DifferentialCoreCustomField {
|
||||
|
||||
public function getFieldKey() {
|
||||
return 'differential:edit-policy';
|
||||
}
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('Edit Policy');
|
||||
}
|
||||
|
||||
public function getFieldDescription() {
|
||||
return pht('Controls who can edit a revision.');
|
||||
}
|
||||
|
||||
protected function readValueFromRevision(
|
||||
DifferentialRevision $revision) {
|
||||
return $revision->getEditPolicy();
|
||||
}
|
||||
|
||||
public function readValueFromRequest(AphrontRequest $request) {
|
||||
$this->setValue($request->getStr($this->getFieldKey()));
|
||||
}
|
||||
|
||||
public function renderEditControl(array $handles) {
|
||||
$viewer = $this->getViewer();
|
||||
$revision = $this->getObject();
|
||||
|
||||
$policies = id(new PhabricatorPolicyQuery())
|
||||
->setViewer($viewer)
|
||||
->setObject($revision)
|
||||
->execute();
|
||||
|
||||
return id(new AphrontFormPolicyControl())
|
||||
->setUser($viewer)
|
||||
->setCapability(PhabricatorPolicyCapability::CAN_EDIT)
|
||||
->setPolicyObject($revision)
|
||||
->setPolicies($policies)
|
||||
->setName($this->getFieldKey())
|
||||
->setValue($this->getValue())
|
||||
->setError($this->getFieldError());
|
||||
}
|
||||
|
||||
public function getApplicationTransactionType() {
|
||||
return PhabricatorTransactions::TYPE_EDIT_POLICY;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* This field doesn't do anything, it just parses the "git-svn-id" field which
|
||||
* `git svn` inserts into commit messages so that we don't end up mangling
|
||||
* some other field.
|
||||
*/
|
||||
final class DifferentialGitSVNIDField
|
||||
extends DifferentialCustomField {
|
||||
|
||||
public function getFieldKey() {
|
||||
return 'differential:git-svn-id';
|
||||
}
|
||||
|
||||
public function getFieldKeyForConduit() {
|
||||
return 'gitSVNID';
|
||||
}
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('git-svn-id');
|
||||
}
|
||||
|
||||
public function getFieldDescription() {
|
||||
return pht(
|
||||
'Parses the "%s" field which Git/SVN can inject into commit messages.',
|
||||
'git-svn-id');
|
||||
}
|
||||
|
||||
public function canDisableField() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function shouldAppearInCommitMessage() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function shouldAllowEditInCommitMessage() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function renderCommitMessageValue(array $handles) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
|
@ -295,8 +295,6 @@ final class DifferentialJIRAIssuesField
|
|||
return $this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function renderCommitMessageValue(array $handles) {
|
||||
$value = $this->getValue();
|
||||
if (!$value) {
|
||||
|
@ -309,5 +307,12 @@ final class DifferentialJIRAIssuesField
|
|||
return true;
|
||||
}
|
||||
|
||||
public function shouldAppearInConduitTransactions() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function newConduitEditParameterType() {
|
||||
return new ConduitStringListParameterType();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -7,18 +7,10 @@ final class DifferentialManiphestTasksField
|
|||
return 'differential:maniphest-tasks';
|
||||
}
|
||||
|
||||
public function getFieldKeyForConduit() {
|
||||
return 'maniphestTaskPHIDs';
|
||||
}
|
||||
|
||||
public function canDisableField() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function shouldAppearInEditView() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('Maniphest Tasks');
|
||||
}
|
||||
|
@ -45,25 +37,6 @@ final class DifferentialManiphestTasksField
|
|||
DifferentialRevisionHasTaskEdgeType::EDGECONST);
|
||||
}
|
||||
|
||||
public function getApplicationTransactionType() {
|
||||
return PhabricatorTransactions::TYPE_EDGE;
|
||||
}
|
||||
|
||||
public function getApplicationTransactionMetadata() {
|
||||
return array(
|
||||
'edge:type' => DifferentialRevisionHasTaskEdgeType::EDGECONST,
|
||||
);
|
||||
}
|
||||
|
||||
public function getNewValueForApplicationTransactions() {
|
||||
$edges = array();
|
||||
foreach ($this->getValue() as $phid) {
|
||||
$edges[$phid] = $phid;
|
||||
}
|
||||
|
||||
return array('=' => $edges);
|
||||
}
|
||||
|
||||
public function getRequiredHandlePHIDsForPropertyView() {
|
||||
return $this->getValue();
|
||||
}
|
||||
|
@ -72,44 +45,4 @@ final class DifferentialManiphestTasksField
|
|||
return $this->renderHandleList($handles);
|
||||
}
|
||||
|
||||
public function shouldAppearInCommitMessage() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function shouldAllowEditInCommitMessage() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getCommitMessageLabels() {
|
||||
return array(
|
||||
'Maniphest Task',
|
||||
'Maniphest Tasks',
|
||||
);
|
||||
}
|
||||
|
||||
public function parseValueFromCommitMessage($value) {
|
||||
return $this->parseObjectList(
|
||||
$value,
|
||||
array(
|
||||
ManiphestTaskPHIDType::TYPECONST,
|
||||
));
|
||||
}
|
||||
|
||||
public function getRequiredHandlePHIDsForCommitMessage() {
|
||||
return $this->getRequiredHandlePHIDsForPropertyView();
|
||||
}
|
||||
|
||||
public function renderCommitMessageValue(array $handles) {
|
||||
return $this->renderObjectList($handles);
|
||||
}
|
||||
|
||||
public function getProTips() {
|
||||
return array(
|
||||
pht(
|
||||
'Write "%s" in your summary to automatically close the '.
|
||||
'corresponding task when this change lands.',
|
||||
'Fixes T123'),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,65 +0,0 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialNextStepField
|
||||
extends DifferentialCustomField {
|
||||
|
||||
public function getFieldKey() {
|
||||
return 'differential:next-step';
|
||||
}
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('Next Step');
|
||||
}
|
||||
|
||||
public function getFieldDescription() {
|
||||
return pht('Provides a hint for the next step to take.');
|
||||
}
|
||||
|
||||
public function shouldAppearInPropertyView() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function renderPropertyViewLabel() {
|
||||
return $this->getFieldName();
|
||||
}
|
||||
|
||||
public function renderPropertyViewValue(array $handles) {
|
||||
$revision = $this->getObject();
|
||||
$diff = $revision->getActiveDiff();
|
||||
|
||||
$status = $revision->getStatus();
|
||||
if ($status != ArcanistDifferentialRevisionStatus::ACCEPTED) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$local_vcs = $diff->getSourceControlSystem();
|
||||
switch ($local_vcs) {
|
||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL:
|
||||
$bookmark = $diff->getBookmark();
|
||||
if (strlen($bookmark)) {
|
||||
$next_step = csprintf('arc land %R', $bookmark);
|
||||
} else {
|
||||
$next_step = csprintf('arc land');
|
||||
}
|
||||
break;
|
||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT:
|
||||
$branch = $diff->getBranch();
|
||||
if (strlen($branch)) {
|
||||
$next_step = csprintf('arc land %R', $branch);
|
||||
} else {
|
||||
$next_step = csprintf('arc land');
|
||||
}
|
||||
break;
|
||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN:
|
||||
$next_step = csprintf('arc commit');
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
$next_step = phutil_tag('tt', array(), (string)$next_step);
|
||||
|
||||
return $next_step;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialParentRevisionsField
|
||||
extends DifferentialCustomField {
|
||||
|
||||
public function getFieldKey() {
|
||||
return 'differential:depends-on';
|
||||
}
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('Parent Revisions');
|
||||
}
|
||||
|
||||
public function canDisableField() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getFieldDescription() {
|
||||
return pht('Lists revisions this one depends on.');
|
||||
}
|
||||
|
||||
public function getProTips() {
|
||||
return array(
|
||||
pht(
|
||||
'Create a dependency between revisions by writing '.
|
||||
'"%s" in your summary.',
|
||||
'Depends on D123'),
|
||||
);
|
||||
}
|
||||
|
||||
public function shouldAppearInConduitDictionary() {
|
||||
// To improve performance, we exclude this field from Conduit results.
|
||||
// See T11404 for discussion. In modern "differential.revision.search",
|
||||
// this information is available efficiently as an attachment.
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getConduitDictionaryValue() {
|
||||
return PhabricatorEdgeQuery::loadDestinationPHIDs(
|
||||
$this->getObject()->getPHID(),
|
||||
DifferentialRevisionDependsOnRevisionEdgeType::EDGECONST);
|
||||
}
|
||||
|
||||
}
|
|
@ -57,13 +57,4 @@ final class DifferentialProjectReviewersField
|
|||
return $reviewers;
|
||||
}
|
||||
|
||||
public function getProTips() {
|
||||
return array(
|
||||
pht(
|
||||
'You can add a project as a subscriber or reviewer by writing '.
|
||||
'"%s" in the appropriate field.',
|
||||
'#projectname'),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,114 +0,0 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialProjectsField
|
||||
extends DifferentialCoreCustomField {
|
||||
|
||||
public function getFieldKey() {
|
||||
return 'phabricator:projects';
|
||||
}
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('Tags');
|
||||
}
|
||||
|
||||
public function getFieldDescription() {
|
||||
return pht('Tag projects.');
|
||||
}
|
||||
|
||||
public function shouldAppearInPropertyView() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function shouldAppearInEditView() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function shouldAppearInApplicationTransactions() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function readValueFromRevision(
|
||||
DifferentialRevision $revision) {
|
||||
if (!$revision->getPHID()) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$projects = PhabricatorEdgeQuery::loadDestinationPHIDs(
|
||||
$revision->getPHID(),
|
||||
PhabricatorProjectObjectHasProjectEdgeType::EDGECONST);
|
||||
$projects = array_reverse($projects);
|
||||
|
||||
return $projects;
|
||||
}
|
||||
|
||||
public function getNewValueForApplicationTransactions() {
|
||||
return array('=' => array_fuse($this->getValue()));
|
||||
}
|
||||
|
||||
public function readValueFromRequest(AphrontRequest $request) {
|
||||
$this->setValue($request->getArr($this->getFieldKey()));
|
||||
}
|
||||
|
||||
public function renderEditControl(array $handles) {
|
||||
return id(new AphrontFormTokenizerControl())
|
||||
->setUser($this->getViewer())
|
||||
->setName($this->getFieldKey())
|
||||
->setDatasource(new PhabricatorProjectDatasource())
|
||||
->setValue($this->getValue())
|
||||
->setLabel($this->getFieldName());
|
||||
}
|
||||
|
||||
public function getApplicationTransactionType() {
|
||||
return PhabricatorTransactions::TYPE_EDGE;
|
||||
}
|
||||
|
||||
public function shouldAppearInCommitMessage() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function shouldAllowEditInCommitMessage() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function shouldOverwriteWhenCommitMessageIsEdited() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getCommitMessageLabels() {
|
||||
return array(
|
||||
'Tags',
|
||||
'Project',
|
||||
'Projects',
|
||||
);
|
||||
}
|
||||
|
||||
public function getRequiredHandlePHIDsForCommitMessage() {
|
||||
return $this->getValue();
|
||||
}
|
||||
|
||||
public function renderCommitMessageValue(array $handles) {
|
||||
return $this->renderObjectList($handles);
|
||||
}
|
||||
|
||||
public function shouldAppearInConduitDictionary() {
|
||||
// To improve performance, we exclude this field from Conduit results.
|
||||
// See T11404 for discussion. In modern "differential.revision.search",
|
||||
// this information is available efficiently as an attachment.
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getApplicationTransactionMetadata() {
|
||||
return array(
|
||||
'edge:type' => PhabricatorProjectObjectHasProjectEdgeType::EDGECONST,
|
||||
);
|
||||
}
|
||||
|
||||
public function parseValueFromCommitMessage($value) {
|
||||
return $this->parseObjectList(
|
||||
$value,
|
||||
array(
|
||||
PhabricatorProjectProjectPHIDType::TYPECONST,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
|
@ -20,107 +20,6 @@ final class DifferentialRepositoryField
|
|||
return $revision->getRepositoryPHID();
|
||||
}
|
||||
|
||||
protected function writeValueToRevision(
|
||||
DifferentialRevision $revision,
|
||||
$value) {
|
||||
$revision->setRepositoryPHID($value);
|
||||
}
|
||||
|
||||
public function readValueFromRequest(AphrontRequest $request) {
|
||||
$phids = $request->getArr($this->getFieldKey());
|
||||
$first = head($phids);
|
||||
$this->setValue(nonempty($first, null));
|
||||
}
|
||||
|
||||
public function renderEditControl(array $handles) {
|
||||
if ($this->getValue()) {
|
||||
$value = array($this->getValue());
|
||||
} else {
|
||||
$value = array();
|
||||
}
|
||||
|
||||
return id(new AphrontFormTokenizerControl())
|
||||
->setUser($this->getViewer())
|
||||
->setName($this->getFieldKey())
|
||||
->setDatasource(new DiffusionRepositoryDatasource())
|
||||
->setValue($value)
|
||||
->setError($this->getFieldError())
|
||||
->setLabel($this->getFieldName())
|
||||
->setLimit(1);
|
||||
}
|
||||
|
||||
public function getApplicationTransactionRequiredHandlePHIDs(
|
||||
PhabricatorApplicationTransaction $xaction) {
|
||||
|
||||
$old = $xaction->getOldValue();
|
||||
$new = $xaction->getNewValue();
|
||||
|
||||
$phids = array();
|
||||
if ($old) {
|
||||
$phids[] = $old;
|
||||
}
|
||||
if ($new) {
|
||||
$phids[] = $new;
|
||||
}
|
||||
|
||||
return $phids;
|
||||
}
|
||||
|
||||
public function getApplicationTransactionTitle(
|
||||
PhabricatorApplicationTransaction $xaction) {
|
||||
$author_phid = $xaction->getAuthorPHID();
|
||||
$old = $xaction->getOldValue();
|
||||
$new = $xaction->getNewValue();
|
||||
|
||||
if ($old && $new) {
|
||||
return pht(
|
||||
'%s changed the repository for this revision from %s to %s.',
|
||||
$xaction->renderHandleLink($author_phid),
|
||||
$xaction->renderHandleLink($old),
|
||||
$xaction->renderHandleLink($new));
|
||||
} else if ($new) {
|
||||
return pht(
|
||||
'%s set the repository for this revision to %s.',
|
||||
$xaction->renderHandleLink($author_phid),
|
||||
$xaction->renderHandleLink($new));
|
||||
} else {
|
||||
return pht(
|
||||
'%s removed %s as the repository for this revision.',
|
||||
$xaction->renderHandleLink($author_phid),
|
||||
$xaction->renderHandleLink($old));
|
||||
}
|
||||
}
|
||||
|
||||
public function getApplicationTransactionTitleForFeed(
|
||||
PhabricatorApplicationTransaction $xaction) {
|
||||
|
||||
$object_phid = $xaction->getObjectPHID();
|
||||
$author_phid = $xaction->getAuthorPHID();
|
||||
$old = $xaction->getOldValue();
|
||||
$new = $xaction->getNewValue();
|
||||
|
||||
if ($old && $new) {
|
||||
return pht(
|
||||
'%s updated the repository for %s from %s to %s.',
|
||||
$xaction->renderHandleLink($author_phid),
|
||||
$xaction->renderHandleLink($object_phid),
|
||||
$xaction->renderHandleLink($old),
|
||||
$xaction->renderHandleLink($new));
|
||||
} else if ($new) {
|
||||
return pht(
|
||||
'%s set the repository for %s to %s.',
|
||||
$xaction->renderHandleLink($author_phid),
|
||||
$xaction->renderHandleLink($object_phid),
|
||||
$xaction->renderHandleLink($new));
|
||||
} else {
|
||||
return pht(
|
||||
'%s removed the repository for %s. (Repository was %s.)',
|
||||
$xaction->renderHandleLink($author_phid),
|
||||
$xaction->renderHandleLink($object_phid),
|
||||
$xaction->renderHandleLink($old));
|
||||
}
|
||||
}
|
||||
|
||||
public function shouldAppearInPropertyView() {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -19,10 +19,6 @@ final class DifferentialRequiredSignaturesField
|
|||
return true;
|
||||
}
|
||||
|
||||
public function shouldAppearInEditView() {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function readValueFromRevision(DifferentialRevision $revision) {
|
||||
return self::loadForRevision($revision);
|
||||
}
|
||||
|
|
|
@ -142,4 +142,12 @@ final class DifferentialRevertPlanField
|
|||
return true;
|
||||
}
|
||||
|
||||
public function shouldAppearInConduitTransactions() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function newConduitEditParameterType() {
|
||||
return new ConduitStringParameterType();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,72 +0,0 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialReviewedByField
|
||||
extends DifferentialCoreCustomField {
|
||||
|
||||
public function getFieldKey() {
|
||||
return 'differential:reviewed-by';
|
||||
}
|
||||
|
||||
public function getFieldKeyForConduit() {
|
||||
return 'reviewedByPHIDs';
|
||||
}
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('Reviewed By');
|
||||
}
|
||||
|
||||
public function getFieldDescription() {
|
||||
return pht('Records accepting reviewers in the durable message.');
|
||||
}
|
||||
|
||||
public function shouldAppearInApplicationTransactions() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function shouldAppearInEditView() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function canDisableField() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function readValueFromRevision(
|
||||
DifferentialRevision $revision) {
|
||||
|
||||
$phids = array();
|
||||
foreach ($revision->getReviewerStatus() as $reviewer) {
|
||||
switch ($reviewer->getStatus()) {
|
||||
case DifferentialReviewerStatus::STATUS_ACCEPTED:
|
||||
case DifferentialReviewerStatus::STATUS_ACCEPTED_OLDER:
|
||||
$phids[] = $reviewer->getReviewerPHID();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return $phids;
|
||||
}
|
||||
|
||||
public function shouldAppearInCommitMessage() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function parseValueFromCommitMessage($value) {
|
||||
return $this->parseObjectList(
|
||||
$value,
|
||||
array(
|
||||
PhabricatorPeopleUserPHIDType::TYPECONST,
|
||||
PhabricatorProjectProjectPHIDType::TYPECONST,
|
||||
),
|
||||
$allow_partial = true);
|
||||
}
|
||||
|
||||
public function getRequiredHandlePHIDsForCommitMessage() {
|
||||
return $this->getValue();
|
||||
}
|
||||
|
||||
public function renderCommitMessageValue(array $handles) {
|
||||
return $this->renderObjectList($handles);
|
||||
}
|
||||
|
||||
}
|
|
@ -7,10 +7,6 @@ final class DifferentialReviewersField
|
|||
return 'differential:reviewers';
|
||||
}
|
||||
|
||||
public function getFieldKeyForConduit() {
|
||||
return 'reviewerPHIDs';
|
||||
}
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('Reviewers');
|
||||
}
|
||||
|
@ -24,108 +20,6 @@ final class DifferentialReviewersField
|
|||
return $revision->getReviewerStatus();
|
||||
}
|
||||
|
||||
public function getNewValueForApplicationTransactions() {
|
||||
$specs = array();
|
||||
foreach ($this->getValue() as $reviewer) {
|
||||
$specs[$reviewer->getReviewerPHID()] = array(
|
||||
'data' => $reviewer->getEdgeData(),
|
||||
);
|
||||
}
|
||||
|
||||
return array('=' => $specs);
|
||||
}
|
||||
|
||||
public function readValueFromRequest(AphrontRequest $request) {
|
||||
$datasource = id(new DifferentialBlockingReviewerDatasource())
|
||||
->setViewer($request->getViewer());
|
||||
|
||||
$new_phids = $request->getArr($this->getFieldKey());
|
||||
$new_phids = $datasource->evaluateTokens($new_phids);
|
||||
|
||||
$reviewers = array();
|
||||
foreach ($new_phids as $spec) {
|
||||
if (!is_array($spec)) {
|
||||
$reviewers[$spec] = DifferentialReviewerStatus::STATUS_ADDED;
|
||||
} else {
|
||||
$reviewers[$spec['phid']] = $spec['type'];
|
||||
}
|
||||
}
|
||||
|
||||
$this->updateReviewers($this->getValue(), $reviewers);
|
||||
}
|
||||
|
||||
private function updateReviewers(array $old_reviewers, array $new_map) {
|
||||
// Compute a new set of reviewer objects. We're going to respect the new
|
||||
// reviewer order, add or remove any new or missing reviewers, and respect
|
||||
// any blocking or unblocking changes. For reviewers who were there before
|
||||
// and are still there, we're going to keep the old value because it
|
||||
// may be something like "Accept", "Reject", etc.
|
||||
|
||||
$old_map = mpull($old_reviewers, 'getStatus', 'getReviewerPHID');
|
||||
$status_blocking = DifferentialReviewerStatus::STATUS_BLOCKING;
|
||||
|
||||
$new_reviewers = array();
|
||||
foreach ($new_map as $phid => $new) {
|
||||
$old = idx($old_map, $phid);
|
||||
|
||||
// If we have an old status and this didn't make the reviewer blocking
|
||||
// or nonblocking, just retain the old status. This makes sure we don't
|
||||
// throw away rejects, accepts, etc.
|
||||
if ($old) {
|
||||
$is_block = ($old !== $status_blocking && $new === $status_blocking);
|
||||
$is_unblock = ($old === $status_blocking && $new !== $status_blocking);
|
||||
if (!$is_block && !$is_unblock) {
|
||||
$new_reviewers[$phid] = $old;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$new_reviewers[$phid] = $new;
|
||||
}
|
||||
|
||||
foreach ($new_reviewers as $phid => $status) {
|
||||
$new_reviewers[$phid] = new DifferentialReviewer(
|
||||
$phid,
|
||||
array(
|
||||
'status' => $status,
|
||||
));
|
||||
}
|
||||
|
||||
$this->setValue($new_reviewers);
|
||||
}
|
||||
|
||||
public function renderEditControl(array $handles) {
|
||||
$status_blocking = DifferentialReviewerStatus::STATUS_BLOCKING;
|
||||
|
||||
$value = array();
|
||||
foreach ($this->getValue() as $reviewer) {
|
||||
$phid = $reviewer->getReviewerPHID();
|
||||
if ($reviewer->getStatus() == $status_blocking) {
|
||||
$value[] = 'blocking('.$phid.')';
|
||||
} else {
|
||||
$value[] = $phid;
|
||||
}
|
||||
}
|
||||
|
||||
return id(new AphrontFormTokenizerControl())
|
||||
->setUser($this->getViewer())
|
||||
->setName($this->getFieldKey())
|
||||
->setDatasource(new DifferentialReviewerDatasource())
|
||||
->setValue($value)
|
||||
->setError($this->getFieldError())
|
||||
->setLabel($this->getFieldName());
|
||||
}
|
||||
|
||||
public function getApplicationTransactionType() {
|
||||
return PhabricatorTransactions::TYPE_EDGE;
|
||||
}
|
||||
|
||||
public function getApplicationTransactionMetadata() {
|
||||
return array(
|
||||
'edge:type' => DifferentialRevisionHasReviewerEdgeType::EDGECONST,
|
||||
);
|
||||
}
|
||||
|
||||
public function shouldAppearInPropertyView() {
|
||||
return true;
|
||||
}
|
||||
|
@ -164,99 +58,6 @@ final class DifferentialReviewersField
|
|||
return $reviewers;
|
||||
}
|
||||
|
||||
public function shouldAppearInCommitMessage() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function shouldAppearInCommitMessageTemplate() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getCommitMessageLabels() {
|
||||
return array(
|
||||
'Reviewer',
|
||||
'Reviewers',
|
||||
);
|
||||
}
|
||||
|
||||
public function parseValueFromCommitMessage($value) {
|
||||
$results = $this->parseObjectList(
|
||||
$value,
|
||||
array(
|
||||
PhabricatorPeopleUserPHIDType::TYPECONST,
|
||||
PhabricatorProjectProjectPHIDType::TYPECONST,
|
||||
PhabricatorOwnersPackagePHIDType::TYPECONST,
|
||||
),
|
||||
false,
|
||||
array('!'));
|
||||
|
||||
return $this->flattenReviewers($results);
|
||||
}
|
||||
|
||||
public function getRequiredHandlePHIDsForCommitMessage() {
|
||||
return mpull($this->getValue(), 'getReviewerPHID');
|
||||
}
|
||||
|
||||
public function readValueFromCommitMessage($value) {
|
||||
$value = $this->inflateReviewers($value);
|
||||
|
||||
$reviewers = array();
|
||||
foreach ($value as $spec) {
|
||||
$phid = $spec['phid'];
|
||||
|
||||
$is_blocking = isset($spec['suffixes']['!']);
|
||||
if ($is_blocking) {
|
||||
$status = DifferentialReviewerStatus::STATUS_BLOCKING;
|
||||
} else {
|
||||
$status = DifferentialReviewerStatus::STATUS_ADDED;
|
||||
}
|
||||
|
||||
$reviewers[$phid] = $status;
|
||||
}
|
||||
|
||||
$this->updateReviewers(
|
||||
$this->getObject()->getReviewerStatus(),
|
||||
$reviewers);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function renderCommitMessageValue(array $handles) {
|
||||
$suffixes = array();
|
||||
|
||||
$status_blocking = DifferentialReviewerStatus::STATUS_BLOCKING;
|
||||
|
||||
foreach ($this->getValue() as $reviewer) {
|
||||
if ($reviewer->getStatus() == $status_blocking) {
|
||||
$phid = $reviewer->getReviewerPHID();
|
||||
$suffixes[$phid] = '!';
|
||||
}
|
||||
}
|
||||
|
||||
return $this->renderObjectList($handles, $suffixes);
|
||||
}
|
||||
|
||||
public function validateCommitMessageValue($value) {
|
||||
if (!$value) {
|
||||
return;
|
||||
}
|
||||
|
||||
$author_phid = $this->getObject()->getAuthorPHID();
|
||||
|
||||
$config_self_accept_key = 'differential.allow-self-accept';
|
||||
$allow_self_accept = PhabricatorEnv::getEnvConfig($config_self_accept_key);
|
||||
|
||||
$value = $this->inflateReviewers($value);
|
||||
foreach ($value as $spec) {
|
||||
$phid = $spec['phid'];
|
||||
|
||||
if (($phid == $author_phid) && !$allow_self_accept) {
|
||||
throw new DifferentialFieldValidationException(
|
||||
pht('The author of a revision can not be a reviewer.'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function getRequiredHandlePHIDsForRevisionHeaderWarnings() {
|
||||
return mpull($this->getValue(), 'getReviewerPHID');
|
||||
}
|
||||
|
@ -288,44 +89,4 @@ final class DifferentialReviewersField
|
|||
return $warnings;
|
||||
}
|
||||
|
||||
public function getProTips() {
|
||||
return array(
|
||||
pht(
|
||||
'You can mark a reviewer as blocking by adding an exclamation '.
|
||||
'mark ("!") after their name.'),
|
||||
);
|
||||
}
|
||||
|
||||
private function flattenReviewers(array $values) {
|
||||
// NOTE: For now, `arc` relies on this field returning only scalars, so we
|
||||
// need to reduce the results into scalars. See T10981.
|
||||
$result = array();
|
||||
|
||||
foreach ($values as $value) {
|
||||
$result[] = $value['phid'].implode('', array_keys($value['suffixes']));
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
private function inflateReviewers(array $values) {
|
||||
$result = array();
|
||||
|
||||
foreach ($values as $value) {
|
||||
if (substr($value, -1) == '!') {
|
||||
$value = substr($value, 0, -1);
|
||||
$suffixes = array('!' => '!');
|
||||
} else {
|
||||
$suffixes = array();
|
||||
}
|
||||
|
||||
$result[] = array(
|
||||
'phid' => $value,
|
||||
'suffixes' => $suffixes,
|
||||
);
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,93 +0,0 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialSubscribersField
|
||||
extends DifferentialCoreCustomField {
|
||||
|
||||
public function getFieldKey() {
|
||||
return 'differential:subscribers';
|
||||
}
|
||||
|
||||
public function getFieldKeyForConduit() {
|
||||
return 'ccPHIDs';
|
||||
}
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('Subscribers');
|
||||
}
|
||||
|
||||
public function getFieldDescription() {
|
||||
return pht('Manage subscribers.');
|
||||
}
|
||||
|
||||
protected function readValueFromRevision(
|
||||
DifferentialRevision $revision) {
|
||||
if (!$revision->getPHID()) {
|
||||
return array();
|
||||
}
|
||||
|
||||
return PhabricatorSubscribersQuery::loadSubscribersForPHID(
|
||||
$revision->getPHID());
|
||||
}
|
||||
|
||||
public function getNewValueForApplicationTransactions() {
|
||||
return array('=' => $this->getValue());
|
||||
}
|
||||
|
||||
public function readValueFromRequest(AphrontRequest $request) {
|
||||
$this->setValue($request->getArr($this->getFieldKey()));
|
||||
}
|
||||
|
||||
public function renderEditControl(array $handles) {
|
||||
return id(new AphrontFormTokenizerControl())
|
||||
->setUser($this->getViewer())
|
||||
->setName($this->getFieldKey())
|
||||
->setDatasource(new PhabricatorMetaMTAMailableDatasource())
|
||||
->setValue($this->getValue())
|
||||
->setError($this->getFieldError())
|
||||
->setLabel($this->getFieldName());
|
||||
}
|
||||
|
||||
public function getApplicationTransactionType() {
|
||||
return PhabricatorTransactions::TYPE_SUBSCRIBERS;
|
||||
}
|
||||
|
||||
public function shouldAppearInCommitMessage() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function shouldAllowEditInCommitMessage() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function shouldAppearInCommitMessageTemplate() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getCommitMessageLabels() {
|
||||
return array(
|
||||
'CC',
|
||||
'CCs',
|
||||
'Subscriber',
|
||||
'Subscribers',
|
||||
);
|
||||
}
|
||||
|
||||
public function parseValueFromCommitMessage($value) {
|
||||
return $this->parseObjectList(
|
||||
$value,
|
||||
array(
|
||||
PhabricatorPeopleUserPHIDType::TYPECONST,
|
||||
PhabricatorProjectProjectPHIDType::TYPECONST,
|
||||
PhabricatorOwnersPackagePHIDType::TYPECONST,
|
||||
));
|
||||
}
|
||||
|
||||
public function getRequiredHandlePHIDsForCommitMessage() {
|
||||
return $this->getValue();
|
||||
}
|
||||
|
||||
public function renderCommitMessageValue(array $handles) {
|
||||
return $this->renderObjectList($handles);
|
||||
}
|
||||
|
||||
}
|
|
@ -7,10 +7,6 @@ final class DifferentialSummaryField
|
|||
return 'differential:summary';
|
||||
}
|
||||
|
||||
public function getFieldKeyForConduit() {
|
||||
return 'summary';
|
||||
}
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('Summary');
|
||||
}
|
||||
|
@ -27,69 +23,6 @@ final class DifferentialSummaryField
|
|||
return $revision->getSummary();
|
||||
}
|
||||
|
||||
protected function writeValueToRevision(
|
||||
DifferentialRevision $revision,
|
||||
$value) {
|
||||
$revision->setSummary($value);
|
||||
}
|
||||
|
||||
public function readValueFromRequest(AphrontRequest $request) {
|
||||
$this->setValue($request->getStr($this->getFieldKey()));
|
||||
}
|
||||
|
||||
public function renderEditControl(array $handles) {
|
||||
return id(new PhabricatorRemarkupControl())
|
||||
->setUser($this->getViewer())
|
||||
->setName($this->getFieldKey())
|
||||
->setValue($this->getValue())
|
||||
->setError($this->getFieldError())
|
||||
->setLabel($this->getFieldName());
|
||||
}
|
||||
|
||||
public function getApplicationTransactionTitle(
|
||||
PhabricatorApplicationTransaction $xaction) {
|
||||
$author_phid = $xaction->getAuthorPHID();
|
||||
$old = $xaction->getOldValue();
|
||||
$new = $xaction->getNewValue();
|
||||
|
||||
return pht(
|
||||
'%s updated the summary for this revision.',
|
||||
$xaction->renderHandleLink($author_phid));
|
||||
}
|
||||
|
||||
public function getApplicationTransactionTitleForFeed(
|
||||
PhabricatorApplicationTransaction $xaction) {
|
||||
|
||||
$object_phid = $xaction->getObjectPHID();
|
||||
$author_phid = $xaction->getAuthorPHID();
|
||||
$old = $xaction->getOldValue();
|
||||
$new = $xaction->getNewValue();
|
||||
|
||||
return pht(
|
||||
'%s updated the summary for %s.',
|
||||
$xaction->renderHandleLink($author_phid),
|
||||
$xaction->renderHandleLink($object_phid));
|
||||
}
|
||||
|
||||
public function getApplicationTransactionHasChangeDetails(
|
||||
PhabricatorApplicationTransaction $xaction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getApplicationTransactionChangeDetails(
|
||||
PhabricatorApplicationTransaction $xaction,
|
||||
PhabricatorUser $viewer) {
|
||||
return $xaction->renderTextCorpusChangeDetails(
|
||||
$viewer,
|
||||
$xaction->getOldValue(),
|
||||
$xaction->getNewValue());
|
||||
}
|
||||
|
||||
public function shouldHideInApplicationTransactions(
|
||||
PhabricatorApplicationTransaction $xaction) {
|
||||
return ($xaction->getOldValue() === null);
|
||||
}
|
||||
|
||||
public function shouldAppearInGlobalSearch() {
|
||||
return true;
|
||||
}
|
||||
|
@ -125,23 +58,6 @@ final class DifferentialSummaryField
|
|||
return new PHUIRemarkupView($this->getViewer(), $this->getValue());
|
||||
}
|
||||
|
||||
public function getApplicationTransactionRemarkupBlocks(
|
||||
PhabricatorApplicationTransaction $xaction) {
|
||||
return array($xaction->getNewValue());
|
||||
}
|
||||
|
||||
public function shouldAppearInCommitMessage() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function shouldAppearInCommitMessageTemplate() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function shouldOverwriteWhenCommitMessageIsEdited() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function shouldAppearInTransactionMail() {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -7,10 +7,6 @@ final class DifferentialTestPlanField
|
|||
return 'differential:test-plan';
|
||||
}
|
||||
|
||||
public function getFieldKeyForConduit() {
|
||||
return 'testPlan';
|
||||
}
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('Test Plan');
|
||||
}
|
||||
|
@ -27,83 +23,10 @@ final class DifferentialTestPlanField
|
|||
return $revision->getTestPlan();
|
||||
}
|
||||
|
||||
protected function writeValueToRevision(
|
||||
DifferentialRevision $revision,
|
||||
$value) {
|
||||
$revision->setTestPlan($value);
|
||||
}
|
||||
|
||||
protected function isCoreFieldRequired() {
|
||||
return PhabricatorEnv::getEnvConfig('differential.require-test-plan-field');
|
||||
}
|
||||
|
||||
public function canDisableField() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function getCoreFieldRequiredErrorString() {
|
||||
return pht(
|
||||
'You must provide a test plan. Describe the actions you performed '.
|
||||
'to verify the behavior of this change.');
|
||||
}
|
||||
|
||||
public function readValueFromRequest(AphrontRequest $request) {
|
||||
$this->setValue($request->getStr($this->getFieldKey()));
|
||||
}
|
||||
|
||||
public function renderEditControl(array $handles) {
|
||||
return id(new PhabricatorRemarkupControl())
|
||||
->setUser($this->getViewer())
|
||||
->setName($this->getFieldKey())
|
||||
->setValue($this->getValue())
|
||||
->setError($this->getFieldError())
|
||||
->setLabel($this->getFieldName());
|
||||
}
|
||||
|
||||
public function getApplicationTransactionTitle(
|
||||
PhabricatorApplicationTransaction $xaction) {
|
||||
$author_phid = $xaction->getAuthorPHID();
|
||||
$old = $xaction->getOldValue();
|
||||
$new = $xaction->getNewValue();
|
||||
|
||||
return pht(
|
||||
'%s updated the test plan for this revision.',
|
||||
$xaction->renderHandleLink($author_phid));
|
||||
}
|
||||
|
||||
public function getApplicationTransactionTitleForFeed(
|
||||
PhabricatorApplicationTransaction $xaction) {
|
||||
|
||||
$object_phid = $xaction->getObjectPHID();
|
||||
$author_phid = $xaction->getAuthorPHID();
|
||||
$old = $xaction->getOldValue();
|
||||
$new = $xaction->getNewValue();
|
||||
|
||||
return pht(
|
||||
'%s updated the test plan for %s.',
|
||||
$xaction->renderHandleLink($author_phid),
|
||||
$xaction->renderHandleLink($object_phid));
|
||||
}
|
||||
|
||||
public function getApplicationTransactionHasChangeDetails(
|
||||
PhabricatorApplicationTransaction $xaction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getApplicationTransactionChangeDetails(
|
||||
PhabricatorApplicationTransaction $xaction,
|
||||
PhabricatorUser $viewer) {
|
||||
return $xaction->renderTextCorpusChangeDetails(
|
||||
$viewer,
|
||||
$xaction->getOldValue(),
|
||||
$xaction->getNewValue());
|
||||
}
|
||||
|
||||
public function shouldHideInApplicationTransactions(
|
||||
PhabricatorApplicationTransaction $xaction) {
|
||||
return ($xaction->getOldValue() === null);
|
||||
}
|
||||
|
||||
public function shouldAppearInGlobalSearch() {
|
||||
return true;
|
||||
}
|
||||
|
@ -139,39 +62,6 @@ final class DifferentialTestPlanField
|
|||
return new PHUIRemarkupView($this->getViewer(), $this->getValue());
|
||||
}
|
||||
|
||||
public function getApplicationTransactionRemarkupBlocks(
|
||||
PhabricatorApplicationTransaction $xaction) {
|
||||
return array($xaction->getNewValue());
|
||||
}
|
||||
|
||||
public function shouldAppearInCommitMessage() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function shouldAppearInCommitMessageTemplate() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function shouldOverwriteWhenCommitMessageIsEdited() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getCommitMessageLabels() {
|
||||
return array(
|
||||
'Test Plan',
|
||||
'Testplan',
|
||||
'Tested',
|
||||
'Tests',
|
||||
);
|
||||
}
|
||||
|
||||
public function validateCommitMessageValue($value) {
|
||||
if (!strlen($value) && $this->isCoreFieldRequired()) {
|
||||
throw new DifferentialFieldValidationException(
|
||||
$this->getCoreFieldRequiredErrorString());
|
||||
}
|
||||
}
|
||||
|
||||
public function shouldAppearInTransactionMail() {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1,125 +0,0 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialTitleField
|
||||
extends DifferentialCoreCustomField {
|
||||
|
||||
public function getFieldKey() {
|
||||
return 'differential:title';
|
||||
}
|
||||
|
||||
public function getFieldKeyForConduit() {
|
||||
return 'title';
|
||||
}
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('Title');
|
||||
}
|
||||
|
||||
public function getFieldDescription() {
|
||||
return pht('Stores the revision title.');
|
||||
}
|
||||
|
||||
public static function getDefaultTitle() {
|
||||
return pht('<<Replace this line with your Revision Title>>');
|
||||
}
|
||||
|
||||
protected function readValueFromRevision(
|
||||
DifferentialRevision $revision) {
|
||||
return $revision->getTitle();
|
||||
}
|
||||
|
||||
protected function writeValueToRevision(
|
||||
DifferentialRevision $revision,
|
||||
$value) {
|
||||
$revision->setTitle($value);
|
||||
}
|
||||
|
||||
protected function getCoreFieldRequiredErrorString() {
|
||||
return pht('You must choose a title for this revision.');
|
||||
}
|
||||
|
||||
public function readValueFromRequest(AphrontRequest $request) {
|
||||
$this->setValue($request->getStr($this->getFieldKey()));
|
||||
}
|
||||
|
||||
protected function isCoreFieldRequired() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function renderEditControl(array $handles) {
|
||||
return id(new AphrontFormTextAreaControl())
|
||||
->setHeight(AphrontFormTextAreaControl::HEIGHT_VERY_SHORT)
|
||||
->setName($this->getFieldKey())
|
||||
->setValue($this->getValue())
|
||||
->setError($this->getFieldError())
|
||||
->setLabel($this->getFieldName());
|
||||
}
|
||||
|
||||
public function getApplicationTransactionTitle(
|
||||
PhabricatorApplicationTransaction $xaction) {
|
||||
$author_phid = $xaction->getAuthorPHID();
|
||||
$old = $xaction->getOldValue();
|
||||
$new = $xaction->getNewValue();
|
||||
|
||||
if (strlen($old)) {
|
||||
return pht(
|
||||
'%s retitled this revision from "%s" to "%s".',
|
||||
$xaction->renderHandleLink($author_phid),
|
||||
$old,
|
||||
$new);
|
||||
} else {
|
||||
return pht(
|
||||
'%s created this revision.',
|
||||
$xaction->renderHandleLink($author_phid));
|
||||
}
|
||||
}
|
||||
|
||||
public function getApplicationTransactionTitleForFeed(
|
||||
PhabricatorApplicationTransaction $xaction) {
|
||||
|
||||
$object_phid = $xaction->getObjectPHID();
|
||||
$author_phid = $xaction->getAuthorPHID();
|
||||
$old = $xaction->getOldValue();
|
||||
$new = $xaction->getNewValue();
|
||||
|
||||
if (strlen($old)) {
|
||||
return pht(
|
||||
'%s retitled %s, from "%s" to "%s".',
|
||||
$xaction->renderHandleLink($author_phid),
|
||||
$xaction->renderHandleLink($object_phid),
|
||||
$old,
|
||||
$new);
|
||||
} else {
|
||||
return pht(
|
||||
'%s created %s.',
|
||||
$xaction->renderHandleLink($author_phid),
|
||||
$xaction->renderHandleLink($object_phid));
|
||||
}
|
||||
}
|
||||
|
||||
public function shouldAppearInCommitMessage() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function shouldOverwriteWhenCommitMessageIsEdited() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function validateCommitMessageValue($value) {
|
||||
if (!strlen($value)) {
|
||||
throw new DifferentialFieldValidationException(
|
||||
pht(
|
||||
'You must provide a revision title in the first line '.
|
||||
'of your commit message.'));
|
||||
}
|
||||
|
||||
if (preg_match('/^<<.*>>$/', $value)) {
|
||||
throw new DifferentialFieldValidationException(
|
||||
pht(
|
||||
'Replace the line "%s" with a human-readable revision title which '.
|
||||
'describes the changes you are making.',
|
||||
self::getDefaultTitle()));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialViewPolicyField
|
||||
extends DifferentialCoreCustomField {
|
||||
|
||||
public function getFieldKey() {
|
||||
return 'differential:view-policy';
|
||||
}
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('View Policy');
|
||||
}
|
||||
|
||||
public function getFieldDescription() {
|
||||
return pht('Controls visibility.');
|
||||
}
|
||||
|
||||
protected function readValueFromRevision(
|
||||
DifferentialRevision $revision) {
|
||||
return $revision->getViewPolicy();
|
||||
}
|
||||
|
||||
public function readValueFromRequest(AphrontRequest $request) {
|
||||
$this->setValue($request->getStr($this->getFieldKey()));
|
||||
}
|
||||
|
||||
public function renderEditControl(array $handles) {
|
||||
$viewer = $this->getViewer();
|
||||
$revision = $this->getObject();
|
||||
|
||||
$policies = id(new PhabricatorPolicyQuery())
|
||||
->setViewer($viewer)
|
||||
->setObject($revision)
|
||||
->execute();
|
||||
|
||||
return id(new AphrontFormPolicyControl())
|
||||
->setUser($viewer)
|
||||
->setCapability(PhabricatorPolicyCapability::CAN_VIEW)
|
||||
->setPolicyObject($revision)
|
||||
->setPolicies($policies)
|
||||
->setName($this->getFieldKey())
|
||||
->setValue($this->getValue())
|
||||
->setError($this->getFieldError());
|
||||
}
|
||||
|
||||
public function getApplicationTransactionType() {
|
||||
return PhabricatorTransactions::TYPE_VIEW_POLICY;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,222 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialRevisionEditEngine
|
||||
extends PhabricatorEditEngine {
|
||||
|
||||
private $diff;
|
||||
|
||||
const ENGINECONST = 'differential.revision';
|
||||
|
||||
const KEY_UPDATE = 'update';
|
||||
|
||||
public function getEngineName() {
|
||||
return pht('Revisions');
|
||||
}
|
||||
|
||||
public function getSummaryHeader() {
|
||||
return pht('Configure Revision Forms');
|
||||
}
|
||||
|
||||
public function getSummaryText() {
|
||||
return pht(
|
||||
'Configure creation and editing revision forms in Differential.');
|
||||
}
|
||||
|
||||
public function getEngineApplicationClass() {
|
||||
return 'PhabricatorDifferentialApplication';
|
||||
}
|
||||
|
||||
protected function supportsEditEngineConfiguration() {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function newEditableObject() {
|
||||
$viewer = $this->getViewer();
|
||||
return DifferentialRevision::initializeNewRevision($viewer);
|
||||
}
|
||||
|
||||
protected function newObjectQuery() {
|
||||
return id(new DifferentialRevisionQuery())
|
||||
->needActiveDiffs(true)
|
||||
->needReviewerStatus(true);
|
||||
}
|
||||
|
||||
protected function getObjectCreateTitleText($object) {
|
||||
return pht('Create New Revision');
|
||||
}
|
||||
|
||||
protected function getObjectEditTitleText($object) {
|
||||
$monogram = $object->getMonogram();
|
||||
$title = $object->getTitle();
|
||||
|
||||
$diff = $this->getDiff();
|
||||
if ($diff) {
|
||||
return pht('Update Revision %s: %s', $monogram, $title);
|
||||
} else {
|
||||
return pht('Edit Revision %s: %s', $monogram, $title);
|
||||
}
|
||||
}
|
||||
|
||||
protected function getObjectEditShortText($object) {
|
||||
return $object->getMonogram();
|
||||
}
|
||||
|
||||
protected function getObjectCreateShortText() {
|
||||
return pht('Create Revision');
|
||||
}
|
||||
|
||||
protected function getObjectName() {
|
||||
return pht('Revision');
|
||||
}
|
||||
|
||||
protected function getObjectViewURI($object) {
|
||||
return $object->getURI();
|
||||
}
|
||||
|
||||
public function setDiff(DifferentialDiff $diff) {
|
||||
$this->diff = $diff;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDiff() {
|
||||
return $this->diff;
|
||||
}
|
||||
|
||||
protected function buildCustomEditFields($object) {
|
||||
|
||||
$plan_required = PhabricatorEnv::getEnvConfig(
|
||||
'differential.require-test-plan-field');
|
||||
$plan_enabled = $this->isCustomFieldEnabled(
|
||||
$object,
|
||||
'differential:test-plan');
|
||||
|
||||
$diff = $this->getDiff();
|
||||
if ($diff) {
|
||||
$diff_phid = $diff->getPHID();
|
||||
} else {
|
||||
$diff_phid = null;
|
||||
}
|
||||
|
||||
$is_create = $this->getIsCreate();
|
||||
$is_update = ($diff && !$is_create);
|
||||
|
||||
$fields = array();
|
||||
|
||||
$fields[] = id(new PhabricatorHandlesEditField())
|
||||
->setKey(self::KEY_UPDATE)
|
||||
->setLabel(pht('Update Diff'))
|
||||
->setDescription(pht('New diff to create or update the revision with.'))
|
||||
->setConduitDescription(pht('Create or update a revision with a diff.'))
|
||||
->setConduitTypeDescription(pht('PHID of the diff.'))
|
||||
->setTransactionType(DifferentialTransaction::TYPE_UPDATE)
|
||||
->setHandleParameterType(new AphrontPHIDListHTTPParameterType())
|
||||
->setSingleValue($diff_phid)
|
||||
->setIsConduitOnly(!$diff)
|
||||
->setIsReorderable(false)
|
||||
->setIsDefaultable(false)
|
||||
->setIsInvisible(true)
|
||||
->setIsLockable(false);
|
||||
|
||||
if ($is_update) {
|
||||
$fields[] = id(new PhabricatorInstructionsEditField())
|
||||
->setKey('update.help')
|
||||
->setValue(pht('Describe the updates you have made to the diff.'));
|
||||
$fields[] = id(new PhabricatorCommentEditField())
|
||||
->setKey('update.comment')
|
||||
->setLabel(pht('Comment'))
|
||||
->setTransactionType(PhabricatorTransactions::TYPE_COMMENT)
|
||||
->setIsWebOnly(true)
|
||||
->setDescription(pht('Comments providing context for the update.'));
|
||||
$fields[] = id(new PhabricatorSubmitEditField())
|
||||
->setKey('update.submit')
|
||||
->setValue($this->getObjectEditButtonText($object));
|
||||
$fields[] = id(new PhabricatorDividerEditField())
|
||||
->setKey('update.note');
|
||||
}
|
||||
|
||||
$fields[] = id(new PhabricatorTextEditField())
|
||||
->setKey(DifferentialRevisionTitleTransaction::EDITKEY)
|
||||
->setLabel(pht('Title'))
|
||||
->setIsRequired(true)
|
||||
->setTransactionType(
|
||||
DifferentialRevisionTitleTransaction::TRANSACTIONTYPE)
|
||||
->setDescription(pht('The title of the revision.'))
|
||||
->setConduitDescription(pht('Retitle the revision.'))
|
||||
->setConduitTypeDescription(pht('New revision title.'))
|
||||
->setValue($object->getTitle());
|
||||
|
||||
$fields[] = id(new PhabricatorRemarkupEditField())
|
||||
->setKey(DifferentialRevisionSummaryTransaction::EDITKEY)
|
||||
->setLabel(pht('Summary'))
|
||||
->setTransactionType(
|
||||
DifferentialRevisionSummaryTransaction::TRANSACTIONTYPE)
|
||||
->setDescription(pht('The summary of the revision.'))
|
||||
->setConduitDescription(pht('Change the revision summary.'))
|
||||
->setConduitTypeDescription(pht('New revision summary.'))
|
||||
->setValue($object->getSummary());
|
||||
|
||||
if ($plan_enabled) {
|
||||
$fields[] = id(new PhabricatorRemarkupEditField())
|
||||
->setKey(DifferentialRevisionTestPlanTransaction::EDITKEY)
|
||||
->setLabel(pht('Test Plan'))
|
||||
->setIsRequired($plan_required)
|
||||
->setTransactionType(
|
||||
DifferentialRevisionTestPlanTransaction::TRANSACTIONTYPE)
|
||||
->setDescription(
|
||||
pht('Actions performed to verify the behavior of the change.'))
|
||||
->setConduitDescription(pht('Update the revision test plan.'))
|
||||
->setConduitTypeDescription(pht('New test plan.'))
|
||||
->setValue($object->getTestPlan());
|
||||
}
|
||||
|
||||
$fields[] = id(new PhabricatorDatasourceEditField())
|
||||
->setKey(DifferentialRevisionReviewersTransaction::EDITKEY)
|
||||
->setLabel(pht('Reviewers'))
|
||||
->setDatasource(new DifferentialReviewerDatasource())
|
||||
->setUseEdgeTransactions(true)
|
||||
->setTransactionType(
|
||||
DifferentialRevisionReviewersTransaction::TRANSACTIONTYPE)
|
||||
->setDescription(pht('Reviewers for this revision.'))
|
||||
->setConduitDescription(pht('Change the reviewers for this revision.'))
|
||||
->setConduitTypeDescription(pht('New reviewers.'))
|
||||
->setValue($object->getReviewerPHIDsForEdit());
|
||||
|
||||
$fields[] = id(new PhabricatorDatasourceEditField())
|
||||
->setKey('repositoryPHID')
|
||||
->setLabel(pht('Repository'))
|
||||
->setDatasource(new DiffusionRepositoryDatasource())
|
||||
->setTransactionType(
|
||||
DifferentialRevisionRepositoryTransaction::TRANSACTIONTYPE)
|
||||
->setDescription(pht('The repository the revision belongs to.'))
|
||||
->setConduitDescription(pht('Change the repository for this revision.'))
|
||||
->setConduitTypeDescription(pht('New repository.'))
|
||||
->setSingleValue($object->getRepositoryPHID());
|
||||
|
||||
// This is a little flimsy, but allows "Maniphest Tasks: ..." to continue
|
||||
// working properly in commit messages until we fully sort out T5873.
|
||||
$fields[] = id(new PhabricatorHandlesEditField())
|
||||
->setKey('tasks')
|
||||
->setUseEdgeTransactions(true)
|
||||
->setIsConduitOnly(true)
|
||||
->setTransactionType(PhabricatorTransactions::TYPE_EDGE)
|
||||
->setMetadataValue(
|
||||
'edge:type',
|
||||
DifferentialRevisionHasTaskEdgeType::EDGECONST)
|
||||
->setDescription(pht('Tasks associated with this revision.'))
|
||||
->setConduitDescription(pht('Change associated tasks.'))
|
||||
->setConduitTypeDescription(pht('List of tasks.'))
|
||||
->setValue(array());
|
||||
|
||||
return $fields;
|
||||
}
|
||||
|
||||
private function isCustomFieldEnabled(DifferentialRevision $revision, $key) {
|
||||
$field_list = PhabricatorCustomField::getObjectFields(
|
||||
$revision,
|
||||
PhabricatorCustomField::ROLE_VIEW);
|
||||
|
||||
$fields = $field_list->getFields();
|
||||
return isset($fields[$key]);
|
||||
}
|
||||
|
||||
}
|
|
@ -474,7 +474,7 @@ final class DifferentialTransactionEditor
|
|||
|
||||
$owner_phid = $object->getAuthorPHID();
|
||||
if ($owner_phid) {
|
||||
$reviewer = new DifferentialReviewer(
|
||||
$reviewer = new DifferentialReviewerProxy(
|
||||
$owner_phid,
|
||||
array(
|
||||
'status' => DifferentialReviewerStatus::STATUS_ADDED,
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialAuditorsCommitMessageField
|
||||
extends DifferentialCommitMessageCustomField {
|
||||
|
||||
const FIELDKEY = 'phabricator:auditors';
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('Auditors');
|
||||
}
|
||||
|
||||
public function parseFieldValue($value) {
|
||||
return $this->parseObjectList(
|
||||
$value,
|
||||
array(
|
||||
PhabricatorPeopleUserPHIDType::TYPECONST,
|
||||
PhabricatorProjectProjectPHIDType::TYPECONST,
|
||||
));
|
||||
}
|
||||
|
||||
public function getCustomFieldKey() {
|
||||
return 'phabricator:auditors';
|
||||
}
|
||||
|
||||
public function isFieldEditable() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isTemplateField() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function readFieldValueFromConduit($value) {
|
||||
return $this->readStringListFieldValueFromConduit($value);
|
||||
}
|
||||
|
||||
public function renderFieldValue($value) {
|
||||
return $this->renderHandleList($value);
|
||||
}
|
||||
|
||||
protected function readFieldValueFromCustomFieldStorage($value) {
|
||||
return $this->readJSONFieldValueFromCustomFieldStorage($value, array());
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialBlameRevisionCommitMessageField
|
||||
extends DifferentialCommitMessageCustomField {
|
||||
|
||||
const FIELDKEY = 'blameRevision';
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('Blame Revision');
|
||||
}
|
||||
|
||||
public function getFieldAliases() {
|
||||
return array(
|
||||
'Blame Rev',
|
||||
);
|
||||
}
|
||||
|
||||
public function getCustomFieldKey() {
|
||||
return 'phabricator:blame-revision';
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
<?php
|
||||
|
||||
abstract class DifferentialCommitMessageCustomField
|
||||
extends DifferentialCommitMessageField {
|
||||
|
||||
abstract public function getCustomFieldKey();
|
||||
|
||||
public function getFieldOrder() {
|
||||
$custom_key = $this->getCustomFieldKey();
|
||||
return 100000 + $this->getCustomFieldOrder($custom_key);
|
||||
}
|
||||
|
||||
public function isFieldEnabled() {
|
||||
$custom_key = $this->getCustomFieldKey();
|
||||
return $this->isCustomFieldEnabled($custom_key);
|
||||
}
|
||||
|
||||
public function readFieldValueFromObject(DifferentialRevision $revision) {
|
||||
$custom_key = $this->getCustomFieldKey();
|
||||
$value = $this->readCustomFieldValue($revision, $custom_key);
|
||||
return $value;
|
||||
}
|
||||
|
||||
protected function readFieldValueFromCustomFieldStorage($value) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
protected function readJSONFieldValueFromCustomFieldStorage(
|
||||
$value,
|
||||
$default) {
|
||||
try {
|
||||
return phutil_json_decode($value);
|
||||
} catch (PhutilJSONParserException $ex) {
|
||||
return $default;
|
||||
}
|
||||
}
|
||||
|
||||
protected function readCustomFieldValue(
|
||||
DifferentialRevision $revision,
|
||||
$key) {
|
||||
$value = idx($this->getCustomFieldStorage(), $key);
|
||||
return $this->readFieldValueFromCustomFieldStorage($value);
|
||||
}
|
||||
|
||||
protected function getCustomFieldOrder($key) {
|
||||
$field_list = PhabricatorCustomField::getObjectFields(
|
||||
new DifferentialRevision(),
|
||||
DifferentialCustomField::ROLE_COMMITMESSAGE);
|
||||
|
||||
$fields = $field_list->getFields();
|
||||
|
||||
$idx = 0;
|
||||
foreach ($fields as $field_key => $value) {
|
||||
if ($key === $field_key) {
|
||||
return $idx;
|
||||
}
|
||||
$idx++;
|
||||
}
|
||||
|
||||
return $idx;
|
||||
}
|
||||
|
||||
public function getFieldTransactions($value) {
|
||||
return array(
|
||||
array(
|
||||
'type' => $this->getCommitMessageFieldKey(),
|
||||
'value' => $value,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,191 @@
|
|||
<?php
|
||||
|
||||
abstract class DifferentialCommitMessageField
|
||||
extends Phobject {
|
||||
|
||||
private $viewer;
|
||||
private $customFieldStorage;
|
||||
|
||||
final public function setViewer(PhabricatorUser $viewer) {
|
||||
$this->viewer = $viewer;
|
||||
return $this;
|
||||
}
|
||||
|
||||
final public function getViewer() {
|
||||
return $this->viewer;
|
||||
}
|
||||
|
||||
final public function setCustomFieldStorage(array $custom_field_storage) {
|
||||
$this->customFieldStorage = $custom_field_storage;
|
||||
return $this;
|
||||
}
|
||||
|
||||
final public function getCustomFieldStorage() {
|
||||
return $this->customFieldStorage;
|
||||
}
|
||||
|
||||
abstract public function getFieldName();
|
||||
abstract public function getFieldOrder();
|
||||
|
||||
public function isFieldEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getFieldAliases() {
|
||||
return array();
|
||||
}
|
||||
|
||||
public function validateFieldValue($value) {
|
||||
return;
|
||||
}
|
||||
|
||||
public function parseFieldValue($value) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
public function isFieldEditable() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isTemplateField() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function readFieldValueFromConduit($value) {
|
||||
return $this->readStringFieldValueFromConduit($value);
|
||||
}
|
||||
|
||||
public function readFieldValueFromObject(DifferentialRevision $revision) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public function renderFieldValue($value) {
|
||||
if (!strlen($value)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
public function getFieldTransactions($value) {
|
||||
if (!$this->isFieldEditable()) {
|
||||
return array();
|
||||
}
|
||||
throw new PhutilMethodNotImplementedException();
|
||||
}
|
||||
|
||||
final public function getCommitMessageFieldKey() {
|
||||
return $this->getPhobjectClassConstant('FIELDKEY', 64);
|
||||
}
|
||||
|
||||
final public static function newEnabledFields(PhabricatorUser $viewer) {
|
||||
$fields = self::getAllFields();
|
||||
|
||||
$results = array();
|
||||
foreach ($fields as $key => $field) {
|
||||
$field = clone $field;
|
||||
$field->setViewer($viewer);
|
||||
if ($field->isFieldEnabled()) {
|
||||
$results[$key] = $field;
|
||||
}
|
||||
}
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
final public static function getAllFields() {
|
||||
return id(new PhutilClassMapQuery())
|
||||
->setAncestorClass(__CLASS__)
|
||||
->setUniqueMethod('getCommitMessageFieldKey')
|
||||
->setSortMethod('getFieldOrder')
|
||||
->execute();
|
||||
}
|
||||
|
||||
protected function raiseParseException($message) {
|
||||
throw new DifferentialFieldParseException($message);
|
||||
}
|
||||
|
||||
protected function raiseValidationException($message) {
|
||||
throw new DifferentialFieldValidationException($message);
|
||||
}
|
||||
|
||||
protected function parseObjectList(
|
||||
$value,
|
||||
array $types,
|
||||
$allow_partial = false,
|
||||
array $suffixes = array()) {
|
||||
return id(new PhabricatorObjectListQuery())
|
||||
->setViewer($this->getViewer())
|
||||
->setAllowedTypes($types)
|
||||
->setObjectList($value)
|
||||
->setAllowPartialResults($allow_partial)
|
||||
->setSuffixes($suffixes)
|
||||
->execute();
|
||||
}
|
||||
|
||||
protected function renderHandleList(array $phids, array $suffixes = array()) {
|
||||
if (!$phids) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$handles = $this->getViewer()->loadHandles($phids);
|
||||
|
||||
$out = array();
|
||||
foreach ($handles as $handle) {
|
||||
$phid = $handle->getPHID();
|
||||
|
||||
if ($handle->getPolicyFiltered()) {
|
||||
$token = $phid;
|
||||
} else if ($handle->isComplete()) {
|
||||
$token = $handle->getCommandLineObjectName();
|
||||
}
|
||||
|
||||
$suffix = idx($suffixes, $phid);
|
||||
$token = $token.$suffix;
|
||||
|
||||
$out[] = $token;
|
||||
}
|
||||
|
||||
return implode(', ', $out);
|
||||
}
|
||||
|
||||
protected function readStringFieldValueFromConduit($value) {
|
||||
if ($value === null) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
if (!is_string($value)) {
|
||||
throw new Exception(
|
||||
pht(
|
||||
'Field "%s" expects a string value, but received a value of type '.
|
||||
'"%s".',
|
||||
$this->getCommitMessageFieldKey(),
|
||||
gettype($value)));
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
protected function readStringListFieldValueFromConduit($value) {
|
||||
if (!is_array($value)) {
|
||||
throw new Exception(
|
||||
pht(
|
||||
'Field "%s" expects a list of strings, but received a value of type '.
|
||||
'"%s".',
|
||||
$this->getCommitMessageFieldKey(),
|
||||
gettype($value)));
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
protected function isCustomFieldEnabled($key) {
|
||||
$field_list = PhabricatorCustomField::getObjectFields(
|
||||
new DifferentialRevision(),
|
||||
DifferentialCustomField::ROLE_DEFAULT);
|
||||
|
||||
$fields = $field_list->getFields();
|
||||
return isset($fields[$key]);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialConflictsCommitMessageField
|
||||
extends DifferentialCommitMessageField {
|
||||
|
||||
const FIELDKEY = 'conflicts';
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('Conflicts');
|
||||
}
|
||||
|
||||
public function getFieldOrder() {
|
||||
return 900000;
|
||||
}
|
||||
|
||||
public function isFieldEditable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function isTemplateField() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialGitSVNIDCommitMessageField
|
||||
extends DifferentialCommitMessageField {
|
||||
|
||||
const FIELDKEY = 'gitSVNID';
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('git-svn-id');
|
||||
}
|
||||
|
||||
public function getFieldOrder() {
|
||||
return 900001;
|
||||
}
|
||||
|
||||
public function isFieldEditable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function isTemplateField() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialJIRAIssuesCommitMessageField
|
||||
extends DifferentialCommitMessageCustomField {
|
||||
|
||||
const FIELDKEY = 'jira.issues';
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('JIRA Issues');
|
||||
}
|
||||
|
||||
public function getFieldAliases() {
|
||||
return array(
|
||||
'JIRA',
|
||||
'JIRA Issue',
|
||||
);
|
||||
}
|
||||
|
||||
public function getCustomFieldKey() {
|
||||
return 'phabricator:jira-issues';
|
||||
}
|
||||
|
||||
public function parseFieldValue($value) {
|
||||
return preg_split('/[\s,]+/', $value, $limit = -1, PREG_SPLIT_NO_EMPTY);
|
||||
}
|
||||
|
||||
protected function readFieldValueFromCustomFieldStorage($value) {
|
||||
return $this->readJSONFieldValueFromCustomFieldStorage($value, array());
|
||||
}
|
||||
|
||||
public function readFieldValueFromConduit($value) {
|
||||
return $this->readStringListFieldValueFromConduit($value);
|
||||
}
|
||||
|
||||
public function renderFieldValue($value) {
|
||||
if (!$value) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return implode(', ', $value);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialRevertPlanCommitMessageField
|
||||
extends DifferentialCommitMessageCustomField {
|
||||
|
||||
const FIELDKEY = 'revertPlan';
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('Revert Plan');
|
||||
}
|
||||
|
||||
public function getCustomFieldKey() {
|
||||
return 'phabricator:revert-plan';
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialReviewedByCommitMessageField
|
||||
extends DifferentialCommitMessageField {
|
||||
|
||||
const FIELDKEY = 'reviewedByPHIDs';
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('Reviewed By');
|
||||
}
|
||||
|
||||
public function getFieldOrder() {
|
||||
return 5000;
|
||||
}
|
||||
|
||||
public function parseFieldValue($value) {
|
||||
return $this->parseObjectList(
|
||||
$value,
|
||||
array(
|
||||
PhabricatorPeopleUserPHIDType::TYPECONST,
|
||||
PhabricatorProjectProjectPHIDType::TYPECONST,
|
||||
),
|
||||
$allow_partial = true);
|
||||
}
|
||||
|
||||
public function isFieldEditable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function isTemplateField() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function readFieldValueFromObject(DifferentialRevision $revision) {
|
||||
if (!$revision->getPHID()) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$phids = array();
|
||||
foreach ($revision->getReviewerStatus() as $reviewer) {
|
||||
switch ($reviewer->getStatus()) {
|
||||
case DifferentialReviewerStatus::STATUS_ACCEPTED:
|
||||
case DifferentialReviewerStatus::STATUS_ACCEPTED_OLDER:
|
||||
$phids[] = $reviewer->getReviewerPHID();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return $phids;
|
||||
}
|
||||
|
||||
public function readFieldValueFromConduit($value) {
|
||||
return $this->readStringListFieldValueFromConduit($value);
|
||||
}
|
||||
|
||||
public function renderFieldValue($value) {
|
||||
return $this->renderHandleList($value);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,136 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialReviewersCommitMessageField
|
||||
extends DifferentialCommitMessageField {
|
||||
|
||||
const FIELDKEY = 'reviewerPHIDs';
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('Reviewers');
|
||||
}
|
||||
|
||||
public function getFieldOrder() {
|
||||
return 4000;
|
||||
}
|
||||
|
||||
public function getFieldAliases() {
|
||||
return array(
|
||||
'Reviewer',
|
||||
);
|
||||
}
|
||||
|
||||
public function parseFieldValue($value) {
|
||||
$results = $this->parseObjectList(
|
||||
$value,
|
||||
array(
|
||||
PhabricatorPeopleUserPHIDType::TYPECONST,
|
||||
PhabricatorProjectProjectPHIDType::TYPECONST,
|
||||
PhabricatorOwnersPackagePHIDType::TYPECONST,
|
||||
),
|
||||
false,
|
||||
array('!'));
|
||||
|
||||
return $this->flattenReviewers($results);
|
||||
}
|
||||
|
||||
public function readFieldValueFromConduit($value) {
|
||||
return $this->readStringListFieldValueFromConduit($value);
|
||||
}
|
||||
|
||||
public function readFieldValueFromObject(DifferentialRevision $revision) {
|
||||
if (!$revision->getPHID()) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$status_blocking = DifferentialReviewerStatus::STATUS_BLOCKING;
|
||||
|
||||
$results = array();
|
||||
foreach ($revision->getReviewerStatus() as $reviewer) {
|
||||
if ($reviewer->getStatus() == $status_blocking) {
|
||||
$suffixes = array('!' => '!');
|
||||
} else {
|
||||
$suffixes = array();
|
||||
}
|
||||
|
||||
$results[] = array(
|
||||
'phid' => $reviewer->getReviewerPHID(),
|
||||
'suffixes' => $suffixes,
|
||||
);
|
||||
}
|
||||
|
||||
return $this->flattenReviewers($results);
|
||||
}
|
||||
|
||||
public function renderFieldValue($value) {
|
||||
$value = $this->inflateReviewers($value);
|
||||
|
||||
$phid_list = array();
|
||||
$suffix_map = array();
|
||||
foreach ($value as $reviewer) {
|
||||
$phid = $reviewer['phid'];
|
||||
$phid_list[] = $phid;
|
||||
if (isset($reviewer['suffixes']['!'])) {
|
||||
$suffix_map[$phid] = '!';
|
||||
}
|
||||
}
|
||||
|
||||
return $this->renderHandleList($phid_list, $suffix_map);
|
||||
}
|
||||
|
||||
public function getFieldTransactions($value) {
|
||||
$value = $this->inflateReviewers($value);
|
||||
|
||||
$reviewer_list = array();
|
||||
foreach ($value as $reviewer) {
|
||||
$phid = $reviewer['phid'];
|
||||
if (isset($reviewer['suffixes']['!'])) {
|
||||
$reviewer_list[] = 'blocking('.$phid.')';
|
||||
} else {
|
||||
$reviewer_list[] = $phid;
|
||||
}
|
||||
}
|
||||
|
||||
$xaction_key = DifferentialRevisionReviewersTransaction::EDITKEY;
|
||||
$xaction_type = "{$xaction_key}.set";
|
||||
|
||||
return array(
|
||||
array(
|
||||
'type' => $xaction_type,
|
||||
'value' => $reviewer_list,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
private function flattenReviewers(array $values) {
|
||||
// NOTE: For now, `arc` relies on this field returning only scalars, so we
|
||||
// need to reduce the results into scalars. See T10981.
|
||||
$result = array();
|
||||
|
||||
foreach ($values as $value) {
|
||||
$result[] = $value['phid'].implode('', array_keys($value['suffixes']));
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
private function inflateReviewers(array $values) {
|
||||
$result = array();
|
||||
|
||||
foreach ($values as $value) {
|
||||
if (substr($value, -1) == '!') {
|
||||
$value = substr($value, 0, -1);
|
||||
$suffixes = array('!' => '!');
|
||||
} else {
|
||||
$suffixes = array();
|
||||
}
|
||||
|
||||
$result[] = array(
|
||||
'phid' => $value,
|
||||
'suffixes' => $suffixes,
|
||||
);
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,36 +1,23 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialRevisionIDField
|
||||
extends DifferentialCustomField {
|
||||
final class DifferentialRevisionIDCommitMessageField
|
||||
extends DifferentialCommitMessageField {
|
||||
|
||||
private $revisionID;
|
||||
|
||||
public function getFieldKey() {
|
||||
return 'differential:revision-id';
|
||||
}
|
||||
|
||||
public function getFieldKeyForConduit() {
|
||||
return 'revisionID';
|
||||
}
|
||||
const FIELDKEY = 'revisionID';
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('Differential Revision');
|
||||
}
|
||||
|
||||
public function getFieldDescription() {
|
||||
return pht(
|
||||
'Ties commits to revisions and provides a permanent link between them.');
|
||||
public function getFieldOrder() {
|
||||
return 200000;
|
||||
}
|
||||
|
||||
public function canDisableField() {
|
||||
public function isTemplateField() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function shouldAppearInCommitMessage() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function parseValueFromCommitMessage($value) {
|
||||
public function parseFieldValue($value) {
|
||||
// If the value is just "D123" or similar, parse the ID from it directly.
|
||||
$value = trim($value);
|
||||
$matches = null;
|
||||
|
@ -42,18 +29,6 @@ final class DifferentialRevisionIDField
|
|||
return self::parseRevisionIDFromURI($value);
|
||||
}
|
||||
|
||||
public function renderCommitMessageValue(array $handles) {
|
||||
$id = coalesce($this->revisionID, $this->getObject()->getID());
|
||||
if (!$id) {
|
||||
return null;
|
||||
}
|
||||
return PhabricatorEnv::getProductionURI('/D'.$id);
|
||||
}
|
||||
|
||||
public function readValueFromCommitMessage($value) {
|
||||
$this->revisionID = $value;
|
||||
}
|
||||
|
||||
private static function parseRevisionIDFromURI($uri_string) {
|
||||
$uri = new PhutilURI($uri_string);
|
||||
$path = $uri->getPath();
|
||||
|
@ -82,4 +57,27 @@ final class DifferentialRevisionIDField
|
|||
return null;
|
||||
}
|
||||
|
||||
public function readFieldValueFromObject(DifferentialRevision $revision) {
|
||||
return $revision->getID();
|
||||
}
|
||||
|
||||
public function readFieldValueFromConduit($value) {
|
||||
if (is_int($value)) {
|
||||
$value = (string)$value;
|
||||
}
|
||||
return $this->readStringFieldValueFromConduit($value);
|
||||
}
|
||||
|
||||
public function renderFieldValue($value) {
|
||||
if (!strlen($value)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return PhabricatorEnv::getProductionURI('/D'.$value);
|
||||
}
|
||||
|
||||
public function getFieldTransactions($value) {
|
||||
return array();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialSubscribersCommitMessageField
|
||||
extends DifferentialCommitMessageField {
|
||||
|
||||
const FIELDKEY = 'ccPHIDs';
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('Subscribers');
|
||||
}
|
||||
|
||||
public function getFieldOrder() {
|
||||
return 6000;
|
||||
}
|
||||
|
||||
public function getFieldAliases() {
|
||||
return array(
|
||||
'CC',
|
||||
'CCs',
|
||||
'Subscriber',
|
||||
);
|
||||
}
|
||||
|
||||
public function parseFieldValue($value) {
|
||||
return $this->parseObjectList(
|
||||
$value,
|
||||
array(
|
||||
PhabricatorPeopleUserPHIDType::TYPECONST,
|
||||
PhabricatorProjectProjectPHIDType::TYPECONST,
|
||||
PhabricatorOwnersPackagePHIDType::TYPECONST,
|
||||
));
|
||||
}
|
||||
|
||||
public function readFieldValueFromObject(DifferentialRevision $revision) {
|
||||
if (!$revision->getPHID()) {
|
||||
return array();
|
||||
}
|
||||
|
||||
return PhabricatorSubscribersQuery::loadSubscribersForPHID(
|
||||
$revision->getPHID());
|
||||
}
|
||||
|
||||
public function readFieldValueFromConduit($value) {
|
||||
return $this->readStringListFieldValueFromConduit($value);
|
||||
}
|
||||
|
||||
public function renderFieldValue($value) {
|
||||
return $this->renderHandleList($value);
|
||||
}
|
||||
|
||||
public function getFieldTransactions($value) {
|
||||
return array(
|
||||
array(
|
||||
'type' => PhabricatorSubscriptionsEditEngineExtension::EDITKEY_SET,
|
||||
'value' => $value,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialSummaryCommitMessageField
|
||||
extends DifferentialCommitMessageField {
|
||||
|
||||
const FIELDKEY = 'summary';
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('Summary');
|
||||
}
|
||||
|
||||
public function getFieldOrder() {
|
||||
return 2000;
|
||||
}
|
||||
|
||||
public function readFieldValueFromObject(DifferentialRevision $revision) {
|
||||
return $revision->getSummary();
|
||||
}
|
||||
|
||||
public function getFieldTransactions($value) {
|
||||
return array(
|
||||
array(
|
||||
'type' => DifferentialRevisionSummaryTransaction::EDITKEY,
|
||||
'value' => $value,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialTagsCommitMessageField
|
||||
extends DifferentialCommitMessageField {
|
||||
|
||||
const FIELDKEY = 'phabricator:projects';
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('Tags');
|
||||
}
|
||||
|
||||
public function getFieldOrder() {
|
||||
return 7000;
|
||||
}
|
||||
|
||||
public function getFieldAliases() {
|
||||
return array(
|
||||
'Tag',
|
||||
'Project',
|
||||
'Projects',
|
||||
);
|
||||
}
|
||||
|
||||
public function isTemplateField() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function parseFieldValue($value) {
|
||||
return $this->parseObjectList(
|
||||
$value,
|
||||
array(
|
||||
PhabricatorProjectProjectPHIDType::TYPECONST,
|
||||
));
|
||||
}
|
||||
|
||||
public function readFieldValueFromObject(DifferentialRevision $revision) {
|
||||
if (!$revision->getPHID()) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$projects = PhabricatorEdgeQuery::loadDestinationPHIDs(
|
||||
$revision->getPHID(),
|
||||
PhabricatorProjectObjectHasProjectEdgeType::EDGECONST);
|
||||
$projects = array_reverse($projects);
|
||||
|
||||
return $projects;
|
||||
}
|
||||
|
||||
public function readFieldValueFromConduit($value) {
|
||||
return $this->readStringListFieldValueFromConduit($value);
|
||||
}
|
||||
|
||||
public function renderFieldValue($value) {
|
||||
return $this->renderHandleList($value);
|
||||
}
|
||||
|
||||
public function getFieldTransactions($value) {
|
||||
return array(
|
||||
array(
|
||||
'type' => PhabricatorProjectsEditEngineExtension::EDITKEY_SET,
|
||||
'value' => $value,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialTasksCommitMessageField
|
||||
extends DifferentialCommitMessageField {
|
||||
|
||||
const FIELDKEY = 'maniphestTaskPHIDs';
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('Maniphest Tasks');
|
||||
}
|
||||
|
||||
public function getFieldOrder() {
|
||||
return 8000;
|
||||
}
|
||||
|
||||
public function getFieldAliases() {
|
||||
return array(
|
||||
'Task',
|
||||
'Tasks',
|
||||
'Maniphest Task',
|
||||
);
|
||||
}
|
||||
|
||||
public function isTemplateField() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function parseFieldValue($value) {
|
||||
return $this->parseObjectList(
|
||||
$value,
|
||||
array(
|
||||
ManiphestTaskPHIDType::TYPECONST,
|
||||
));
|
||||
}
|
||||
|
||||
public function readFieldValueFromObject(DifferentialRevision $revision) {
|
||||
if (!$revision->getPHID()) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$projects = PhabricatorEdgeQuery::loadDestinationPHIDs(
|
||||
$revision->getPHID(),
|
||||
DifferentialRevisionHasTaskEdgeType::EDGECONST);
|
||||
$projects = array_reverse($projects);
|
||||
|
||||
return $projects;
|
||||
}
|
||||
|
||||
public function readFieldValueFromConduit($value) {
|
||||
return $this->readStringListFieldValueFromConduit($value);
|
||||
}
|
||||
|
||||
public function renderFieldValue($value) {
|
||||
return $this->renderHandleList($value);
|
||||
}
|
||||
|
||||
public function getFieldTransactions($value) {
|
||||
return array(
|
||||
array(
|
||||
'type' => 'tasks.set',
|
||||
'value' => $value,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialTestPlanCommitMessageField
|
||||
extends DifferentialCommitMessageField {
|
||||
|
||||
const FIELDKEY = 'testPlan';
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('Test Plan');
|
||||
}
|
||||
|
||||
public function getFieldOrder() {
|
||||
return 3000;
|
||||
}
|
||||
|
||||
public function getFieldAliases() {
|
||||
return array(
|
||||
'Testplan',
|
||||
'Tested',
|
||||
'Tests',
|
||||
);
|
||||
}
|
||||
|
||||
public function isFieldEnabled() {
|
||||
return $this->isCustomFieldEnabled('differential:test-plan');
|
||||
}
|
||||
|
||||
public function validateFieldValue($value) {
|
||||
$is_required = PhabricatorEnv::getEnvConfig(
|
||||
'differential.require-test-plan-field');
|
||||
|
||||
if ($is_required && !strlen($value)) {
|
||||
$this->raiseValidationException(
|
||||
pht(
|
||||
'You must provide a test plan. Describe the actions you performed '.
|
||||
'to verify the behavior of this change.'));
|
||||
}
|
||||
}
|
||||
|
||||
public function readFieldValueFromObject(DifferentialRevision $revision) {
|
||||
return $revision->getTestPlan();
|
||||
}
|
||||
|
||||
public function getFieldTransactions($value) {
|
||||
return array(
|
||||
array(
|
||||
'type' => DifferentialRevisionTestPlanTransaction::EDITKEY,
|
||||
'value' => $value,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialTitleCommitMessageField
|
||||
extends DifferentialCommitMessageField {
|
||||
|
||||
const FIELDKEY = 'title';
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('Title');
|
||||
}
|
||||
|
||||
public function getFieldOrder() {
|
||||
return 1000;
|
||||
}
|
||||
|
||||
public static function getDefaultTitle() {
|
||||
return pht('<<Replace this line with your revision title>');
|
||||
}
|
||||
|
||||
public function parseFieldValue($value) {
|
||||
if ($value === self::getDefaultTitle()) {
|
||||
$this->raiseParseException(
|
||||
pht(
|
||||
'Replace the default title line with a human-readable revision '.
|
||||
'title which describes the changes you are making.'));
|
||||
}
|
||||
|
||||
return parent::parseFieldValue($value);
|
||||
}
|
||||
|
||||
public function validateFieldValue($value) {
|
||||
if (!strlen($value)) {
|
||||
$this->raiseValidationException(
|
||||
pht(
|
||||
'You must provide a revision title in the first line '.
|
||||
'of your commit message.'));
|
||||
}
|
||||
}
|
||||
|
||||
public function readFieldValueFromObject(DifferentialRevision $revision) {
|
||||
$value = $revision->getTitle();
|
||||
|
||||
if (!strlen($value)) {
|
||||
return self::getDefaultTitle();
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
public function getFieldTransactions($value) {
|
||||
return array(
|
||||
array(
|
||||
'type' => DifferentialRevisionTitleTransaction::EDITKEY,
|
||||
'value' => $value,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,60 +0,0 @@
|
|||
<?php
|
||||
|
||||
final class PhabricatorHunksManagementMigrateWorkflow
|
||||
extends PhabricatorHunksManagementWorkflow {
|
||||
|
||||
protected function didConstruct() {
|
||||
$this
|
||||
->setName('migrate')
|
||||
->setExamples('**migrate**')
|
||||
->setSynopsis(pht('Migrate hunks to modern storage.'))
|
||||
->setArguments(array());
|
||||
}
|
||||
|
||||
public function execute(PhutilArgumentParser $args) {
|
||||
$saw_any_rows = false;
|
||||
$console = PhutilConsole::getConsole();
|
||||
|
||||
$table = new DifferentialLegacyHunk();
|
||||
foreach (new LiskMigrationIterator($table) as $hunk) {
|
||||
$saw_any_rows = true;
|
||||
|
||||
$id = $hunk->getID();
|
||||
$console->writeOut("%s\n", pht('Migrating hunk %d...', $id));
|
||||
|
||||
$new_hunk = id(new DifferentialModernHunk())
|
||||
->setChangesetID($hunk->getChangesetID())
|
||||
->setOldOffset($hunk->getOldOffset())
|
||||
->setOldLen($hunk->getOldLen())
|
||||
->setNewOffset($hunk->getNewOffset())
|
||||
->setNewLen($hunk->getNewLen())
|
||||
->setChanges($hunk->getChanges())
|
||||
->setDateCreated($hunk->getDateCreated())
|
||||
->setDateModified($hunk->getDateModified());
|
||||
|
||||
$hunk->openTransaction();
|
||||
$new_hunk->save();
|
||||
$hunk->delete();
|
||||
$hunk->saveTransaction();
|
||||
|
||||
$old_len = strlen($hunk->getChanges());
|
||||
$new_len = strlen($new_hunk->getData());
|
||||
if ($old_len) {
|
||||
$diff_len = ($old_len - $new_len);
|
||||
$console->writeOut(
|
||||
"%s\n",
|
||||
pht(
|
||||
'Saved %s bytes (%s).',
|
||||
new PhutilNumber($diff_len),
|
||||
sprintf('%.1f%%', 100 * ($diff_len / $old_len))));
|
||||
}
|
||||
}
|
||||
|
||||
if ($saw_any_rows) {
|
||||
$console->writeOut("%s\n", pht('Done.'));
|
||||
} else {
|
||||
$console->writeOut("%s\n", pht('No rows to migrate.'));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
<?php
|
||||
|
||||
abstract class PhabricatorHunksManagementWorkflow
|
||||
extends PhabricatorManagementWorkflow {}
|
|
@ -21,46 +21,23 @@
|
|||
*/
|
||||
final class DifferentialCommitMessageParser extends Phobject {
|
||||
|
||||
private $viewer;
|
||||
private $labelMap;
|
||||
private $titleKey;
|
||||
private $summaryKey;
|
||||
private $errors;
|
||||
|
||||
private $commitMessageFields;
|
||||
private $raiseMissingFieldErrors = true;
|
||||
|
||||
public static function newStandardParser(PhabricatorUser $viewer) {
|
||||
$key_title = DifferentialTitleCommitMessageField::FIELDKEY;
|
||||
$key_summary = DifferentialSummaryCommitMessageField::FIELDKEY;
|
||||
|
||||
$key_title = id(new DifferentialTitleField())->getFieldKeyForConduit();
|
||||
$key_summary = id(new DifferentialSummaryField())->getFieldKeyForConduit();
|
||||
|
||||
$field_list = PhabricatorCustomField::getObjectFields(
|
||||
new DifferentialRevision(),
|
||||
DifferentialCustomField::ROLE_COMMITMESSAGE);
|
||||
$field_list->setViewer($viewer);
|
||||
|
||||
$label_map = array();
|
||||
|
||||
foreach ($field_list->getFields() as $field) {
|
||||
$labels = $field->getCommitMessageLabels();
|
||||
$key = $field->getFieldKeyForConduit();
|
||||
|
||||
foreach ($labels as $label) {
|
||||
$normal_label = self::normalizeFieldLabel(
|
||||
$label);
|
||||
if (!empty($label_map[$normal_label])) {
|
||||
throw new Exception(
|
||||
pht(
|
||||
'Field label "%s" is parsed by two custom fields: "%s" and '.
|
||||
'"%s". Each label must be parsed by only one field.',
|
||||
$label,
|
||||
$key,
|
||||
$label_map[$normal_label]));
|
||||
}
|
||||
$label_map[$normal_label] = $key;
|
||||
}
|
||||
}
|
||||
$field_list = DifferentialCommitMessageField::newEnabledFields($viewer);
|
||||
|
||||
return id(new self())
|
||||
->setLabelMap($label_map)
|
||||
->setViewer($viewer)
|
||||
->setCommitMessageFields($field_list)
|
||||
->setTitleKey($key_title)
|
||||
->setSummaryKey($key_summary);
|
||||
}
|
||||
|
@ -69,6 +46,59 @@ final class DifferentialCommitMessageParser extends Phobject {
|
|||
/* -( Configuring the Parser )--------------------------------------------- */
|
||||
|
||||
|
||||
/**
|
||||
* @task config
|
||||
*/
|
||||
public function setViewer(PhabricatorUser $viewer) {
|
||||
$this->viewer = $viewer;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @task config
|
||||
*/
|
||||
public function getViewer() {
|
||||
return $this->viewer;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @task config
|
||||
*/
|
||||
public function setCommitMessageFields($fields) {
|
||||
assert_instances_of($fields, 'DifferentialCommitMessageField');
|
||||
$fields = mpull($fields, null, 'getCommitMessageFieldKey');
|
||||
$this->commitMessageFields = $fields;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @task config
|
||||
*/
|
||||
public function getCommitMessageFields() {
|
||||
return $this->commitMessageFields;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @task config
|
||||
*/
|
||||
public function setRaiseMissingFieldErrors($raise) {
|
||||
$this->raiseMissingFieldErrors = $raise;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @task config
|
||||
*/
|
||||
public function getRaiseMissingFieldErrors() {
|
||||
return $this->raiseMissingFieldErrors;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @task config
|
||||
*/
|
||||
|
@ -105,7 +135,7 @@ final class DifferentialCommitMessageParser extends Phobject {
|
|||
public function parseCorpus($corpus) {
|
||||
$this->errors = array();
|
||||
|
||||
$label_map = $this->labelMap;
|
||||
$label_map = $this->getLabelMap();
|
||||
$key_title = $this->titleKey;
|
||||
$key_summary = $this->summaryKey;
|
||||
|
||||
|
@ -215,6 +245,57 @@ final class DifferentialCommitMessageParser extends Phobject {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* @task parse
|
||||
*/
|
||||
public function parseFields($corpus) {
|
||||
$viewer = $this->getViewer();
|
||||
$text_map = $this->parseCorpus($corpus);
|
||||
|
||||
$field_map = $this->getCommitMessageFields();
|
||||
|
||||
$result_map = array();
|
||||
foreach ($text_map as $field_key => $text_value) {
|
||||
$field = idx($field_map, $field_key);
|
||||
if (!$field) {
|
||||
// This is a strict error, since we only parse fields which we have
|
||||
// been told are valid. The caller probably handed us an invalid label
|
||||
// map.
|
||||
throw new Exception(
|
||||
pht(
|
||||
'Parser emitted a field with key "%s", but no corresponding '.
|
||||
'field definition exists.',
|
||||
$field_key));
|
||||
}
|
||||
|
||||
try {
|
||||
$result = $field->parseFieldValue($text_value);
|
||||
$result_map[$field_key] = $result;
|
||||
} catch (DifferentialFieldParseException $ex) {
|
||||
$this->errors[] = pht(
|
||||
'Error parsing field "%s": %s',
|
||||
$field->getFieldName(),
|
||||
$ex->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->getRaiseMissingFieldErrors()) {
|
||||
foreach ($field_map as $key => $field) {
|
||||
try {
|
||||
$field->validateFieldValue(idx($result_map, $key));
|
||||
} catch (DifferentialFieldValidationException $ex) {
|
||||
$this->errors[] = pht(
|
||||
'Invalid or missing field "%s": %s',
|
||||
$field->getFieldName(),
|
||||
$ex->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $result_map;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @task parse
|
||||
*/
|
||||
|
@ -237,6 +318,38 @@ final class DifferentialCommitMessageParser extends Phobject {
|
|||
/* -( Internals )---------------------------------------------------------- */
|
||||
|
||||
|
||||
private function getLabelMap() {
|
||||
if ($this->labelMap === null) {
|
||||
$field_list = $this->getCommitMessageFields();
|
||||
|
||||
$label_map = array();
|
||||
foreach ($field_list as $field_key => $field) {
|
||||
$labels = $field->getFieldAliases();
|
||||
$labels[] = $field->getFieldName();
|
||||
|
||||
foreach ($labels as $label) {
|
||||
$normal_label = self::normalizeFieldLabel($label);
|
||||
if (!empty($label_map[$normal_label])) {
|
||||
throw new Exception(
|
||||
pht(
|
||||
'Field label "%s" is parsed by two custom fields: "%s" and '.
|
||||
'"%s". Each label must be parsed by only one field.',
|
||||
$label,
|
||||
$field_key,
|
||||
$label_map[$normal_label]));
|
||||
}
|
||||
|
||||
$label_map[$normal_label] = $field_key;
|
||||
}
|
||||
}
|
||||
|
||||
$this->labelMap = $label_map;
|
||||
}
|
||||
|
||||
return $this->labelMap;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @task internal
|
||||
*/
|
||||
|
|
|
@ -41,6 +41,36 @@ final class DifferentialCommitMessageParserTestCase
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public function testDifferentialCommitMessageFieldParser() {
|
||||
$message = <<<EOMESSAGE
|
||||
This is the title.
|
||||
|
||||
Summary: This is the summary.
|
||||
EOMESSAGE;
|
||||
|
||||
$fields = array(
|
||||
new DifferentialTitleCommitMessageField(),
|
||||
new DifferentialSummaryCommitMessageField(),
|
||||
);
|
||||
|
||||
$expect = array(
|
||||
DifferentialTitleCommitMessageField::FIELDKEY =>
|
||||
'This is the title.',
|
||||
DifferentialSummaryCommitMessageField::FIELDKEY =>
|
||||
'This is the summary.',
|
||||
);
|
||||
|
||||
$parser = id(new DifferentialCommitMessageParser())
|
||||
->setCommitMessageFields($fields)
|
||||
->setTitleKey(DifferentialTitleCommitMessageField::FIELDKEY)
|
||||
->setSummaryKey(DifferentialSummaryCommitMessageField::FIELDKEY);
|
||||
|
||||
$actual = $parser->parseFields($message);
|
||||
|
||||
$this->assertEqual($expect, $actual);
|
||||
}
|
||||
|
||||
public function testDifferentialCommitMessageParserNormalization() {
|
||||
$map = array(
|
||||
'Test Plan' => 'test plan',
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue