Merge branch 'master' into blender-tweaks

This commit is contained in:
2017-09-08 15:50:08 +02:00
1165 changed files with 31135 additions and 20954 deletions

21
externals/octicons/LICENSE vendored Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2012-2016 GitHub, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

194
externals/octicons/README.md vendored Normal file
View File

@@ -0,0 +1,194 @@
# GitHub Octicons
[![NPM version](https://img.shields.io/npm/v/octicons.svg)](https://www.npmjs.org/package/octicons)
[![Build Status](https://travis-ci.org/primer/octicons.svg?branch=master)](https://travis-ci.org/primer/octicons)
> Octicons are a scalable set of icons handcrafted with <3 by GitHub.
## Install
**NOTE:** The compiled files are located in `/build/`. This directory is located in the published npm package. Which means you can access it when you `npm install octicons`. You can also build this directory by following the [building octicons directions](#building-octicons). The files in the `/lib/` directory are the raw source files and are not compiled or optimized.
#### NPM
This repository is distributed with [npm][npm]. After [installing npm][install-npm], you can install `octicons` with this command.
```
$ npm install --save octicons
```
## Usage
For all the usages, we recommend using the CSS located in `./build/octicons.css`. This is some simple CSS to normalize the icons and inherit colors.
### Spritesheet
With a [SVG sprite icon system](https://css-tricks.com/svg-sprites-use-better-icon-fonts/) you can include the sprite sheet located `./build/sprite.octicons.svg` after you [build the icons](#building-octicons) or from the npm package. There is a demo of how to use the spritesheet in the build directory also.
### Node
After installing `npm install octicons` you can access the icons like this.
```js
var octicons = require("octicons")
octicons.alert
// { keywords: [ 'warning', 'triangle', 'exclamation', 'point' ],
// path: '<path d="M8.865 1.52c-.18-.31-.51-.5-.87-.5s-.69.19-.87.5L.275 13.5c-.18.31-.18.69 0 1 .19.31.52.5.87.5h13.7c.36 0 .69-.19.86-.5.17-.31.18-.69.01-1L8.865 1.52zM8.995 13h-2v-2h2v2zm0-3h-2V6h2v4z"/>',
// height: '16',
// width: '16',
// symbol: 'alert',
// options:
// { version: '1.1',
// width: '16',
// height: '16',
// viewBox: '0 0 16 16',
// class: 'octicon octicon-alert',
// 'aria-hidden': 'true' },
// toSVG: [Function] }
```
There will be a key for every icon, with `keywords` and `svg`.
#### `octicons.alert.symbol`
Returns the string of the symbol name
```js
octicons.x.symbol
// "x"
```
#### `octicons.person.path`
Path returns the string representation of the path of the icon.
```js
octicons.x.path
// <path d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"></path>
```
#### `octicons.issue.options`
This is a json object of all the `options` that will be added to the output tag.
```js
octicons.x.options
// { version: '1.1', width: '12', height: '16', viewBox: '0 0 12 16', class: 'octicon octicon-x', 'aria-hidden': 'true' }
```
#### `octicons.alert.width`
Width is the icon's true width. Based on the svg view box width. _Note, this doesn't change if you scale it up with size options, it only is the natural width of the icon_
#### `octicons.alert.height`
Height is the icon's true height. Based on the svg view box height. _Note, this doesn't change if you scale it up with size options, it only is the natural height of the icon_
#### `keywords`
Returns an array of keywords for the icon. The data [comes from the octicons repository](https://github.com/primer/octicons/blob/master/lib/data.json). Consider contributing more aliases for the icons.
```js
octicons.x.keywords
// ["remove", "close", "delete"]
```
#### `octicons.alert.toSVG()`
Returns a string of the svg tag
```js
octicons.x.toSVG()
// <svg version="1.1" width="12" height="16" viewBox="0 0 12 16" class="octicon octicon-x" aria-hidden="true"><path d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"/></svg>
```
The `.toSVG()` method accepts an optional `options` object. This is used to add CSS classnames, a11y options, and sizing.
##### class
Add more CSS classes to the `<svg>` tag.
```js
octicons.x.toSVG({ "class": "close" })
// <svg version="1.1" width="12" height="16" viewBox="0 0 12 16" class="octicon octicon-x close" aria-hidden="true"><path d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"/></svg>
```
##### aria-label
Add accessibility `aria-label` to the icon.
```js
octicons.x.toSVG({ "aria-label": "Close the window" })
// <svg version="1.1" width="12" height="16" viewBox="0 0 12 16" class="octicon octicon-x" aria-label="Close the window" role="img"><path d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"/></svg>
```
##### width & height
Size the SVG icon larger using `width` & `height` independently or together.
```js
octicons.x.toSVG({ "width": 45 })
// <svg version="1.1" width="45" height="60" viewBox="0 0 12 16" class="octicon octicon-x" aria-hidden="true"><path d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"/></svg>
```
#### `octicons.alert.toSVGUse()`
Returns a string of the svg tag with the `<use>` tag, for use with the spritesheet located in the /build/ directory.
```js
octicons.x.toSVGUse()
// <svg version="1.1" width="12" height="16" viewBox="0 0 12 16" class="octicon octicon-x" aria-hidden="true"><use xlink:href="#x" /></svg>
```
### Ruby
If your environment is Ruby on Rails, we have a [octicons_helper](https://github.com/primer/octicons_helper) gem available that renders SVG in your page. The octicons_helper uses the [octicons_gem](https://github.com/primer/octicons_gem) to do the computing and reading of the SVG files.
### Jekyll
For jekyll, there's a [jekyll-octicons](https://github.com/primer/jekyll-octicons) plugin available. This works exactly like the octicons_helper.
## Changing, adding, or deleting icons
1. Open the [Sketch document][sketch-document] in `/lib/`. Each icon exists as an artboard within our master Sketch document. If youre adding an icon, duplicate one of the artboards and add your shapes to it. Be sure to give your artboard a name that makes sense.
2. Once youre happy with your icon set, choose File > Export…
3. Choose all the artboards youd like to export and then press “Export”
4. Export to `/lib/svg/`
Youll next need to build your Octicons.
## Building Octicons
All the files you need will be in the `/build/` directory already, but if youve made changes to the `/lib/` directory and need to regenerate, follow these steps:
1. Open the Octicons directory in Terminal
2. `npm install` to install all dependencies for the project.
3. Run the command `npm run build`. This will run the grunt task to build the SVGs, placing them in the `/build/` directory.
## Publishing
If you have access to publish this repository, these are the steps to publishing. If you need access, contact [#design-systems](https://github.slack.com/archives/design-systems).
1. Update the [CHANGELOG.md](./CHANGELOG.md) with relevant version number and any updates made to the repository.
2. `npm version <newversion>` Run [npm version](https://docs.npmjs.com/cli/version) inputing the relevant version type. The versioning is [semver](http://semver.org/), so version appropriately based on what has changed.
3. `npm publish` This will publish the new version to npmjs.org
4. `git push && git push --tags` Push all these changes to origin.
## License
(c) 2012-2016 GitHub, Inc.
When using the GitHub logos, be sure to follow the [GitHub logo guidelines](https://github.com/logos).
_SVG License:_ [SIL OFL 1.1](http://scripts.sil.org/OFL)
Applies to all SVG files
_Code License:_ [MIT](./LICENSE)
Applies to all other files
[primer]: https://github.com/primer/primer
[docs]: http://primercss.io/
[npm]: https://www.npmjs.com/
[install-npm]: https://docs.npmjs.com/getting-started/installing-node
[sass]: http://sass-lang.com/
[sketch-document]: https://github.com/primer/octicons/blob/master/lib/octicons-master.sketch

Binary file not shown.

Before

Width:  |  Height:  |  Size: 411 B

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -93,6 +93,7 @@ return array(
'phabricator-core-css',
'phabricator-zindex-css',
'phui-button-css',
'phui-button-simple-css',
'phui-theme-css',
'phabricator-standard-page-view',
'aphront-dialog-view-css',
@@ -193,22 +194,19 @@ return array(
'phabricator-shaped-request',
'javelin-behavior-differential-feedback-preview',
'javelin-behavior-differential-edit-inline-comments',
'javelin-behavior-differential-populate',
'javelin-behavior-differential-diff-radios',
'javelin-behavior-differential-comment-jump',
'javelin-behavior-differential-keyboard-navigation',
'javelin-behavior-aphront-drag-and-drop-textarea',
'javelin-behavior-phabricator-object-selector',
'javelin-behavior-repository-crossreference',
'javelin-behavior-load-blame',
'differential-inline-comment-editor',
'javelin-behavior-differential-dropdown-menus',
'javelin-behavior-differential-toggle-files',
'javelin-behavior-differential-user-select',
'javelin-behavior-aphront-more',
'changeset-view-manager',
'phabricator-diff-inline',
'phabricator-diff-changeset',
'phabricator-diff-changeset-list',
),
'diffusion.pkg.css' => array(
'diffusion-icons-css',

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 879 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 722 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 421 B

After

Width:  |  Height:  |  Size: 522 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1013 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 934 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 776 B

View File

@@ -21,11 +21,6 @@
"rule": ".login-Disqus",
"hash": "77b29d56329a3c30b79d6b6673b0e39b"
},
"login-Dropbox": {
"name": "login-Dropbox",
"rule": ".login-Dropbox",
"hash": "5eaf07ae4598227fbbba3474675d18c7"
},
"login-Facebook": {
"name": "login-Facebook",
"rule": ".login-Facebook",
@@ -61,21 +56,11 @@
"rule": ".login-LDAP",
"hash": "e31df2e9faf8ca0925ef93128a82fa7a"
},
"login-Linkedin": {
"name": "login-Linkedin",
"rule": ".login-Linkedin",
"hash": "b7ee1e92c923462531f3a34093e57127"
},
"login-MediaWiki": {
"name": "login-MediaWiki",
"rule": ".login-MediaWiki",
"hash": "f1f0a9382434081a9a84e7584828c2dd"
},
"login-Openid": {
"name": "login-Openid",
"rule": ".login-Openid",
"hash": "886f65ad44435344a1fa1c13e7758155"
},
"login-PayPal": {
"name": "login-PayPal",
"rule": ".login-PayPal",
@@ -84,7 +69,7 @@
"login-Phabricator": {
"name": "login-Phabricator",
"rule": ".login-Phabricator",
"hash": "d0f830803593bbcc025d7d5a29ee3ecd"
"hash": "54f5ddae4b9d138c438ec00ed42544d2"
},
"login-Slack": {
"name": "login-Slack",
@@ -120,11 +105,6 @@
"name": "login-WordPressCOM",
"rule": ".login-WordPressCOM",
"hash": "9eae4205dbed0c42a18ee4f8e0fa151b"
},
"login-Yahoo": {
"name": "login-Yahoo",
"rule": ".login-Yahoo",
"hash": "f37822c769f6b8ebd1dda6b3ac89b83b"
}
},
"scales": [

View File

@@ -36,7 +36,8 @@ foreach (new LiskMigrationIterator(new ManiphestTransaction()) as $xaction) {
$id = $xaction->getID();
echo pht('Migrating %d...', $id)."\n";
if ($xaction->getTransactionType() == ManiphestTransaction::TYPE_STATUS) {
$xn_type = ManiphestTaskStatusTransaction::TRANSACTIONTYPE;
if ($xaction->getTransactionType() == $xn_type) {
$old = $xaction->getOldValue();
if ($old !== null && isset($status_map[$old])) {
$old = $status_map[$old];

View File

@@ -1,30 +1,3 @@
<?php
// Destroy duplicate drafts before storage adjustment adds a unique key to this
// table. See T1191. We retain the newest draft.
// (We can't easily do this in a single SQL statement because MySQL won't let us
// modify a table that's joined in a subquery.)
$table = new DifferentialDraft();
$conn_w = $table->establishConnection('w');
$duplicates = queryfx_all(
$conn_w,
'SELECT DISTINCT u.id id FROM %T u
JOIN %T v
ON u.objectPHID = v.objectPHID
AND u.authorPHID = v.authorPHID
AND u.draftKey = v.draftKey
AND u.id < v.id',
$table->getTableName(),
$table->getTableName());
$duplicates = ipull($duplicates, 'id');
foreach (PhabricatorLiskDAO::chunkSQL($duplicates) as $chunk) {
queryfx(
$conn_w,
'DELETE FROM %T WHERE id IN (%Q)',
$table->getTableName(),
$chunk);
}
// This table has been removed; see T12104 for details.

View File

@@ -0,0 +1,2 @@
ALTER TABLE {$NAMESPACE}_file.file
CHANGE contentHash contentHash BINARY(64);

View File

@@ -0,0 +1,2 @@
ALTER TABLE {$NAMESPACE}_owners.owners_package
DROP originalName;

View File

@@ -0,0 +1,2 @@
ALTER TABLE {$NAMESPACE}_slowvote.slowvote_poll
MODIFY shuffle BOOL NOT NULL DEFAULT 0;

View File

@@ -0,0 +1,2 @@
ALTER TABLE {$NAMESPACE}_nuance.nuance_item
MODIFY itemKey VARCHAR(64) COLLATE {$COLLATE_TEXT};

View File

@@ -0,0 +1,8 @@
ALTER TABLE {$NAMESPACE}_nuance.nuance_itemcommand
ADD dateCreated INT UNSIGNED NOT NULL;
ALTER TABLE {$NAMESPACE}_nuance.nuance_itemcommand
ADD dateModified INT UNSIGNED NOT NULL;
ALTER TABLE {$NAMESPACE}_nuance.nuance_itemcommand
ADD queuePHID VARBINARY(64);

View File

@@ -0,0 +1,5 @@
ALTER TABLE {$NAMESPACE}_nuance.nuance_itemcommand
ADD status VARCHAR(64) NOT NULL;
UPDATE {$NAMESPACE}_nuance.nuance_itemcommand
SET status = 'done' WHERE status = '';

View File

@@ -0,0 +1 @@
DROP TABLE {$NAMESPACE}_differential.differential_draft;

View File

@@ -0,0 +1,11 @@
<?php
$table = new PhabricatorProject();
foreach (new LiskMigrationIterator($table) as $project) {
PhabricatorSearchWorker::queueDocumentForIndexing(
$project->getPHID(),
array(
'force' => true,
));
}

View File

@@ -0,0 +1,68 @@
<?php
$table = new ManiphestTransaction();
$add_edges = array();
foreach (new LiskMigrationIterator($table) as $txn) {
$txn_type = $txn->getTransactionType();
if ($txn_type == 'mergedinto') {
// dupe handling as implemented in D10427, which creates a specific txn
$add_edges[] = array(
'src' => $txn->getObjectPHID(),
'dst' => $txn->getNewValue(),
);
} else if ($txn_type == 'status' && $txn->getNewValue() == 'duplicate') {
// dupe handling as originally implemented, which just changes the status
// and adds a comment
$src_phid = $txn->getObjectPHID();
// get all the comment transactions associated with this task
$viewer = PhabricatorUser::getOmnipotentUser();
$comment_txns = id(new ManiphestTransactionQuery())
->setViewer($viewer)
->withObjectPHIDs(array($src_phid))
->needComments(true)
->execute();
// check each comment, looking for the "Merged Into" message
foreach ($comment_txns as $comment_txn) {
if ($comment_txn->hasComment()) {
$comment = $comment_txn->getComment()->getContent();
$pattern = '/^\xE2\x9C\x98 Merged into T(\d+)\.$/';
$matches = array();
if (preg_match($pattern, $comment, $matches)) {
$dst_task = id(new ManiphestTaskQuery())
->setViewer($viewer)
->withIDs(array($matches[1]))
->executeOne();
if ($dst_task) {
$dst_phid = $dst_task->getPHID();
$add_edges[] = array(
'src' => $src_phid,
'dst' => $dst_phid,
);
}
}
}
}
}
}
if ($add_edges) {
foreach ($add_edges as $edge) {
$src_phid = $edge['src'];
$dst_phid = $edge['dst'];
$type = ManiphestTaskIsDuplicateOfTaskEdgeType::EDGECONST;
try {
$editor = id(new PhabricatorEdgeEditor())
->addEdge($src_phid, $type, $dst_phid)
->save();
} catch (PhabricatorEdgeCycleException $ex) {
// Some earlier or later merge made this invalid, just skip it.
}
}
}

View File

@@ -0,0 +1,2 @@
ALTER TABLE {$NAMESPACE}_repository.repository
ADD profileImagePHID VARBINARY(64);

View File

@@ -0,0 +1,4 @@
/* Extend from 12 characters to 64. */
ALTER TABLE {$NAMESPACE}_maniphest.maniphest_task
CHANGE status status VARCHAR(64) COLLATE {$COLLATE_TEXT} NOT NULL;

View File

@@ -0,0 +1,2 @@
UPDATE {$NAMESPACE}_legalpad.legalpad_documentbody
SET dateCreated = dateModified;

View File

@@ -0,0 +1,48 @@
<?php
// Migrate saved Differential revision queries from using a "<select />"
// control with hard-coded status groups for status selection to using a
// tokenizer with status functions.
$table = new PhabricatorSavedQuery();
$conn = $table->establishConnection('w');
$status_map = array(
'status-open' => array('open()'),
'status-closed' => array('closed()'),
'status-accepted' => array('accepted'),
'status-needs-review' => array('needs-review'),
'status-needs-revision' => array('needs-revision'),
'status-abandoned' => array('abandoned'),
);
foreach (new LiskMigrationIterator($table) as $query) {
if ($query->getEngineClassName() !== 'DifferentialRevisionSearchEngine') {
// This isn't a revision query.
continue;
}
$parameters = $query->getParameters();
$status = idx($parameters, 'status');
if (!$status) {
// This query didn't specify a "status" value.
continue;
}
if (!isset($status_map[$status])) {
// The "status" value is unknown, or does not correspond to a
// modern "status" constraint.
continue;
}
$parameters['statuses'] = $status_map[$status];
queryfx(
$conn,
'UPDATE %T SET parameters = %s WHERE id = %d',
$table->getTableName(),
phutil_json_encode($parameters),
$query->getID());
}

View File

@@ -0,0 +1,17 @@
UPDATE {$NAMESPACE}_differential.differential_revision
SET status = "needs-review" WHERE status = "0";
UPDATE {$NAMESPACE}_differential.differential_revision
SET status = "needs-revision" WHERE status = "1";
UPDATE {$NAMESPACE}_differential.differential_revision
SET status = "accepted" WHERE status = "2";
UPDATE {$NAMESPACE}_differential.differential_revision
SET status = "published" WHERE status = "3";
UPDATE {$NAMESPACE}_differential.differential_revision
SET status = "abandoned" WHERE status = "4";
UPDATE {$NAMESPACE}_differential.differential_revision
SET status = "changes-planned" WHERE status = "5";

View File

@@ -0,0 +1,38 @@
<?php
$map = array(
'0' => 'needs-review',
'1' => 'needs-revision',
'2' => 'accepted',
'3' => 'published',
'4' => 'abandoned',
'5' => 'changes-planned',
);
$table = new DifferentialTransaction();
$conn = $table->establishConnection('w');
foreach (new LiskMigrationIterator($table) as $xaction) {
$type = $xaction->getTransactionType();
if (($type != 'differential:status') &&
($type != 'differential.revision.status')) {
continue;
}
$old = $xaction->getOldValue();
$new = $xaction->getNewValue();
$old = idx($map, $old, $old);
$new = idx($map, $new, $new);
queryfx(
$conn,
'UPDATE %T SET transactionType = %s, oldValue = %s, newValue = %s
WHERE id = %d',
$table->getTableName(),
'differential.revision.status',
json_encode($old),
json_encode($new),
$xaction->getID());
}

Some files were not shown because too many files have changed in this diff Show More