Compare commits
351 Commits
master
...
blender-tw
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
436e69f1d0 | ||
| 5db4b6f01a | |||
| 5aabb434b1 | |||
| eced78a591 | |||
| fb3e6ba493 | |||
| 284204e6bb | |||
| 1df20d771c | |||
| 6fa976f749 | |||
| 8808cf8e8c | |||
| f72b9824f3 | |||
| ac94643ac7 | |||
| ce3c14919d | |||
| c9fb4c2945 | |||
| 57099f29d1 | |||
| acfdc33789 | |||
| a5efb1e8cd | |||
| e0bd65be95 | |||
| 1bcc201b0a | |||
| b2d7879162 | |||
| 775a1c2eef | |||
| bd07cea6a6 | |||
| 6139ce1841 | |||
| c38766c17f | |||
| f9637502ee | |||
|
|
0ddfe6fcfb | ||
|
|
dc57652085 | ||
| 5ba0687123 | |||
| fef207bf00 | |||
| 5ef3552549 | |||
| 0f6ca4be21 | |||
| 4653348b13 | |||
| 6826284108 | |||
| c93fdca80d | |||
| 432b6d61a6 | |||
| 4c2b7d7573 | |||
| d8e25a6226 | |||
| db6f4eaab1 | |||
| 4555f18c41 | |||
| 788d8a8b98 | |||
| 55f22f74f5 | |||
| de2f7e857d | |||
| 7c869ab033 | |||
| f9c680ddc0 | |||
| 8efe191897 | |||
| 8d6f1a6128 | |||
| 81bae35d2f | |||
| fc5744c7f0 | |||
| 7aea82d526 | |||
| cb29054e66 | |||
| 0416648b39 | |||
| 01fea69352 | |||
| c7a2133639 | |||
| a162f188c2 | |||
| 2b54804c7b | |||
| a8fef30871 | |||
| 9dc4d903c7 | |||
| b8b18995c5 | |||
| 971b397133 | |||
| aee7dc94bc | |||
| feb8db1212 | |||
| f9f7f005f2 | |||
| 2321a886ae | |||
| 72858c6746 | |||
| 79ca5a3026 | |||
| 3d37998174 | |||
| ce29e40b57 | |||
| ef26d6afdc | |||
| dc84bc9391 | |||
| 321eb18cd7 | |||
| 6936b8c4f3 | |||
| 26f43ee9b8 | |||
| e19d318af9 | |||
| dfc7f764de | |||
| 331b4cc42c | |||
| 674d537f91 | |||
| a442a019d9 | |||
| 774a554405 | |||
| 90f56e07ff | |||
| 4b428ffb8a | |||
| bcd0caecd1 | |||
| 78c32afa4e | |||
| f3302fe1b9 | |||
| 7eba06c43d | |||
| 713f8e2c6a | |||
| ea0100310b | |||
| 4332bfe537 | |||
| 25ce2bdd92 | |||
| dc17ef4f7c | |||
| 8097508909 | |||
| 8addc33734 | |||
| 990136a337 | |||
| d14b204aae | |||
| 4067829d2c | |||
| 8bc4c8c485 | |||
| bf8aec2a14 | |||
| ace2787868 | |||
| 08dde1da13 | |||
| 4cde7a4b06 | |||
| 42ce8a82af | |||
| 6d6e446f6f | |||
| 26bf667fec | |||
| 18b9c9b0b1 | |||
| f78ca8833b | |||
| 19337de8f0 | |||
| c2a4fbc98c | |||
| 87c0e13efd | |||
| 3442097b31 | |||
| c7764ed1d0 | |||
| 6e39022af9 | |||
| d88716feba | |||
| 678347d836 | |||
| 890ccea846 | |||
| 405525357d | |||
| 3eee2a3311 | |||
| 55d1f0081d | |||
| ea73d9bf86 | |||
| 3eab15180c | |||
| 2210be45fe | |||
| 5bdc3dfad8 | |||
| c22440fe30 | |||
| b41844290b | |||
| 32a3440156 | |||
| 630eb3c143 | |||
| 534b628ad2 | |||
| 8a463524b4 | |||
| b50eefbd5b | |||
| 3a2ebeca11 | |||
| 95f7da61a9 | |||
| 0d04beb777 | |||
| 7ab26ff7af | |||
| 6800fc6103 | |||
| 9077c1f24f | |||
| 2327f2af6f | |||
| 41fff9c930 | |||
| cfcef40c65 | |||
| 29d158a3bc | |||
| 411cf324dd | |||
| 52230a803f | |||
| ddf6f275db | |||
| 8c65ee54d0 | |||
| d07d44fcc7 | |||
| 772d59f0ab | |||
| f7da3f88f9 | |||
| e4f6cf9993 | |||
| dd34c93656 | |||
| 320ffa2308 | |||
| b5e7136f68 | |||
| e2b7664451 | |||
| 725ad07e6f | |||
| 75cbd69d85 | |||
| a9a71ef011 | |||
| 362ba36695 | |||
| 38d687ede2 | |||
| 78cd1cf494 | |||
| 0b990d42cd | |||
| 74571de5b6 | |||
| 01ce61f6e2 | |||
| 09c9aa078d | |||
| 73441d690e | |||
| afdc21ee04 | |||
| fc317b7f28 | |||
| b3f2b7faf4 | |||
| 7ea70dcb53 | |||
| d0b90fdef7 | |||
| 3c05d31d2e | |||
| 11f5eb21af | |||
| c90665645e | |||
| fb3c71820b | |||
| e533774ac0 | |||
| 647f8de9bb | |||
| 599bf57cd8 | |||
| 50c506ea2d | |||
| 4cc7990b1a | |||
| 4ef5fdefb2 | |||
| a018837214 | |||
| e74f0e1558 | |||
| fd882b5167 | |||
| 15bda62b89 | |||
| 5e4ce96266 | |||
| dbd2f0d06f | |||
| c87e657412 | |||
| 6275e3f08f | |||
| bc2e4a2452 | |||
| ba7d9fb724 | |||
| c50ab96abb | |||
| fa68c6a0fa | |||
| d1b60fec48 | |||
| 99a839605c | |||
| 08f5b3e920 | |||
| 87e0a26d24 | |||
| 91c07e9f99 | |||
| 9b2b75e4b4 | |||
| 77c913c70a | |||
| 1a1bea527c | |||
| 46f8f6d90d | |||
| dbad3b6489 | |||
| 1821cedbc4 | |||
| 1448eafd64 | |||
| 8f4047b36a | |||
| 2683fde42a | |||
| 02522d877d | |||
| 769ffa2982 | |||
| 33eed14141 | |||
| a0bd47a012 | |||
| 8c14ef97bf | |||
| 5bdfbe8250 | |||
| f2319c9689 | |||
| c3138c6497 | |||
| 56e8308621 | |||
| cb6a8756b6 | |||
| e7242143a0 | |||
| c12898b63a | |||
| 9453f29deb | |||
| 9093816113 | |||
| 3471c1b87e | |||
| 30f0de9427 | |||
| 5278e94566 | |||
| 08b1e9d764 | |||
| 30427e0626 | |||
| 752a5b9bc3 | |||
| a5390d5461 | |||
| a02fa19d5a | |||
| f88bdcd4ff | |||
| b98f8a570c | |||
| 644070340d | |||
| 93fecfe7e9 | |||
| 53bb3ac361 | |||
| 137df8c6d3 | |||
| 9863285bf0 | |||
| a392b4a14f | |||
| d03569e908 | |||
| b1097e9c61 | |||
| 5bda6bf48b | |||
| a03cdacd9e | |||
| c3fe33f5a0 | |||
| 5d823ff1a7 | |||
| 63df9dd1f4 | |||
| 0c80c9fead | |||
| b8d42a7cc6 | |||
| 4e7dc30fea | |||
| 99c68b1091 | |||
| d48979091e | |||
| 785caa5b6c | |||
| 261d7331f4 | |||
| 28bd8409df | |||
| 47008a157c | |||
| fc1e8681ef | |||
| 17085b4379 | |||
| dd6eefcd9c | |||
| ae2b0e63d6 | |||
| bcbae097de | |||
| b59dca4eeb | |||
| 8098798fa9 | |||
| d8d0e2c99f | |||
| 214233f82f | |||
| eebe82c990 | |||
| 5b73071d64 | |||
| cd04de7f72 | |||
| cf4b1317e1 | |||
| 10e353b090 | |||
| 81bd756ec6 | |||
| 9527d8aafd | |||
| e35bc58e0e | |||
| bd0f9fd913 | |||
| 44957f7806 | |||
| 7ff26eb95d | |||
| 1f2471fa67 | |||
| 7a5588a408 | |||
| ac03ae737f | |||
| f9db95f555 | |||
| 2bc045a997 | |||
| 531b0fa529 | |||
| 6b1ed4fb9b | |||
| 645a6a9f54 | |||
| 88cd291b0f | |||
| 76e4aaf429 | |||
| 365f8ad981 | |||
| 0af08f9469 | |||
| 23ce658af7 | |||
| 0a54474f98 | |||
| 93ca9ed3a8 | |||
| d110fdccc2 | |||
| 4197d983bf | |||
| d23883b799 | |||
| 675d2ac374 | |||
| 5c86735ab7 | |||
| 566274dcac | |||
| de2814545b | |||
| 4ea26f22c4 | |||
| 458bc7f921 | |||
| 3839698e4a | |||
| b403863e62 | |||
| 246b73f922 | |||
| 6da7f462a9 | |||
| 90874b8b00 | |||
| 7e874a33fb | |||
| bbe357e5c0 | |||
| 428cdae3cf | |||
| 1c689a6b24 | |||
| 55972ef2c1 | |||
| 966687d1ab | |||
| 6a86144adf | |||
| 57765e88c0 | |||
| 60cddad047 | |||
| a77a33dc50 | |||
| 405a07e638 | |||
| 75f9ce9d77 | |||
| 259588e747 | |||
| 0e8b746fb0 | |||
| 753917c10c | |||
| 39f7364f25 | |||
| 8d7de5fcb6 | |||
| 01398f762b | |||
| e12d2efe81 | |||
| 5c7055d840 | |||
| 562c7aa126 | |||
| 5994088e50 | |||
| 9edbe22e19 | |||
| 7fabfff397 | |||
| 356a2fe0e8 | |||
| 54193ebb15 | |||
| 2b4bb9cddd | |||
| 2758907517 | |||
| a7f641eee2 | |||
| 9799ceff80 | |||
| 26e86c2171 | |||
| f6c293fb4d | |||
| 5abc5cf9f8 | |||
| 41a820fdf0 | |||
| 2c8b09da21 | |||
| a7ff526360 | |||
| 1a8148be97 | |||
| 199dd85140 | |||
| f6c44fdb03 | |||
| 1aade72cb1 | |||
| 121c9d308b | |||
| d60a47ab5b | |||
| 8af9b8796f | |||
| 7dd7673fb3 | |||
| aeaf0902e1 | |||
| 498842475c | |||
| 755177508e | |||
| 5b49fd93e2 | |||
| 968ea35b03 | |||
| 97ed90b82a | |||
| ba34aa535a | |||
| e56041da3b | |||
| b19fbc39af | |||
| 1036d419fa | |||
| 0011789443 | |||
| ff7d71fb87 |
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"phabricator.uri": "https://secure.phabricator.com/",
|
"phabricator.uri": "https://developer.blender.org/",
|
||||||
"load": ["src/"],
|
"load": ["src/"],
|
||||||
"history.immutable": false
|
"history.immutable": false
|
||||||
}
|
}
|
||||||
|
|||||||
3
.gitignore
vendored
@@ -40,3 +40,6 @@
|
|||||||
# Places for users to add custom resources.
|
# Places for users to add custom resources.
|
||||||
/resources/cows/custom/*
|
/resources/cows/custom/*
|
||||||
/resources/figlet/custom/*
|
/resources/figlet/custom/*
|
||||||
|
|
||||||
|
# blender migration files
|
||||||
|
migration/dump/
|
||||||
|
|||||||
722
externals/amazon-ses/ses.php
vendored
Normal file
@@ -0,0 +1,722 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Copyright (c) 2011, Dan Myers.
|
||||||
|
* Parts copyright (c) 2008, Donovan Schonknecht.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* - Redistributions of source code must retain the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer.
|
||||||
|
* - Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* This is a modified BSD license (the third clause has been removed).
|
||||||
|
* The BSD license may be found here:
|
||||||
|
* http://www.opensource.org/licenses/bsd-license.php
|
||||||
|
*
|
||||||
|
* Amazon Simple Email Service is a trademark of Amazon.com, Inc. or its affiliates.
|
||||||
|
*
|
||||||
|
* SimpleEmailService is based on Donovan Schonknecht's Amazon S3 PHP class, found here:
|
||||||
|
* http://undesigned.org.za/2007/10/22/amazon-s3-php-class
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Amazon SimpleEmailService PHP class
|
||||||
|
*
|
||||||
|
* @link http://sourceforge.net/projects/php-aws-ses/
|
||||||
|
* version 0.8.1
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class SimpleEmailService
|
||||||
|
{
|
||||||
|
protected $__accessKey; // AWS Access key
|
||||||
|
protected $__secretKey; // AWS Secret key
|
||||||
|
protected $__host;
|
||||||
|
|
||||||
|
public function getAccessKey() { return $this->__accessKey; }
|
||||||
|
public function getSecretKey() { return $this->__secretKey; }
|
||||||
|
public function getHost() { return $this->__host; }
|
||||||
|
|
||||||
|
protected $__verifyHost = 1;
|
||||||
|
protected $__verifyPeer = 1;
|
||||||
|
|
||||||
|
// verifyHost and verifyPeer determine whether curl verifies ssl certificates.
|
||||||
|
// It may be necessary to disable these checks on certain systems.
|
||||||
|
// These only have an effect if SSL is enabled.
|
||||||
|
public function verifyHost() { return $this->__verifyHost; }
|
||||||
|
public function enableVerifyHost($enable = true) { $this->__verifyHost = $enable; }
|
||||||
|
|
||||||
|
public function verifyPeer() { return $this->__verifyPeer; }
|
||||||
|
public function enableVerifyPeer($enable = true) { $this->__verifyPeer = $enable; }
|
||||||
|
|
||||||
|
// If you use exceptions, errors will be communicated by throwing a
|
||||||
|
// SimpleEmailServiceException. By default, they will be trigger_error()'d.
|
||||||
|
protected $__useExceptions = 0;
|
||||||
|
public function useExceptions() { return $this->__useExceptions; }
|
||||||
|
public function enableUseExceptions($enable = true) { $this->__useExceptions = $enable; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param string $accessKey Access key
|
||||||
|
* @param string $secretKey Secret key
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct($accessKey = null, $secretKey = null, $host = 'email.us-east-1.amazonaws.com') {
|
||||||
|
if (!function_exists('simplexml_load_string')) {
|
||||||
|
throw new Exception(
|
||||||
|
pht(
|
||||||
|
'The PHP SimpleXML extension is not available, but this '.
|
||||||
|
'extension is required to send mail via Amazon SES, because '.
|
||||||
|
'Amazon SES returns API responses in XML format. Install or '.
|
||||||
|
'enable the SimpleXML extension.'));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Catch mistakes with reading the wrong column out of the SES
|
||||||
|
// documentation. See T10728.
|
||||||
|
if (preg_match('(-smtp)', $host)) {
|
||||||
|
throw new Exception(
|
||||||
|
pht(
|
||||||
|
'Amazon SES is not configured correctly: the configured SES '.
|
||||||
|
'endpoint ("%s") is an SMTP endpoint. Instead, use an API (HTTPS) '.
|
||||||
|
'endpoint.',
|
||||||
|
$host));
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($accessKey !== null && $secretKey !== null) {
|
||||||
|
$this->setAuth($accessKey, $secretKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->__host = $host;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set AWS access key and secret key
|
||||||
|
*
|
||||||
|
* @param string $accessKey Access key
|
||||||
|
* @param string $secretKey Secret key
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function setAuth($accessKey, $secretKey) {
|
||||||
|
$this->__accessKey = $accessKey;
|
||||||
|
$this->__secretKey = $secretKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Lists the email addresses that have been verified and can be used as the 'From' address
|
||||||
|
*
|
||||||
|
* @return An array containing two items: a list of verified email addresses, and the request id.
|
||||||
|
*/
|
||||||
|
public function listVerifiedEmailAddresses() {
|
||||||
|
$rest = new SimpleEmailServiceRequest($this, 'GET');
|
||||||
|
$rest->setParameter('Action', 'ListVerifiedEmailAddresses');
|
||||||
|
|
||||||
|
$rest = $rest->getResponse();
|
||||||
|
|
||||||
|
$response = array();
|
||||||
|
if(!isset($rest->body)) {
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
|
|
||||||
|
$addresses = array();
|
||||||
|
foreach($rest->body->ListVerifiedEmailAddressesResult->VerifiedEmailAddresses->member as $address) {
|
||||||
|
$addresses[] = (string)$address;
|
||||||
|
}
|
||||||
|
|
||||||
|
$response['Addresses'] = $addresses;
|
||||||
|
$response['RequestId'] = (string)$rest->body->ResponseMetadata->RequestId;
|
||||||
|
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Requests verification of the provided email address, so it can be used
|
||||||
|
* as the 'From' address when sending emails through SimpleEmailService.
|
||||||
|
*
|
||||||
|
* After submitting this request, you should receive a verification email
|
||||||
|
* from Amazon at the specified address containing instructions to follow.
|
||||||
|
*
|
||||||
|
* @param string email The email address to get verified
|
||||||
|
* @return The request id for this request.
|
||||||
|
*/
|
||||||
|
public function verifyEmailAddress($email) {
|
||||||
|
$rest = new SimpleEmailServiceRequest($this, 'POST');
|
||||||
|
$rest->setParameter('Action', 'VerifyEmailAddress');
|
||||||
|
$rest->setParameter('EmailAddress', $email);
|
||||||
|
|
||||||
|
$rest = $rest->getResponse();
|
||||||
|
|
||||||
|
$response['RequestId'] = (string)$rest->body->ResponseMetadata->RequestId;
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes the specified email address from the list of verified addresses.
|
||||||
|
*
|
||||||
|
* @param string email The email address to remove
|
||||||
|
* @return The request id for this request.
|
||||||
|
*/
|
||||||
|
public function deleteVerifiedEmailAddress($email) {
|
||||||
|
$rest = new SimpleEmailServiceRequest($this, 'DELETE');
|
||||||
|
$rest->setParameter('Action', 'DeleteVerifiedEmailAddress');
|
||||||
|
$rest->setParameter('EmailAddress', $email);
|
||||||
|
|
||||||
|
$rest = $rest->getResponse();
|
||||||
|
|
||||||
|
$response['RequestId'] = (string)$rest->body->ResponseMetadata->RequestId;
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves information on the current activity limits for this account.
|
||||||
|
* See http://docs.amazonwebservices.com/ses/latest/APIReference/API_GetSendQuota.html
|
||||||
|
*
|
||||||
|
* @return An array containing information on this account's activity limits.
|
||||||
|
*/
|
||||||
|
public function getSendQuota() {
|
||||||
|
$rest = new SimpleEmailServiceRequest($this, 'GET');
|
||||||
|
$rest->setParameter('Action', 'GetSendQuota');
|
||||||
|
|
||||||
|
$rest = $rest->getResponse();
|
||||||
|
|
||||||
|
$response = array();
|
||||||
|
if(!isset($rest->body)) {
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
|
|
||||||
|
$response['Max24HourSend'] = (string)$rest->body->GetSendQuotaResult->Max24HourSend;
|
||||||
|
$response['MaxSendRate'] = (string)$rest->body->GetSendQuotaResult->MaxSendRate;
|
||||||
|
$response['SentLast24Hours'] = (string)$rest->body->GetSendQuotaResult->SentLast24Hours;
|
||||||
|
$response['RequestId'] = (string)$rest->body->ResponseMetadata->RequestId;
|
||||||
|
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves statistics for the last two weeks of activity on this account.
|
||||||
|
* See http://docs.amazonwebservices.com/ses/latest/APIReference/API_GetSendStatistics.html
|
||||||
|
*
|
||||||
|
* @return An array of activity statistics. Each array item covers a 15-minute period.
|
||||||
|
*/
|
||||||
|
public function getSendStatistics() {
|
||||||
|
$rest = new SimpleEmailServiceRequest($this, 'GET');
|
||||||
|
$rest->setParameter('Action', 'GetSendStatistics');
|
||||||
|
|
||||||
|
$rest = $rest->getResponse();
|
||||||
|
|
||||||
|
$response = array();
|
||||||
|
if(!isset($rest->body)) {
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
|
|
||||||
|
$datapoints = array();
|
||||||
|
foreach($rest->body->GetSendStatisticsResult->SendDataPoints->member as $datapoint) {
|
||||||
|
$p = array();
|
||||||
|
$p['Bounces'] = (string)$datapoint->Bounces;
|
||||||
|
$p['Complaints'] = (string)$datapoint->Complaints;
|
||||||
|
$p['DeliveryAttempts'] = (string)$datapoint->DeliveryAttempts;
|
||||||
|
$p['Rejects'] = (string)$datapoint->Rejects;
|
||||||
|
$p['Timestamp'] = (string)$datapoint->Timestamp;
|
||||||
|
|
||||||
|
$datapoints[] = $p;
|
||||||
|
}
|
||||||
|
|
||||||
|
$response['SendDataPoints'] = $datapoints;
|
||||||
|
$response['RequestId'] = (string)$rest->body->ResponseMetadata->RequestId;
|
||||||
|
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function sendRawEmail($raw) {
|
||||||
|
$rest = new SimpleEmailServiceRequest($this, 'POST');
|
||||||
|
$rest->setParameter('Action', 'SendRawEmail');
|
||||||
|
$rest->setParameter('RawMessage.Data', base64_encode($raw));
|
||||||
|
|
||||||
|
$rest = $rest->getResponse();
|
||||||
|
|
||||||
|
$response['MessageId'] = (string)$rest->body->SendEmailResult->MessageId;
|
||||||
|
$response['RequestId'] = (string)$rest->body->ResponseMetadata->RequestId;
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Given a SimpleEmailServiceMessage object, submits the message to the service for sending.
|
||||||
|
*
|
||||||
|
* @return An array containing the unique identifier for this message and a separate request id.
|
||||||
|
* Returns false if the provided message is missing any required fields.
|
||||||
|
*/
|
||||||
|
public function sendEmail($sesMessage) {
|
||||||
|
if(!$sesMessage->validate()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$rest = new SimpleEmailServiceRequest($this, 'POST');
|
||||||
|
$rest->setParameter('Action', 'SendEmail');
|
||||||
|
|
||||||
|
$i = 1;
|
||||||
|
foreach($sesMessage->to as $to) {
|
||||||
|
$rest->setParameter('Destination.ToAddresses.member.'.$i, $to);
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(is_array($sesMessage->cc)) {
|
||||||
|
$i = 1;
|
||||||
|
foreach($sesMessage->cc as $cc) {
|
||||||
|
$rest->setParameter('Destination.CcAddresses.member.'.$i, $cc);
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(is_array($sesMessage->bcc)) {
|
||||||
|
$i = 1;
|
||||||
|
foreach($sesMessage->bcc as $bcc) {
|
||||||
|
$rest->setParameter('Destination.BccAddresses.member.'.$i, $bcc);
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(is_array($sesMessage->replyto)) {
|
||||||
|
$i = 1;
|
||||||
|
foreach($sesMessage->replyto as $replyto) {
|
||||||
|
$rest->setParameter('ReplyToAddresses.member.'.$i, $replyto);
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$rest->setParameter('Source', $sesMessage->from);
|
||||||
|
|
||||||
|
if($sesMessage->returnpath != null) {
|
||||||
|
$rest->setParameter('ReturnPath', $sesMessage->returnpath);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($sesMessage->subject != null && strlen($sesMessage->subject) > 0) {
|
||||||
|
$rest->setParameter('Message.Subject.Data', $sesMessage->subject);
|
||||||
|
if($sesMessage->subjectCharset != null && strlen($sesMessage->subjectCharset) > 0) {
|
||||||
|
$rest->setParameter('Message.Subject.Charset', $sesMessage->subjectCharset);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if($sesMessage->messagetext != null && strlen($sesMessage->messagetext) > 0) {
|
||||||
|
$rest->setParameter('Message.Body.Text.Data', $sesMessage->messagetext);
|
||||||
|
if($sesMessage->messageTextCharset != null && strlen($sesMessage->messageTextCharset) > 0) {
|
||||||
|
$rest->setParameter('Message.Body.Text.Charset', $sesMessage->messageTextCharset);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($sesMessage->messagehtml != null && strlen($sesMessage->messagehtml) > 0) {
|
||||||
|
$rest->setParameter('Message.Body.Html.Data', $sesMessage->messagehtml);
|
||||||
|
if($sesMessage->messageHtmlCharset != null && strlen($sesMessage->messageHtmlCharset) > 0) {
|
||||||
|
$rest->setParameter('Message.Body.Html.Charset', $sesMessage->messageHtmlCharset);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$rest = $rest->getResponse();
|
||||||
|
|
||||||
|
$response['MessageId'] = (string)$rest->body->SendEmailResult->MessageId;
|
||||||
|
$response['RequestId'] = (string)$rest->body->ResponseMetadata->RequestId;
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Trigger an error message
|
||||||
|
*
|
||||||
|
* @internal Used by member functions to output errors
|
||||||
|
* @param array $error Array containing error information
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function __triggerError($functionname, $error)
|
||||||
|
{
|
||||||
|
if($error == false) {
|
||||||
|
$message = sprintf("SimpleEmailService::%s(): Encountered an error, but no description given", $functionname);
|
||||||
|
}
|
||||||
|
else if(isset($error['curl']) && $error['curl'])
|
||||||
|
{
|
||||||
|
$message = sprintf("SimpleEmailService::%s(): %s %s", $functionname, $error['code'], $error['message']);
|
||||||
|
}
|
||||||
|
else if(isset($error['Error']))
|
||||||
|
{
|
||||||
|
$e = $error['Error'];
|
||||||
|
$message = sprintf("SimpleEmailService::%s(): %s - %s: %s\nRequest Id: %s\n", $functionname, $e['Type'], $e['Code'], $e['Message'], $error['RequestId']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->useExceptions()) {
|
||||||
|
throw new SimpleEmailServiceException($message);
|
||||||
|
} else {
|
||||||
|
trigger_error($message, E_USER_WARNING);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Callback handler for 503 retries.
|
||||||
|
*
|
||||||
|
* @internal Used by SimpleDBRequest to call the user-specified callback, if set
|
||||||
|
* @param $attempt The number of failed attempts so far
|
||||||
|
* @return The retry delay in microseconds, or 0 to stop retrying.
|
||||||
|
*/
|
||||||
|
public function __executeServiceTemporarilyUnavailableRetryDelay($attempt)
|
||||||
|
{
|
||||||
|
if(is_callable($this->__serviceUnavailableRetryDelayCallback)) {
|
||||||
|
$callback = $this->__serviceUnavailableRetryDelayCallback;
|
||||||
|
return $callback($attempt);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
final class SimpleEmailServiceRequest
|
||||||
|
{
|
||||||
|
private $ses, $verb, $parameters = array();
|
||||||
|
public $response;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param string $ses The SimpleEmailService object making this request
|
||||||
|
* @param string $action action
|
||||||
|
* @param string $verb HTTP verb
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
function __construct($ses, $verb) {
|
||||||
|
$this->ses = $ses;
|
||||||
|
$this->verb = $verb;
|
||||||
|
$this->response = new STDClass;
|
||||||
|
$this->response->error = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set request parameter
|
||||||
|
*
|
||||||
|
* @param string $key Key
|
||||||
|
* @param string $value Value
|
||||||
|
* @param boolean $replace Whether to replace the key if it already exists (default true)
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function setParameter($key, $value, $replace = true) {
|
||||||
|
if(!$replace && isset($this->parameters[$key]))
|
||||||
|
{
|
||||||
|
$temp = (array)($this->parameters[$key]);
|
||||||
|
$temp[] = $value;
|
||||||
|
$this->parameters[$key] = $temp;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->parameters[$key] = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the response
|
||||||
|
*
|
||||||
|
* @return object | false
|
||||||
|
*/
|
||||||
|
public function getResponse() {
|
||||||
|
|
||||||
|
$params = array();
|
||||||
|
foreach ($this->parameters as $var => $value)
|
||||||
|
{
|
||||||
|
if(is_array($value))
|
||||||
|
{
|
||||||
|
foreach($value as $v)
|
||||||
|
{
|
||||||
|
$params[] = $var.'='.$this->__customUrlEncode($v);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$params[] = $var.'='.$this->__customUrlEncode($value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sort($params, SORT_STRING);
|
||||||
|
|
||||||
|
// must be in format 'Sun, 06 Nov 1994 08:49:37 GMT'
|
||||||
|
$date = gmdate('D, d M Y H:i:s e');
|
||||||
|
|
||||||
|
$query = implode('&', $params);
|
||||||
|
|
||||||
|
$headers = array();
|
||||||
|
$headers[] = 'Date: '.$date;
|
||||||
|
$headers[] = 'Host: '.$this->ses->getHost();
|
||||||
|
|
||||||
|
$auth = 'AWS3-HTTPS AWSAccessKeyId='.$this->ses->getAccessKey();
|
||||||
|
$auth .= ',Algorithm=HmacSHA256,Signature='.$this->__getSignature($date);
|
||||||
|
$headers[] = 'X-Amzn-Authorization: '.$auth;
|
||||||
|
|
||||||
|
$url = 'https://'.$this->ses->getHost().'/';
|
||||||
|
|
||||||
|
// Basic setup
|
||||||
|
$curl = curl_init();
|
||||||
|
curl_setopt($curl, CURLOPT_USERAGENT, 'SimpleEmailService/php');
|
||||||
|
|
||||||
|
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, ($this->ses->verifyHost() ? 2 : 0));
|
||||||
|
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, ($this->ses->verifyPeer() ? 1 : 0));
|
||||||
|
|
||||||
|
// Request types
|
||||||
|
switch ($this->verb) {
|
||||||
|
case 'GET':
|
||||||
|
$url .= '?'.$query;
|
||||||
|
break;
|
||||||
|
case 'POST':
|
||||||
|
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $this->verb);
|
||||||
|
curl_setopt($curl, CURLOPT_POSTFIELDS, $query);
|
||||||
|
$headers[] = 'Content-Type: application/x-www-form-urlencoded';
|
||||||
|
break;
|
||||||
|
case 'DELETE':
|
||||||
|
$url .= '?'.$query;
|
||||||
|
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE');
|
||||||
|
break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
|
||||||
|
curl_setopt($curl, CURLOPT_HEADER, false);
|
||||||
|
|
||||||
|
curl_setopt($curl, CURLOPT_URL, $url);
|
||||||
|
curl_setopt($curl, CURLOPT_RETURNTRANSFER, false);
|
||||||
|
curl_setopt($curl, CURLOPT_WRITEFUNCTION, array(&$this, '__responseWriteCallback'));
|
||||||
|
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
|
||||||
|
|
||||||
|
// Execute, grab errors
|
||||||
|
if (!curl_exec($curl)) {
|
||||||
|
throw new SimpleEmailServiceException(
|
||||||
|
pht(
|
||||||
|
'Encountered an error while making an HTTP request to Amazon SES '.
|
||||||
|
'(cURL Error #%d): %s',
|
||||||
|
curl_errno($curl),
|
||||||
|
curl_error($curl)));
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->response->code = curl_getinfo($curl, CURLINFO_HTTP_CODE);
|
||||||
|
if ($this->response->code != 200) {
|
||||||
|
throw new SimpleEmailServiceException(
|
||||||
|
pht(
|
||||||
|
'Unexpected HTTP status while making request to Amazon SES: '.
|
||||||
|
'expected 200, got %s.',
|
||||||
|
$this->response->code));
|
||||||
|
}
|
||||||
|
|
||||||
|
@curl_close($curl);
|
||||||
|
|
||||||
|
// Parse body into XML
|
||||||
|
if ($this->response->error === false && isset($this->response->body)) {
|
||||||
|
$this->response->body = simplexml_load_string($this->response->body);
|
||||||
|
|
||||||
|
// Grab SES errors
|
||||||
|
if (!in_array($this->response->code, array(200, 201, 202, 204))
|
||||||
|
&& isset($this->response->body->Error)) {
|
||||||
|
$error = $this->response->body->Error;
|
||||||
|
$output = array();
|
||||||
|
$output['curl'] = false;
|
||||||
|
$output['Error'] = array();
|
||||||
|
$output['Error']['Type'] = (string)$error->Type;
|
||||||
|
$output['Error']['Code'] = (string)$error->Code;
|
||||||
|
$output['Error']['Message'] = (string)$error->Message;
|
||||||
|
$output['RequestId'] = (string)$this->response->body->RequestId;
|
||||||
|
|
||||||
|
$this->response->error = $output;
|
||||||
|
unset($this->response->body);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->response;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CURL write callback
|
||||||
|
*
|
||||||
|
* @param resource &$curl CURL resource
|
||||||
|
* @param string &$data Data
|
||||||
|
* @return integer
|
||||||
|
*/
|
||||||
|
private function __responseWriteCallback(&$curl, &$data) {
|
||||||
|
if(!isset($this->response->body)) $this->response->body = '';
|
||||||
|
$this->response->body .= $data;
|
||||||
|
return strlen($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contributed by afx114
|
||||||
|
* URL encode the parameters as per http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/index.html?Query_QueryAuth.html
|
||||||
|
* PHP's rawurlencode() follows RFC 1738, not RFC 3986 as required by Amazon. The only difference is the tilde (~), so convert it back after rawurlencode
|
||||||
|
* See: http://www.morganney.com/blog/API/AWS-Product-Advertising-API-Requires-a-Signed-Request.php
|
||||||
|
*
|
||||||
|
* @param string $var String to encode
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
private function __customUrlEncode($var) {
|
||||||
|
return str_replace('%7E', '~', rawurlencode($var));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate the auth string using Hmac-SHA256
|
||||||
|
*
|
||||||
|
* @internal Used by SimpleDBRequest::getResponse()
|
||||||
|
* @param string $string String to sign
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
private function __getSignature($string) {
|
||||||
|
return base64_encode(hash_hmac('sha256', $string, $this->ses->getSecretKey(), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
final class SimpleEmailServiceMessage {
|
||||||
|
|
||||||
|
// these are public for convenience only
|
||||||
|
// these are not to be used outside of the SimpleEmailService class!
|
||||||
|
public $to, $cc, $bcc, $replyto;
|
||||||
|
public $from, $returnpath;
|
||||||
|
public $subject, $messagetext, $messagehtml;
|
||||||
|
public $subjectCharset, $messageTextCharset, $messageHtmlCharset;
|
||||||
|
|
||||||
|
function __construct() {
|
||||||
|
$to = array();
|
||||||
|
$cc = array();
|
||||||
|
$bcc = array();
|
||||||
|
$replyto = array();
|
||||||
|
|
||||||
|
$from = null;
|
||||||
|
$returnpath = null;
|
||||||
|
|
||||||
|
$subject = null;
|
||||||
|
$messagetext = null;
|
||||||
|
$messagehtml = null;
|
||||||
|
|
||||||
|
$subjectCharset = null;
|
||||||
|
$messageTextCharset = null;
|
||||||
|
$messageHtmlCharset = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* addTo, addCC, addBCC, and addReplyTo have the following behavior:
|
||||||
|
* If a single address is passed, it is appended to the current list of addresses.
|
||||||
|
* If an array of addresses is passed, that array is merged into the current list.
|
||||||
|
*/
|
||||||
|
function addTo($to) {
|
||||||
|
if(!is_array($to)) {
|
||||||
|
$this->to[] = $to;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$this->to = array_merge($this->to, $to);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function addCC($cc) {
|
||||||
|
if(!is_array($cc)) {
|
||||||
|
$this->cc[] = $cc;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$this->cc = array_merge($this->cc, $cc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function addBCC($bcc) {
|
||||||
|
if(!is_array($bcc)) {
|
||||||
|
$this->bcc[] = $bcc;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$this->bcc = array_merge($this->bcc, $bcc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function addReplyTo($replyto) {
|
||||||
|
if(!is_array($replyto)) {
|
||||||
|
$this->replyto[] = $replyto;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$this->replyto = array_merge($this->replyto, $replyto);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function setFrom($from) {
|
||||||
|
$this->from = $from;
|
||||||
|
}
|
||||||
|
|
||||||
|
function setReturnPath($returnpath) {
|
||||||
|
$this->returnpath = $returnpath;
|
||||||
|
}
|
||||||
|
|
||||||
|
function setSubject($subject) {
|
||||||
|
$this->subject = $subject;
|
||||||
|
}
|
||||||
|
|
||||||
|
function setSubjectCharset($charset) {
|
||||||
|
$this->subjectCharset = $charset;
|
||||||
|
}
|
||||||
|
|
||||||
|
function setMessageFromString($text, $html = null) {
|
||||||
|
$this->messagetext = $text;
|
||||||
|
$this->messagehtml = $html;
|
||||||
|
}
|
||||||
|
|
||||||
|
function setMessageFromFile($textfile, $htmlfile = null) {
|
||||||
|
if(file_exists($textfile) && is_file($textfile) && is_readable($textfile)) {
|
||||||
|
$this->messagetext = file_get_contents($textfile);
|
||||||
|
}
|
||||||
|
if(file_exists($htmlfile) && is_file($htmlfile) && is_readable($htmlfile)) {
|
||||||
|
$this->messagehtml = file_get_contents($htmlfile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function setMessageFromURL($texturl, $htmlurl = null) {
|
||||||
|
$this->messagetext = file_get_contents($texturl);
|
||||||
|
if($htmlurl !== null) {
|
||||||
|
$this->messagehtml = file_get_contents($htmlurl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function setMessageCharset($textCharset, $htmlCharset = null) {
|
||||||
|
$this->messageTextCharset = $textCharset;
|
||||||
|
$this->messageHtmlCharset = $htmlCharset;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Validates whether the message object has sufficient information to submit a request to SES.
|
||||||
|
* This does not guarantee the message will arrive, nor that the request will succeed;
|
||||||
|
* instead, it makes sure that no required fields are missing.
|
||||||
|
*
|
||||||
|
* This is used internally before attempting a SendEmail or SendRawEmail request,
|
||||||
|
* but it can be used outside of this file if verification is desired.
|
||||||
|
* May be useful if e.g. the data is being populated from a form; developers can generally
|
||||||
|
* use this function to verify completeness instead of writing custom logic.
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public function validate() {
|
||||||
|
if(count($this->to) == 0)
|
||||||
|
return false;
|
||||||
|
if($this->from == null || strlen($this->from) == 0)
|
||||||
|
return false;
|
||||||
|
if($this->messagetext == null)
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Thrown by SimpleEmailService when errors occur if you call
|
||||||
|
* enableUseExceptions(true).
|
||||||
|
*/
|
||||||
|
final class SimpleEmailServiceException extends Exception {
|
||||||
|
|
||||||
|
}
|
||||||
610
migration/dedup.php
Normal file
@@ -0,0 +1,610 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$migrate_dedup_users = array();
|
||||||
|
|
||||||
|
$migrate_dedup_users["midiclub"] = "midclub";
|
||||||
|
$migrate_dedup_users["trip"] = "car";
|
||||||
|
$migrate_dedup_users["thunderbolt"] = "thunderbolt16";
|
||||||
|
$migrate_dedup_users["avirnig"] = "beav";
|
||||||
|
$migrate_dedup_users["jeaninmontreal"] = "jeanm";
|
||||||
|
$migrate_dedup_users["nneo"] = "nneonneo";
|
||||||
|
$migrate_dedup_users["ebonyj"] = "jim";
|
||||||
|
$migrate_dedup_users["tnr"] = "ichem";
|
||||||
|
$migrate_dedup_users["archus"] = "rstehwien";
|
||||||
|
$migrate_dedup_users["kalysto"] = "kalar";
|
||||||
|
$migrate_dedup_users["eloe"] = "mouvanteloe";
|
||||||
|
$migrate_dedup_users["erdling"] = "eitj";
|
||||||
|
$migrate_dedup_users["cwinebrinner"] = "chuck_1027";
|
||||||
|
$migrate_dedup_users["foo"] = "mfranz";
|
||||||
|
$migrate_dedup_users["f00fbug"] = "viviowns";
|
||||||
|
$migrate_dedup_users["olavbalm"] = "olav";
|
||||||
|
$migrate_dedup_users["kapong"] = "el_kapong";
|
||||||
|
$migrate_dedup_users["thorax"] = "rofthorax";
|
||||||
|
$migrate_dedup_users["kramer3d"] = "asdfghytrewq";
|
||||||
|
$migrate_dedup_users["reevee"] = "vee";
|
||||||
|
$migrate_dedup_users["matzeb"] = "matzebraun";
|
||||||
|
$migrate_dedup_users["jmsoler"] = "jms";
|
||||||
|
$migrate_dedup_users["aqa"] = "angelito";
|
||||||
|
$migrate_dedup_users["blendorphin"] = "blenergetic";
|
||||||
|
$migrate_dedup_users["paolo"] = "jody";
|
||||||
|
$migrate_dedup_users["blendedidea"] = "chubango";
|
||||||
|
$migrate_dedup_users["ruiramos"] = "p3ctu5";
|
||||||
|
$migrate_dedup_users["head_chees"] = "vassilizaitsaf";
|
||||||
|
$migrate_dedup_users["kiernan"] = "rofthorax";
|
||||||
|
$migrate_dedup_users["olaf_arnold"] = "olafarnold";
|
||||||
|
$migrate_dedup_users["joseyanesaltos"] = "joseyanes";
|
||||||
|
$migrate_dedup_users["nicholasfrancis"] = "nicholas";
|
||||||
|
$migrate_dedup_users["briancary"] = "brinux";
|
||||||
|
$migrate_dedup_users["piotrek"] = "ccpiotr";
|
||||||
|
$migrate_dedup_users["slashdev"] = "colonel_panic";
|
||||||
|
$migrate_dedup_users["rj2004"] = "rjblender";
|
||||||
|
$migrate_dedup_users["jeffreymcgrew"] = "toast";
|
||||||
|
$migrate_dedup_users["hendersj"] = "jhenderson";
|
||||||
|
$migrate_dedup_users["pierpy"] = "pier";
|
||||||
|
$migrate_dedup_users["buschhardt"] = "ishtar";
|
||||||
|
$migrate_dedup_users["timlesher"] = "tim";
|
||||||
|
$migrate_dedup_users["tizmo"] = "timlucas";
|
||||||
|
$migrate_dedup_users["pprandin"] = "pashaweb";
|
||||||
|
$migrate_dedup_users["servivo"] = "taz";
|
||||||
|
$migrate_dedup_users["stabby"] = "xingo";
|
||||||
|
$migrate_dedup_users["jimmydietulpe"] = "jimmadietulpe";
|
||||||
|
$migrate_dedup_users["palmnet"] = "palmer";
|
||||||
|
$migrate_dedup_users["graphique-chti"] = "gcprod";
|
||||||
|
$migrate_dedup_users["dreamkatana1"] = "dreamkatana";
|
||||||
|
$migrate_dedup_users["wolverine"] = "shane";
|
||||||
|
$migrate_dedup_users["schwarz"] = "wene";
|
||||||
|
$migrate_dedup_users["justtesting"] = "levon";
|
||||||
|
$migrate_dedup_users["erwin_xnan"] = "erwin";
|
||||||
|
$migrate_dedup_users["zack"] = "krystof";
|
||||||
|
$migrate_dedup_users["fabinator31"] = "fab31";
|
||||||
|
$migrate_dedup_users["themilkman"] = "cliftonium";
|
||||||
|
$migrate_dedup_users["etiennel"] = "choupi";
|
||||||
|
$migrate_dedup_users["m_i_c_h_e_l"] = "michaels";
|
||||||
|
$migrate_dedup_users["techrolla"] = "muffinpeddler";
|
||||||
|
$migrate_dedup_users["fireflymantis"] = "twilight";
|
||||||
|
$migrate_dedup_users["pinucset0"] = "pinucset";
|
||||||
|
$migrate_dedup_users["franzrogar"] = "blender-i18n-po";
|
||||||
|
$migrate_dedup_users["pinucset1"] = "pinucset";
|
||||||
|
$migrate_dedup_users["pinucset3"] = "pinucset";
|
||||||
|
$migrate_dedup_users["threeddream"] = "x-axis";
|
||||||
|
$migrate_dedup_users["mudbot"] = "laurence";
|
||||||
|
$migrate_dedup_users["ligeyx"] = "ligey";
|
||||||
|
$migrate_dedup_users["dreas"] = "dre";
|
||||||
|
$migrate_dedup_users["joorvapl"] = "joorva";
|
||||||
|
$migrate_dedup_users["voyage"] = "xenithi";
|
||||||
|
$migrate_dedup_users["azter"] = "azterix";
|
||||||
|
$migrate_dedup_users["lapinbleu"] = "simeon";
|
||||||
|
$migrate_dedup_users["emmanuel_t"] = "emmanuel";
|
||||||
|
$migrate_dedup_users["cricket"] = "gku";
|
||||||
|
$migrate_dedup_users["justanumber"] = "mad4linux";
|
||||||
|
$migrate_dedup_users["johnnyen"] = "johnny";
|
||||||
|
$migrate_dedup_users["leiota"] = "marcopolo";
|
||||||
|
$migrate_dedup_users["blackstorm"] = "ikbendirk";
|
||||||
|
$migrate_dedup_users["richie"] = "ligey";
|
||||||
|
$migrate_dedup_users["mrcarnivore2"] = "mrcarnivore";
|
||||||
|
$migrate_dedup_users["muddym1nd"] = "muddymind";
|
||||||
|
$migrate_dedup_users["eumesmo"] = "vasco_da_gama";
|
||||||
|
$migrate_dedup_users["ph-kby"] = "olav";
|
||||||
|
$migrate_dedup_users["piotrek_"] = "ccpiotr";
|
||||||
|
$migrate_dedup_users["joaquin"] = "prospero";
|
||||||
|
$migrate_dedup_users["konrad_haenel"] = "konrad8ha";
|
||||||
|
$migrate_dedup_users["benstabler"] = "lightning";
|
||||||
|
$migrate_dedup_users["gustav"] = "draknoid";
|
||||||
|
$migrate_dedup_users["slikdigit"] = "bassamk";
|
||||||
|
$migrate_dedup_users["karlerlandsen"] = "lethalsidep";
|
||||||
|
$migrate_dedup_users["djwillmsoh"] = "djw1";
|
||||||
|
$migrate_dedup_users["aschmitz"] = "root_42";
|
||||||
|
$migrate_dedup_users["malfunc"] = "mcq";
|
||||||
|
$migrate_dedup_users["m_jack"] = "jack";
|
||||||
|
$migrate_dedup_users["davey"] = "madcow";
|
||||||
|
$migrate_dedup_users["iraytrace"] = "butler";
|
||||||
|
$migrate_dedup_users["duser"] = "mslechols";
|
||||||
|
$migrate_dedup_users["akito"] = "ton";
|
||||||
|
$migrate_dedup_users["jochenschmitt"] = "s4504kr";
|
||||||
|
$migrate_dedup_users["digikiller"] = "ace1";
|
||||||
|
$migrate_dedup_users["shzhc"] = "zzzz";
|
||||||
|
$migrate_dedup_users["cyrilbrulebois"] = "kibi";
|
||||||
|
$migrate_dedup_users["themushroom"] = "draknoid";
|
||||||
|
$migrate_dedup_users["zinkmaster"] = "mariolink";
|
||||||
|
$migrate_dedup_users["ashsid"] = "ash";
|
||||||
|
$migrate_dedup_users["novato"] = "jimenez";
|
||||||
|
$migrate_dedup_users["jadie_p"] = "jadie";
|
||||||
|
$migrate_dedup_users["neshshah007"] = "neshrai";
|
||||||
|
$migrate_dedup_users["ryanshow"] = "tankcoder";
|
||||||
|
$migrate_dedup_users["squarelinesq"] = "squareline";
|
||||||
|
$migrate_dedup_users["virginijus"] = "ernestas1994";
|
||||||
|
$migrate_dedup_users["renderdemon"] = "pnio";
|
||||||
|
$migrate_dedup_users["kwab"] = "kobi";
|
||||||
|
$migrate_dedup_users["peterjonckheere"] = "jonckheerep";
|
||||||
|
$migrate_dedup_users["vidar"] = "vidarino";
|
||||||
|
$migrate_dedup_users["sapjohannes"] = "johannesje";
|
||||||
|
$migrate_dedup_users["youri"] = "ayers";
|
||||||
|
$migrate_dedup_users["theamiman"] = "amiman";
|
||||||
|
$migrate_dedup_users["chrisg_ksi"] = "red_planet";
|
||||||
|
$migrate_dedup_users["blenderorgfan"] = "franciscosilva";
|
||||||
|
$migrate_dedup_users["ericd"] = "ericdrayer";
|
||||||
|
$migrate_dedup_users["asdfghjkl2"] = "asdfghjkl";
|
||||||
|
$migrate_dedup_users["quorn"] = "alienit";
|
||||||
|
$migrate_dedup_users["daan221"] = "phoenix221";
|
||||||
|
$migrate_dedup_users["user"] = "mslechols";
|
||||||
|
$migrate_dedup_users["pyb"] = "lomperillo";
|
||||||
|
$migrate_dedup_users["g56"] = "gwald";
|
||||||
|
$migrate_dedup_users["ausland"] = "vots";
|
||||||
|
$migrate_dedup_users["quillinan"] = "orinoco";
|
||||||
|
$migrate_dedup_users["t3tsuj1n"] = "bootsheoz";
|
||||||
|
$migrate_dedup_users["molflesh"] = "melflash";
|
||||||
|
$migrate_dedup_users["rickta59"] = "aerobicsboy";
|
||||||
|
$migrate_dedup_users["nolopoly"] = "lopoly";
|
||||||
|
$migrate_dedup_users["jeel"] = "jl57";
|
||||||
|
$migrate_dedup_users["brianmccumber2"] = "brianmccumber";
|
||||||
|
$migrate_dedup_users["mouette"] = "moutte";
|
||||||
|
$migrate_dedup_users["wout"] = "wonderingwout";
|
||||||
|
$migrate_dedup_users["fatfinger"] = "mattyc";
|
||||||
|
$migrate_dedup_users["nathangull"] = "nateg";
|
||||||
|
$migrate_dedup_users["tampadave"] = "dkmweeks";
|
||||||
|
$migrate_dedup_users["sausages"] = "lethargic";
|
||||||
|
$migrate_dedup_users["chris3d"] = "chrisbd";
|
||||||
|
$migrate_dedup_users["kaito"] = "ton";
|
||||||
|
$migrate_dedup_users["akirasan"] = "akira_b";
|
||||||
|
$migrate_dedup_users["fiddle"] = "rayf";
|
||||||
|
$migrate_dedup_users["bald"] = "manu";
|
||||||
|
$migrate_dedup_users["mistermelquin"] = "melquin";
|
||||||
|
$migrate_dedup_users["kofish"] = "kingdomoffish";
|
||||||
|
$migrate_dedup_users["onanj"] = "orangee";
|
||||||
|
$migrate_dedup_users["jasoncarrier"] = "jason";
|
||||||
|
$migrate_dedup_users["joelgodin"] = "jenniferblender";
|
||||||
|
$migrate_dedup_users["oranj"] = "orangee";
|
||||||
|
$migrate_dedup_users["schdeb"] = "schmidtcristian";
|
||||||
|
$migrate_dedup_users["bastian"] = "angerb";
|
||||||
|
$migrate_dedup_users["patko"] = "patco";
|
||||||
|
$migrate_dedup_users["arakyd666"] = "arakyd";
|
||||||
|
$migrate_dedup_users["karimf"] = "rim-k";
|
||||||
|
$migrate_dedup_users["nletwory"] = "jestertestest";
|
||||||
|
$migrate_dedup_users["mansoorhyder"] = "mansoor";
|
||||||
|
$migrate_dedup_users["rocketmagnet"] = "steventr";
|
||||||
|
$migrate_dedup_users["thekernal"] = "kernal";
|
||||||
|
$migrate_dedup_users["satom"] = "satriatomat";
|
||||||
|
$migrate_dedup_users["a624"] = "a623";
|
||||||
|
$migrate_dedup_users["jldavilacasares"] = "muki";
|
||||||
|
$migrate_dedup_users["segersj"] = "segers";
|
||||||
|
$migrate_dedup_users["hoisan49"] = "hoisan";
|
||||||
|
$migrate_dedup_users["j_bessette"] = "linuxpimp20";
|
||||||
|
$migrate_dedup_users["andreas999"] = "andreas";
|
||||||
|
$migrate_dedup_users["dusan"] = "dsc512";
|
||||||
|
$migrate_dedup_users["dx-mon"] = "mantr100";
|
||||||
|
$migrate_dedup_users["ilislab"] = "ids";
|
||||||
|
$migrate_dedup_users["rben"] = "raybenjamin";
|
||||||
|
$migrate_dedup_users["sphere"] = "dysonsphere";
|
||||||
|
$migrate_dedup_users["highlife22"] = "highlife";
|
||||||
|
$migrate_dedup_users["yonarw"] = "yona";
|
||||||
|
$migrate_dedup_users["kryptic89"] = "kryptic";
|
||||||
|
$migrate_dedup_users["axelp"] = "axel";
|
||||||
|
$migrate_dedup_users["perebalsach"] = "fog22";
|
||||||
|
$migrate_dedup_users["alogerson"] = "gerson";
|
||||||
|
$migrate_dedup_users["cotejrp"] = "cotejrp1";
|
||||||
|
$migrate_dedup_users["tak"] = "carlosjamesr";
|
||||||
|
$migrate_dedup_users["ziddy"] = "anishchandran";
|
||||||
|
$migrate_dedup_users["asdgz"] = "blenderiseur";
|
||||||
|
$migrate_dedup_users["cdated"] = "cdated257";
|
||||||
|
$migrate_dedup_users["jayrkalugin"] = "jayr";
|
||||||
|
$migrate_dedup_users["zeemzoet"] = "johannesje";
|
||||||
|
$migrate_dedup_users["duo"] = "ambyra";
|
||||||
|
$migrate_dedup_users["philb"] = "chewbacca";
|
||||||
|
$migrate_dedup_users["tzi"] = "izt";
|
||||||
|
$migrate_dedup_users["squirrelthetire"] = "squirrel-tire";
|
||||||
|
$migrate_dedup_users["anwyn"] = "sugarshark";
|
||||||
|
$migrate_dedup_users["a2z"] = "a2zaa";
|
||||||
|
$migrate_dedup_users["fxrex"] = "femi";
|
||||||
|
$migrate_dedup_users["alethewiz"] = "mfaso68";
|
||||||
|
$migrate_dedup_users["noseferrit"] = "billybong";
|
||||||
|
$migrate_dedup_users["fcali"] = "fabz";
|
||||||
|
$migrate_dedup_users["bbirchler"] = "bblender";
|
||||||
|
$migrate_dedup_users["oslosewers"] = "oslo";
|
||||||
|
$migrate_dedup_users["wtrsltnk"] = "wtr";
|
||||||
|
$migrate_dedup_users["cspohst"] = "spohst";
|
||||||
|
$migrate_dedup_users["warhawk08"] = "warhawk1990";
|
||||||
|
$migrate_dedup_users["magick_crow"] = "magickcrow";
|
||||||
|
$migrate_dedup_users["guillaumem"] = "guillaume";
|
||||||
|
$migrate_dedup_users["jwitthuhn"] = "rahu";
|
||||||
|
$migrate_dedup_users["fmehigan"] = "frank_me";
|
||||||
|
$migrate_dedup_users["ilissys"] = "ids";
|
||||||
|
$migrate_dedup_users["supermoaaa"] = "moaaa";
|
||||||
|
$migrate_dedup_users["nwmatt"] = "mhenley";
|
||||||
|
$migrate_dedup_users["bezel"] = "xshell";
|
||||||
|
$migrate_dedup_users["rebuss"] = "studioa";
|
||||||
|
$migrate_dedup_users["geonom"] = "geoadel";
|
||||||
|
$migrate_dedup_users["seldan"] = "farakon";
|
||||||
|
$migrate_dedup_users["kuru76"] = "kcorbin";
|
||||||
|
$migrate_dedup_users["kapil"] = "kapilbedarkar";
|
||||||
|
$migrate_dedup_users["henryiii"] = "henryschreiner";
|
||||||
|
$migrate_dedup_users["pateamcarl"] = "carlhuth";
|
||||||
|
$migrate_dedup_users["kamen"] = "bigbob1993";
|
||||||
|
$migrate_dedup_users["olddemon"] = "old_demon";
|
||||||
|
$migrate_dedup_users["draklaw2"] = "draklaw";
|
||||||
|
$migrate_dedup_users["ksdlee"] = "kdlee";
|
||||||
|
$migrate_dedup_users["xource"] = "admix";
|
||||||
|
$migrate_dedup_users["invertednormal"] = "smokebox46and2";
|
||||||
|
$migrate_dedup_users["feelgoodcomics"] = "onlygoodwin";
|
||||||
|
$migrate_dedup_users["glorund"] = "undolaure";
|
||||||
|
$migrate_dedup_users["soulofsound"] = "johnnym";
|
||||||
|
$migrate_dedup_users["ghigi123"] = "ghigi";
|
||||||
|
$migrate_dedup_users["stefanvoigthpi"] = "derstefan";
|
||||||
|
$migrate_dedup_users["dblenderv"] = "default";
|
||||||
|
$migrate_dedup_users["ophiocus"] = "oneliner";
|
||||||
|
$migrate_dedup_users["colleywrks"] = "colley";
|
||||||
|
$migrate_dedup_users["fogy"] = "fog22";
|
||||||
|
$migrate_dedup_users["vidarn"] = "bida70";
|
||||||
|
$migrate_dedup_users["kevin"] = "goblender2541";
|
||||||
|
$migrate_dedup_users["tisachris"] = "warflight";
|
||||||
|
$migrate_dedup_users["personalex2"] = "personalex";
|
||||||
|
$migrate_dedup_users["polypa"] = "lile";
|
||||||
|
$migrate_dedup_users["i4dnf"] = "emilian";
|
||||||
|
$migrate_dedup_users["nitalleb"] = "singleman";
|
||||||
|
$migrate_dedup_users["tcgodoy"] = "godoy";
|
||||||
|
$migrate_dedup_users["joorva_pl"] = "joorva";
|
||||||
|
$migrate_dedup_users["sex"] = "xest";
|
||||||
|
$migrate_dedup_users["chipmunk"] = "ignatz";
|
||||||
|
$migrate_dedup_users["schalmagne"] = "chalmagne";
|
||||||
|
$migrate_dedup_users["michalziulek"] = "eneida";
|
||||||
|
$migrate_dedup_users["jeeps"] = "jeepster";
|
||||||
|
$migrate_dedup_users["yain"] = "chaos";
|
||||||
|
$migrate_dedup_users["amadio"] = "marble";
|
||||||
|
$migrate_dedup_users["javiere"] = "javierchavez";
|
||||||
|
$migrate_dedup_users["drmzperx"] = "mzperx";
|
||||||
|
$migrate_dedup_users["sebastianreaser"] = "sebastian0";
|
||||||
|
$migrate_dedup_users["idolon"] = "spadija";
|
||||||
|
$migrate_dedup_users["alanhzhcn"] = "alanhzh";
|
||||||
|
$migrate_dedup_users["jeanc"] = "jean";
|
||||||
|
$migrate_dedup_users["transblue2"] = "transblue";
|
||||||
|
$migrate_dedup_users["cesarwilfredo"] = "cesar";
|
||||||
|
$migrate_dedup_users["nspyr"] = "spiderfire";
|
||||||
|
$migrate_dedup_users["supermegamoaaa"] = "moaaa";
|
||||||
|
$migrate_dedup_users["firetiger"] = "opensolution";
|
||||||
|
$migrate_dedup_users["skarg"] = "cados";
|
||||||
|
$migrate_dedup_users["realheadcrusher"] = "danigr";
|
||||||
|
$migrate_dedup_users["kpg"] = "nihylius";
|
||||||
|
$migrate_dedup_users["tft"] = "tft67";
|
||||||
|
$migrate_dedup_users["storabbarn"] = "morre";
|
||||||
|
$migrate_dedup_users["bacurau"] = "roger_roo";
|
||||||
|
$migrate_dedup_users["alisari"] = "parasoley";
|
||||||
|
$migrate_dedup_users["skiski"] = "superrom";
|
||||||
|
$migrate_dedup_users["halfninja"] = "nickh";
|
||||||
|
$migrate_dedup_users["drell_develop"] = "drellex";
|
||||||
|
$migrate_dedup_users["highlif3"] = "highlife";
|
||||||
|
$migrate_dedup_users["broggsim1"] = "broggsim";
|
||||||
|
$migrate_dedup_users["blendermanuci"] = "yunior88";
|
||||||
|
$migrate_dedup_users["jpt9"] = "jtuttle";
|
||||||
|
$migrate_dedup_users["farrer"] = "farpro";
|
||||||
|
$migrate_dedup_users["badcheez"] = "randall";
|
||||||
|
$migrate_dedup_users["leewj_"] = "lohns";
|
||||||
|
$migrate_dedup_users["martin107"] = "martinfrances";
|
||||||
|
$migrate_dedup_users["dedpan"] = "tberghuis";
|
||||||
|
$migrate_dedup_users["whiterabbit"] = "dreamscapearts";
|
||||||
|
$migrate_dedup_users["shuvro"] = "shuvro05";
|
||||||
|
$migrate_dedup_users["anichandru"] = "anishchandran";
|
||||||
|
$migrate_dedup_users["ncaralph"] = "ralphdoctorow";
|
||||||
|
$migrate_dedup_users["nlongchamps"] = "nlong";
|
||||||
|
$migrate_dedup_users["mawi37"] = "mawi";
|
||||||
|
$migrate_dedup_users["rizla"] = "jay";
|
||||||
|
$migrate_dedup_users["jeh"] = "mirkril";
|
||||||
|
$migrate_dedup_users["b-fighter"] = "fanatic";
|
||||||
|
$migrate_dedup_users["wasamonkey"] = "wasa";
|
||||||
|
$migrate_dedup_users["nicola"] = "martin45";
|
||||||
|
$migrate_dedup_users["method-es"] = "method";
|
||||||
|
$migrate_dedup_users["pablow"] = "warhole";
|
||||||
|
$migrate_dedup_users["alanishzh"] = "alanhzh";
|
||||||
|
$migrate_dedup_users["thunder947"] = "thunder";
|
||||||
|
$migrate_dedup_users["yijimi"] = "roler";
|
||||||
|
$migrate_dedup_users["jaydenb"] = "logidude";
|
||||||
|
$migrate_dedup_users["leandropolus"] = "leandrosz";
|
||||||
|
$migrate_dedup_users["ibi002"] = "ibi001";
|
||||||
|
$migrate_dedup_users["hakanortasoz"] = "tayfax";
|
||||||
|
$migrate_dedup_users["enur"] = "rune";
|
||||||
|
$migrate_dedup_users["dsuesse"] = "qiip";
|
||||||
|
$migrate_dedup_users["bipedlaboratory"] = "redmetal";
|
||||||
|
$migrate_dedup_users["codeyhanson"] = "codey";
|
||||||
|
$migrate_dedup_users["alphonso_b"] = "alfonso_b";
|
||||||
|
$migrate_dedup_users["surreal6"] = "carlospadial";
|
||||||
|
$migrate_dedup_users["kralizek"] = "kral";
|
||||||
|
$migrate_dedup_users["kfrechet"] = "keithfr";
|
||||||
|
$migrate_dedup_users["jwedlake"] = "joshwedlake";
|
||||||
|
$migrate_dedup_users["westie630"] = "bully";
|
||||||
|
$migrate_dedup_users["fictional"] = "icefire";
|
||||||
|
$migrate_dedup_users["zelozelos"] = "zelozelos1";
|
||||||
|
$migrate_dedup_users["dragonlord"] = "acuena";
|
||||||
|
$migrate_dedup_users["mrcheese"] = "jpeg";
|
||||||
|
$migrate_dedup_users["willemverwey"] = "dandandan";
|
||||||
|
$migrate_dedup_users["jhed"] = "anton_foy";
|
||||||
|
$migrate_dedup_users["treacy1077"] = "briant";
|
||||||
|
$migrate_dedup_users["xest"] = "xembie";
|
||||||
|
$migrate_dedup_users["cyphl25"] = "jmsfreezer";
|
||||||
|
$migrate_dedup_users["wynk"] = "wynn";
|
||||||
|
$migrate_dedup_users["trock2957"] = "trock";
|
||||||
|
$migrate_dedup_users["mr_bomb"] = "carter24";
|
||||||
|
$migrate_dedup_users["nikolaus"] = "tortellini";
|
||||||
|
$migrate_dedup_users["pegasus_001"] = "pegasus001";
|
||||||
|
$migrate_dedup_users["fayte"] = "fayte220";
|
||||||
|
$migrate_dedup_users["jagang_8"] = "jagang";
|
||||||
|
$migrate_dedup_users["thetwom"] = "moe";
|
||||||
|
$migrate_dedup_users["kevlareditor"] = "klthomas";
|
||||||
|
$migrate_dedup_users["damien_deom"] = "dams";
|
||||||
|
$migrate_dedup_users["reynantem"] = "reynante";
|
||||||
|
$migrate_dedup_users["hiralm01"] = "hiralm";
|
||||||
|
$migrate_dedup_users["radix7"] = "wyldethang";
|
||||||
|
$migrate_dedup_users["puppetm"] = "puppetmaster";
|
||||||
|
$migrate_dedup_users["vimax"] = "vimaxus";
|
||||||
|
$migrate_dedup_users["mozzy69"] = "lyndon";
|
||||||
|
$migrate_dedup_users["vitranaccad"] = "thestorm74";
|
||||||
|
$migrate_dedup_users["kj12345"] = "kevinjames";
|
||||||
|
$migrate_dedup_users["foinix"] = "mrnoodle";
|
||||||
|
$migrate_dedup_users["shizu"] = "sntulix";
|
||||||
|
$migrate_dedup_users["kukulcangod23"] = "kukulcangod";
|
||||||
|
$migrate_dedup_users["piliq"] = "qpblendpolis";
|
||||||
|
$migrate_dedup_users["benvad"] = "vbenny";
|
||||||
|
$migrate_dedup_users["fgribben"] = "sharkey";
|
||||||
|
$migrate_dedup_users["makospince"] = "mako_spince";
|
||||||
|
$migrate_dedup_users["ablenderuser"] = "pancakeface";
|
||||||
|
$migrate_dedup_users["axelphi"] = "axel";
|
||||||
|
$migrate_dedup_users["josiasbh"] = "josias";
|
||||||
|
$migrate_dedup_users["mattsix"] = "majawe";
|
||||||
|
$migrate_dedup_users["duarte_ramos"] = "dphantom";
|
||||||
|
$migrate_dedup_users["killogge"] = "muraj";
|
||||||
|
$migrate_dedup_users["luka"] = "omgwtfbbq";
|
||||||
|
$migrate_dedup_users["chromemonkey"] = "brian651msp";
|
||||||
|
$migrate_dedup_users["e_d_i"] = "ide";
|
||||||
|
$migrate_dedup_users["mrhaynesy"] = "haynesy";
|
||||||
|
$migrate_dedup_users["imagineering"] = "imagineer";
|
||||||
|
$migrate_dedup_users["virgiliovasconc"] = "virgilio";
|
||||||
|
$migrate_dedup_users["blenderlb57"] = "louigi";
|
||||||
|
$migrate_dedup_users["nick65"] = "dgnicola";
|
||||||
|
$migrate_dedup_users["mmatthews"] = "mamatthews";
|
||||||
|
$migrate_dedup_users["gerwood"] = "arilian";
|
||||||
|
$migrate_dedup_users["xsidmax"] = "xsi";
|
||||||
|
$migrate_dedup_users["mix-yag"] = "aynahsim";
|
||||||
|
$migrate_dedup_users["wpthomas"] = "tallguy";
|
||||||
|
$migrate_dedup_users["bp007"] = "bender007";
|
||||||
|
$migrate_dedup_users["emach"] = "eon4blender";
|
||||||
|
$migrate_dedup_users["alfclement"] = "alfc";
|
||||||
|
$migrate_dedup_users["blenderwell"] = "goplexian";
|
||||||
|
$migrate_dedup_users["asebastianr"] = "sebastian0";
|
||||||
|
$migrate_dedup_users["joepal1976"] = "joepal";
|
||||||
|
$migrate_dedup_users["chertov"] = "lestat";
|
||||||
|
$migrate_dedup_users["djela63"] = "jerominovich";
|
||||||
|
$migrate_dedup_users["lppinto"] = "lpciper";
|
||||||
|
$migrate_dedup_users["prana"] = "nomath";
|
||||||
|
$migrate_dedup_users["sarubadoru"] = "salvador";
|
||||||
|
$migrate_dedup_users["rarebit"] = "rawstar7";
|
||||||
|
$migrate_dedup_users["hikikamori"] = "hikkikamori";
|
||||||
|
$migrate_dedup_users["mrduke"] = "drop";
|
||||||
|
$migrate_dedup_users["deetee"] = "dertee";
|
||||||
|
$migrate_dedup_users["woooooah"] = "noxwell";
|
||||||
|
$migrate_dedup_users["macoss"] = "ossmac";
|
||||||
|
$migrate_dedup_users["bunnyboy212"] = "blender_buddie";
|
||||||
|
$migrate_dedup_users["maxgrip"] = "czarek";
|
||||||
|
$migrate_dedup_users["tentonman"] = "titandtat";
|
||||||
|
$migrate_dedup_users["jabozzo"] = "bozzo";
|
||||||
|
$migrate_dedup_users["reinways"] = "reinw";
|
||||||
|
$migrate_dedup_users["petergk"] = "nihylius";
|
||||||
|
$migrate_dedup_users["zphr3000"] = "zphr";
|
||||||
|
$migrate_dedup_users["ruivo"] = "andreh";
|
||||||
|
$migrate_dedup_users["kosta"] = "kgd";
|
||||||
|
$migrate_dedup_users["delter"] = "dertee";
|
||||||
|
$migrate_dedup_users["jmiller"] = "lethargic";
|
||||||
|
$migrate_dedup_users["dealga"] = "zeffii";
|
||||||
|
$migrate_dedup_users["bogey"] = "daveh";
|
||||||
|
$migrate_dedup_users["silencebe"] = "silence";
|
||||||
|
$migrate_dedup_users["temozarela"] = "gorn";
|
||||||
|
$migrate_dedup_users["tischite"] = "greenbutton";
|
||||||
|
$migrate_dedup_users["buisson"] = "dinodino";
|
||||||
|
$migrate_dedup_users["cfox"] = "colinfox";
|
||||||
|
$migrate_dedup_users["hunkadoodle"] = "hunkadoodledoo";
|
||||||
|
$migrate_dedup_users["jlwitthuhn"] = "rahu";
|
||||||
|
$migrate_dedup_users["hvfrancesco"] = "hva";
|
||||||
|
$migrate_dedup_users["hazim-jamal"] = "hazim1";
|
||||||
|
$migrate_dedup_users["aurosutru"] = "tlm";
|
||||||
|
$migrate_dedup_users["pierrea"] = "pier2";
|
||||||
|
$migrate_dedup_users["zoon"] = "zoonpolygonikon";
|
||||||
|
$migrate_dedup_users["gruntbatch"] = "carmichael";
|
||||||
|
$migrate_dedup_users["petru"] = "virusanti";
|
||||||
|
$migrate_dedup_users["mikeh74"] = "mikeh";
|
||||||
|
$migrate_dedup_users["sugoi"] = "juntunen";
|
||||||
|
$migrate_dedup_users["bartje"] = "bartart3d";
|
||||||
|
$migrate_dedup_users["yaoyansi"] = "yaoyansi2";
|
||||||
|
$migrate_dedup_users["rafek"] = "rafek_finearts";
|
||||||
|
$migrate_dedup_users["caspern"] = "caspernilsson";
|
||||||
|
$migrate_dedup_users["lee"] = "s_random";
|
||||||
|
$migrate_dedup_users["sparky"] = "mmikkelsen";
|
||||||
|
$migrate_dedup_users["wigglyframes"] = "rene";
|
||||||
|
$migrate_dedup_users["kroni"] = "kronos";
|
||||||
|
$migrate_dedup_users["xgl_asyliax"] = "xglasyliax";
|
||||||
|
$migrate_dedup_users["blendeador"] = "luisperosio";
|
||||||
|
$migrate_dedup_users["kaos1986"] = "kaos86";
|
||||||
|
$migrate_dedup_users["adamdoyle"] = "advs89";
|
||||||
|
$migrate_dedup_users["kahenraz"] = "mistrel";
|
||||||
|
$migrate_dedup_users["ccliffe"] = "cjcliffe";
|
||||||
|
$migrate_dedup_users["nullfied"] = "xercesblue";
|
||||||
|
$migrate_dedup_users["dustyghost"] = "dustbin1_uk";
|
||||||
|
$migrate_dedup_users["claaskuhnen"] = "cekuhnendev";
|
||||||
|
$migrate_dedup_users["vercingetorix"] = "diamond_rust";
|
||||||
|
$migrate_dedup_users["plugboy"] = "centerlaw";
|
||||||
|
$migrate_dedup_users["rben13"] = "raybenjamin";
|
||||||
|
$migrate_dedup_users["deangiberson"] = "voidptr";
|
||||||
|
$migrate_dedup_users["makeitwork"] = "bboybram";
|
||||||
|
$migrate_dedup_users["iljosli"] = "jos";
|
||||||
|
$migrate_dedup_users["slowan"] = "slovan";
|
||||||
|
$migrate_dedup_users["mooonwalkercz"] = "mooonwalker";
|
||||||
|
$migrate_dedup_users["tapplek"] = "tapple";
|
||||||
|
$migrate_dedup_users["blendmond"] = "cornix";
|
||||||
|
$migrate_dedup_users["giorgiomartini"] = "tweakingknobs";
|
||||||
|
$migrate_dedup_users["davidray"] = "deadman";
|
||||||
|
$migrate_dedup_users["justthisguy"] = "nyctef";
|
||||||
|
$migrate_dedup_users["logobar"] = "freyer";
|
||||||
|
$migrate_dedup_users["zooo"] = "leon_cheung";
|
||||||
|
$migrate_dedup_users["josiasalexandre"] = "josias";
|
||||||
|
$migrate_dedup_users["tsukiko_chan"] = "tsukikochan";
|
||||||
|
$migrate_dedup_users["akira_san"] = "akira_b";
|
||||||
|
$migrate_dedup_users["walberti"] = "walbertievarist";
|
||||||
|
$migrate_dedup_users["astro"] = "tnboma";
|
||||||
|
$migrate_dedup_users["mccx"] = "mcq";
|
||||||
|
$migrate_dedup_users["daa84"] = "daa";
|
||||||
|
$migrate_dedup_users["sivert3"] = "cent";
|
||||||
|
$migrate_dedup_users["twentyone"] = "glade";
|
||||||
|
$migrate_dedup_users["endi2"] = "endi";
|
||||||
|
$migrate_dedup_users["jamesr"] = "james_r";
|
||||||
|
$migrate_dedup_users["reece"] = "reecerobinson";
|
||||||
|
$migrate_dedup_users["dustractor"] = "bpygrams";
|
||||||
|
$migrate_dedup_users["pencilhead"] = "pencil-head";
|
||||||
|
$migrate_dedup_users["toml"] = "tomol";
|
||||||
|
$migrate_dedup_users["colinm"] = "tablaman";
|
||||||
|
$migrate_dedup_users["blendphys2"] = "blendphys";
|
||||||
|
$migrate_dedup_users["xgoff"] = "zzyxz";
|
||||||
|
$migrate_dedup_users["coleingraham"] = "coledingraham";
|
||||||
|
$migrate_dedup_users["danielvmacedo"] = "skul3r";
|
||||||
|
$migrate_dedup_users["burster"] = "przemaz";
|
||||||
|
$migrate_dedup_users["tung"] = "tungster";
|
||||||
|
$migrate_dedup_users["chessie"] = "blackcatt";
|
||||||
|
$migrate_dedup_users["foxdog"] = "rubbernuke";
|
||||||
|
$migrate_dedup_users["mordachai"] = "gus";
|
||||||
|
$migrate_dedup_users["chilamlai"] = "cllai";
|
||||||
|
$migrate_dedup_users["sliders34"] = "sliders";
|
||||||
|
$migrate_dedup_users["benji852"] = "benjamin852";
|
||||||
|
$migrate_dedup_users["bebinalpha"] = "bebin";
|
||||||
|
$migrate_dedup_users["mr78"] = "alexandr";
|
||||||
|
$migrate_dedup_users["avirillion"] = "tarion";
|
||||||
|
$migrate_dedup_users["matthiasro"] = "matthias_r";
|
||||||
|
$migrate_dedup_users["debearseax"] = "seogeniuss";
|
||||||
|
$migrate_dedup_users["karja"] = "trockenfrosch";
|
||||||
|
$migrate_dedup_users["rojuinex"] = "ifrit";
|
||||||
|
$migrate_dedup_users["bernardo"] = "dados";
|
||||||
|
$migrate_dedup_users["ddeclara"] = "decden";
|
||||||
|
$migrate_dedup_users["zm_sansan"] = "sansan";
|
||||||
|
$migrate_dedup_users["useless"] = "cortot";
|
||||||
|
$migrate_dedup_users["tymnclono"] = "sooccatly";
|
||||||
|
$migrate_dedup_users["rodrigo_b"] = "rodrigob";
|
||||||
|
$migrate_dedup_users["shnurui"] = "spinster";
|
||||||
|
$migrate_dedup_users["michalisz"] = "michaliszissiou";
|
||||||
|
$migrate_dedup_users["fbbdev"] = "babboide";
|
||||||
|
$migrate_dedup_users["tjackson"] = "tjonline";
|
||||||
|
$migrate_dedup_users["ramaswamy"] = "ramaswamysriram";
|
||||||
|
$migrate_dedup_users["allrod5"] = "rodblender";
|
||||||
|
$migrate_dedup_users["qcp"] = "qpblendpolis";
|
||||||
|
$migrate_dedup_users["ftsf"] = "thesleepless";
|
||||||
|
$migrate_dedup_users["umagoo2012"] = "umagoo";
|
||||||
|
$migrate_dedup_users["raven"] = "rune";
|
||||||
|
$migrate_dedup_users["hsaito"] = "integer";
|
||||||
|
$migrate_dedup_users["paulthegreat"] = "digitalpyro";
|
||||||
|
$migrate_dedup_users["capheen"] = "dval";
|
||||||
|
$migrate_dedup_users["rskinner"] = "rws";
|
||||||
|
$migrate_dedup_users["gregstein"] = "gregorein";
|
||||||
|
$migrate_dedup_users["matty686"] = "matty";
|
||||||
|
$migrate_dedup_users["selby_rowley"] = "selby";
|
||||||
|
$migrate_dedup_users["shembolstudio"] = "natadams8";
|
||||||
|
$migrate_dedup_users["grenzfrequence"] = "goatrance";
|
||||||
|
$migrate_dedup_users["stephan"] = "schdeffan";
|
||||||
|
$migrate_dedup_users["axis33"] = "dsc512";
|
||||||
|
$migrate_dedup_users["redandfish"] = "red-fish";
|
||||||
|
$migrate_dedup_users["artsapcemedia"] = "arzpace";
|
||||||
|
$migrate_dedup_users["artspacemedia"] = "arzpace";
|
||||||
|
$migrate_dedup_users["mccmcc"] = "mcq";
|
||||||
|
$migrate_dedup_users["seocitterx"] = "mediabuy";
|
||||||
|
$migrate_dedup_users["lightning_limn"] = "lightning4";
|
||||||
|
$migrate_dedup_users["omarlakhdar"] = "archimage";
|
||||||
|
$migrate_dedup_users["regeleionescu"] = "regele";
|
||||||
|
$migrate_dedup_users["mitchell_decker"] = "michealikruhara";
|
||||||
|
$migrate_dedup_users["joselebon"] = "jl57";
|
||||||
|
$migrate_dedup_users["simonbroggi"] = "broggsim";
|
||||||
|
$migrate_dedup_users["inwadnepe"] = "ceapbatatry";
|
||||||
|
$migrate_dedup_users["ehobjman"] = "resbsp";
|
||||||
|
$migrate_dedup_users["davelassanske"] = "dolby411";
|
||||||
|
$migrate_dedup_users["jsu"] = "jansub";
|
||||||
|
$migrate_dedup_users["agricola"] = "agricola1";
|
||||||
|
$migrate_dedup_users["bartoszek"] = "bartus";
|
||||||
|
$migrate_dedup_users["captainoblivion"] = "cptoblivion";
|
||||||
|
$migrate_dedup_users["alexmcourt"] = "personalex";
|
||||||
|
$migrate_dedup_users["jmsprss"] = "xonar";
|
||||||
|
$migrate_dedup_users["awarnock"] = "salsa";
|
||||||
|
$migrate_dedup_users["mcc2"] = "mcq";
|
||||||
|
$migrate_dedup_users["psyborg042"] = "psyborg";
|
||||||
|
$migrate_dedup_users["ushiproject"] = "ushi";
|
||||||
|
$migrate_dedup_users["mrjimmy"] = "mrjimmyos";
|
||||||
|
$migrate_dedup_users["thefinalcut"] = "tlousky";
|
||||||
|
$migrate_dedup_users["startheshadow"] = "star";
|
||||||
|
$migrate_dedup_users["axredneck"] = "redneck";
|
||||||
|
$migrate_dedup_users["phimestudio"] = "phime";
|
||||||
|
$migrate_dedup_users["dwatts1"] = "dlax";
|
||||||
|
$migrate_dedup_users["rertjoi"] = "rertjwi";
|
||||||
|
$migrate_dedup_users["erdjkgh"] = "rertjwi";
|
||||||
|
$migrate_dedup_users["libertainsrg"] = "fcougar";
|
||||||
|
$migrate_dedup_users["godling72"] = "dmelchio";
|
||||||
|
$migrate_dedup_users["myclay"] = "thenewone";
|
||||||
|
$migrate_dedup_users["ecaspersen"] = "ecasper";
|
||||||
|
$migrate_dedup_users["driewiel"] = "driesiedriewiel";
|
||||||
|
$migrate_dedup_users["bhupen"] = "bhupendra";
|
||||||
|
$migrate_dedup_users["caosdoar"] = "mailoyo";
|
||||||
|
$migrate_dedup_users["polyspin"] = "butler";
|
||||||
|
$migrate_dedup_users["qalb_al_aqrab"] = "efimpetelin";
|
||||||
|
$migrate_dedup_users["fdfdfdfffd"] = "fcougar";
|
||||||
|
$migrate_dedup_users["brianlockett"] = "macrow";
|
||||||
|
$migrate_dedup_users["claude"] = "coco";
|
||||||
|
$migrate_dedup_users["mattostgard"] = "drflail";
|
||||||
|
$migrate_dedup_users["cekuhnen_new"] = "cekuhnendev";
|
||||||
|
$migrate_dedup_users["kirill_lukyanov"] = "kirill";
|
||||||
|
$migrate_dedup_users["jan-eric"] = "janeric96";
|
||||||
|
$migrate_dedup_users["daniel_h"] = "dhoughto";
|
||||||
|
$migrate_dedup_users["raphaelbarros"] = "thebigheadone";
|
||||||
|
$migrate_dedup_users["salas"] = "tychota";
|
||||||
|
$migrate_dedup_users["danieljsamson"] = "techfix";
|
||||||
|
$migrate_dedup_users["vinagrito"] = "aechemendia";
|
||||||
|
$migrate_dedup_users["lin_165"] = "b1657022405";
|
||||||
|
$migrate_dedup_users["cwebber"] = "paroneayea";
|
||||||
|
$migrate_dedup_users["harolddadomo"] = "harold";
|
||||||
|
$migrate_dedup_users["rabidsquirrel"] = "genericusername";
|
||||||
|
$migrate_dedup_users["larry3"] = "lehibou";
|
||||||
|
$migrate_dedup_users["predoe"] = "petronius3d";
|
||||||
|
$migrate_dedup_users["skoo"] = "stefano";
|
||||||
|
$migrate_dedup_users["cabergolinety"] = "azathioprinewww";
|
||||||
|
$migrate_dedup_users["prestijkorsan07"] = "prestij07";
|
||||||
|
$migrate_dedup_users["scottpetrovic"] = "slpetrov";
|
||||||
|
$migrate_dedup_users["zooly76"] = "zooly";
|
||||||
|
$migrate_dedup_users["theoryanimation"] = "davidandrade";
|
||||||
|
$migrate_dedup_users["daninsky"] = "danishit";
|
||||||
|
$migrate_dedup_users["eyesee2013"] = "eyesee";
|
||||||
|
$migrate_dedup_users["megacal"] = "cmcgaugh";
|
||||||
|
$migrate_dedup_users["const"] = "kostas100";
|
||||||
|
$migrate_dedup_users["ngaudenzi"] = "puppetmaster";
|
||||||
|
$migrate_dedup_users["mroguski"] = "kaelthas";
|
||||||
|
$migrate_dedup_users["brdf"] = "origin";
|
||||||
|
$migrate_dedup_users["davis3d"] = "davis";
|
||||||
|
$migrate_dedup_users["rldigital"] = "locatelli";
|
||||||
|
$migrate_dedup_users["tomforsythe"] = "gallifrey77203";
|
||||||
|
$migrate_dedup_users["gbrnk"] = "benoe";
|
||||||
|
$migrate_dedup_users["arekkasprzyk"] = "kasperski";
|
||||||
|
$migrate_dedup_users["imbusy1"] = "imbusy";
|
||||||
|
$migrate_dedup_users["mfoxdoggg"] = "mfoxdogg";
|
||||||
|
|
||||||
|
$migrate_dedup_users["knusk"] = "kanutus";
|
||||||
|
$migrate_dedup_users["tomekk"] = "anders211";
|
||||||
|
$migrate_dedup_users["kitsueb"] = "kitsu_eb";
|
||||||
|
$migrate_dedup_users["slugzzz"] = "tsquar3d";
|
||||||
|
$migrate_dedup_users["moore500"] = "mmoore500";
|
||||||
|
$migrate_dedup_users["verumbra"] = "sebastian0";
|
||||||
|
$migrate_dedup_users["blenderbug"] = "nikola";
|
||||||
|
|
||||||
|
$migrate_dedup_users["adailtoncomp"] = "adailton";
|
||||||
|
$migrate_dedup_users["mchs3d"] = "abtrumpet";
|
||||||
|
|
||||||
|
// disabled users who have tasks
|
||||||
|
$migrate_dedup_users["sjoerd"] = "sjoerddevries";
|
||||||
|
$migrate_dedup_users["matali"] = "mat_ali";
|
||||||
|
$migrate_dedup_users["voicelesscushio"] = "None";
|
||||||
|
$migrate_dedup_users["bigben0328"] = "None";
|
||||||
|
$migrate_dedup_users["santamouse"] = "None";
|
||||||
|
$migrate_dedup_users["andreanckaert"] = "None";
|
||||||
|
$migrate_dedup_users["yesmydear"] = "None";
|
||||||
|
$migrate_dedup_users["spacetug"] = "None";
|
||||||
|
$migrate_dedup_users["omegafold"] = "None";
|
||||||
|
|
||||||
|
// testing
|
||||||
|
$migrate_dedup_users["blendix_rename_test_a"] = "blendix";
|
||||||
|
$migrate_dedup_users["blendix_rename_test_b"] = "blendix";
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 9.8 KiB |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.4 KiB |
@@ -9,13 +9,13 @@ return array(
|
|||||||
'names' => array(
|
'names' => array(
|
||||||
'conpherence.pkg.css' => '0e3cf785',
|
'conpherence.pkg.css' => '0e3cf785',
|
||||||
'conpherence.pkg.js' => '020aebcf',
|
'conpherence.pkg.js' => '020aebcf',
|
||||||
'core.pkg.css' => '937616c0',
|
'core.pkg.css' => '0fbedea0',
|
||||||
'core.pkg.js' => 'adc34883',
|
'core.pkg.js' => '74ad315f',
|
||||||
'dark-console.pkg.js' => '187792c2',
|
'dark-console.pkg.js' => '187792c2',
|
||||||
'differential.pkg.css' => '5c459f92',
|
'differential.pkg.css' => '5c459f92',
|
||||||
'differential.pkg.js' => '5080baf4',
|
'differential.pkg.js' => '218fda21',
|
||||||
'diffusion.pkg.css' => '42c75c37',
|
'diffusion.pkg.css' => '42c75c37',
|
||||||
'diffusion.pkg.js' => '78c9885d',
|
'diffusion.pkg.js' => 'a98c0bf7',
|
||||||
'maniphest.pkg.css' => '35995d6d',
|
'maniphest.pkg.css' => '35995d6d',
|
||||||
'maniphest.pkg.js' => 'c9308721',
|
'maniphest.pkg.js' => 'c9308721',
|
||||||
'rsrc/audio/basic/alert.mp3' => '17889334',
|
'rsrc/audio/basic/alert.mp3' => '17889334',
|
||||||
@@ -38,9 +38,9 @@ return array(
|
|||||||
'rsrc/css/aphront/typeahead.css' => '8779483d',
|
'rsrc/css/aphront/typeahead.css' => '8779483d',
|
||||||
'rsrc/css/application/almanac/almanac.css' => '2e050f4f',
|
'rsrc/css/application/almanac/almanac.css' => '2e050f4f',
|
||||||
'rsrc/css/application/auth/auth.css' => 'c2f23d74',
|
'rsrc/css/application/auth/auth.css' => 'c2f23d74',
|
||||||
'rsrc/css/application/base/main-menu-view.css' => 'bcec20f0',
|
'rsrc/css/application/base/main-menu-view.css' => 'eacf7e46',
|
||||||
'rsrc/css/application/base/notification-menu.css' => '4df1ee30',
|
'rsrc/css/application/base/notification-menu.css' => '4df1ee30',
|
||||||
'rsrc/css/application/base/phui-theme.css' => '35883b37',
|
'rsrc/css/application/base/phui-theme.css' => '63311e09',
|
||||||
'rsrc/css/application/base/standard-page-view.css' => 'a374f94c',
|
'rsrc/css/application/base/standard-page-view.css' => 'a374f94c',
|
||||||
'rsrc/css/application/chatlog/chatlog.css' => 'abdc76ee',
|
'rsrc/css/application/chatlog/chatlog.css' => 'abdc76ee',
|
||||||
'rsrc/css/application/conduit/conduit-api.css' => 'ce2cfc41',
|
'rsrc/css/application/conduit/conduit-api.css' => 'ce2cfc41',
|
||||||
@@ -73,7 +73,7 @@ return array(
|
|||||||
'rsrc/css/application/diffusion/diffusion-icons.css' => '23b31a1b',
|
'rsrc/css/application/diffusion/diffusion-icons.css' => '23b31a1b',
|
||||||
'rsrc/css/application/diffusion/diffusion-readme.css' => 'b68a76e4',
|
'rsrc/css/application/diffusion/diffusion-readme.css' => 'b68a76e4',
|
||||||
'rsrc/css/application/diffusion/diffusion-repository.css' => 'b89e8c6c',
|
'rsrc/css/application/diffusion/diffusion-repository.css' => 'b89e8c6c',
|
||||||
'rsrc/css/application/diffusion/diffusion.css' => 'e46232d6',
|
'rsrc/css/application/diffusion/diffusion.css' => 'b54c77b0',
|
||||||
'rsrc/css/application/feed/feed.css' => 'd8b6e3f8',
|
'rsrc/css/application/feed/feed.css' => 'd8b6e3f8',
|
||||||
'rsrc/css/application/files/global-drag-and-drop.css' => '1d2713a4',
|
'rsrc/css/application/files/global-drag-and-drop.css' => '1d2713a4',
|
||||||
'rsrc/css/application/flag/flag.css' => '2b77be8d',
|
'rsrc/css/application/flag/flag.css' => '2b77be8d',
|
||||||
@@ -113,18 +113,14 @@ return array(
|
|||||||
'rsrc/css/application/slowvote/slowvote.css' => '1694baed',
|
'rsrc/css/application/slowvote/slowvote.css' => '1694baed',
|
||||||
'rsrc/css/application/tokens/tokens.css' => 'ce5a50bd',
|
'rsrc/css/application/tokens/tokens.css' => 'ce5a50bd',
|
||||||
'rsrc/css/application/uiexample/example.css' => 'b4795059',
|
'rsrc/css/application/uiexample/example.css' => 'b4795059',
|
||||||
'rsrc/css/core/core.css' => 'b3ebd90d',
|
'rsrc/css/core/core.css' => '1b29ed61',
|
||||||
'rsrc/css/core/remarkup.css' => '24d48a73',
|
'rsrc/css/core/remarkup.css' => 'c286eaef',
|
||||||
'rsrc/css/core/syntax.css' => '548567f6',
|
'rsrc/css/core/syntax.css' => '548567f6',
|
||||||
'rsrc/css/core/z-index.css' => 'ac3bfcd4',
|
'rsrc/css/core/z-index.css' => 'ac3bfcd4',
|
||||||
'rsrc/css/diviner/diviner-shared.css' => '4bd263b0',
|
'rsrc/css/diviner/diviner-shared.css' => '4bd263b0',
|
||||||
'rsrc/css/font/font-awesome.css' => '3883938a',
|
'rsrc/css/font/font-awesome.css' => '3883938a',
|
||||||
'rsrc/css/font/font-lato.css' => '23631304',
|
'rsrc/css/font/font-lato.css' => '23631304',
|
||||||
'rsrc/css/font/phui-font-icon-base.css' => '303c9b87',
|
'rsrc/css/font/phui-font-icon-base.css' => '303c9b87',
|
||||||
'rsrc/css/fuel/fuel-grid.css' => '66697240',
|
|
||||||
'rsrc/css/fuel/fuel-handle-list.css' => '2c4cbeca',
|
|
||||||
'rsrc/css/fuel/fuel-map.css' => 'd6e31510',
|
|
||||||
'rsrc/css/fuel/fuel-menu.css' => '21f5d199',
|
|
||||||
'rsrc/css/layout/phabricator-source-code-view.css' => '03d7ac28',
|
'rsrc/css/layout/phabricator-source-code-view.css' => '03d7ac28',
|
||||||
'rsrc/css/phui/button/phui-button-bar.css' => 'a4aa75c4',
|
'rsrc/css/phui/button/phui-button-bar.css' => 'a4aa75c4',
|
||||||
'rsrc/css/phui/button/phui-button-simple.css' => '1ff278aa',
|
'rsrc/css/phui/button/phui-button-simple.css' => '1ff278aa',
|
||||||
@@ -137,11 +133,11 @@ return array(
|
|||||||
'rsrc/css/phui/object-item/phui-oi-color.css' => 'b517bfa0',
|
'rsrc/css/phui/object-item/phui-oi-color.css' => 'b517bfa0',
|
||||||
'rsrc/css/phui/object-item/phui-oi-drag-ui.css' => 'da15d3dc',
|
'rsrc/css/phui/object-item/phui-oi-drag-ui.css' => 'da15d3dc',
|
||||||
'rsrc/css/phui/object-item/phui-oi-flush-ui.css' => '490e2e2e',
|
'rsrc/css/phui/object-item/phui-oi-flush-ui.css' => '490e2e2e',
|
||||||
'rsrc/css/phui/object-item/phui-oi-list-view.css' => 'af98a277',
|
'rsrc/css/phui/object-item/phui-oi-list-view.css' => 'd7723ecc',
|
||||||
'rsrc/css/phui/object-item/phui-oi-simple-ui.css' => '6a30fa46',
|
'rsrc/css/phui/object-item/phui-oi-simple-ui.css' => '6a30fa46',
|
||||||
'rsrc/css/phui/phui-action-list.css' => '1b0085b2',
|
'rsrc/css/phui/phui-action-list.css' => '1b0085b2',
|
||||||
'rsrc/css/phui/phui-action-panel.css' => '6c386cbf',
|
'rsrc/css/phui/phui-action-panel.css' => '6c386cbf',
|
||||||
'rsrc/css/phui/phui-badge.css' => '666e25ad',
|
'rsrc/css/phui/phui-badge.css' => '96576409',
|
||||||
'rsrc/css/phui/phui-basic-nav-view.css' => '56ebd66d',
|
'rsrc/css/phui/phui-basic-nav-view.css' => '56ebd66d',
|
||||||
'rsrc/css/phui/phui-big-info-view.css' => '362ad37b',
|
'rsrc/css/phui/phui-big-info-view.css' => '362ad37b',
|
||||||
'rsrc/css/phui/phui-box.css' => '5ed3b8cb',
|
'rsrc/css/phui/phui-box.css' => '5ed3b8cb',
|
||||||
@@ -158,7 +154,7 @@ return array(
|
|||||||
'rsrc/css/phui/phui-document.css' => '52b748a5',
|
'rsrc/css/phui/phui-document.css' => '52b748a5',
|
||||||
'rsrc/css/phui/phui-feed-story.css' => 'a0c05029',
|
'rsrc/css/phui/phui-feed-story.css' => 'a0c05029',
|
||||||
'rsrc/css/phui/phui-fontkit.css' => '1ec937e5',
|
'rsrc/css/phui/phui-fontkit.css' => '1ec937e5',
|
||||||
'rsrc/css/phui/phui-form-view.css' => '01b796c0',
|
'rsrc/css/phui/phui-form-view.css' => 'a8e0a1ab',
|
||||||
'rsrc/css/phui/phui-form.css' => '1f177cb7',
|
'rsrc/css/phui/phui-form.css' => '1f177cb7',
|
||||||
'rsrc/css/phui/phui-formation-view.css' => 'd2dec8ed',
|
'rsrc/css/phui/phui-formation-view.css' => 'd2dec8ed',
|
||||||
'rsrc/css/phui/phui-head-thing.css' => 'd7f293df',
|
'rsrc/css/phui/phui-head-thing.css' => 'd7f293df',
|
||||||
@@ -191,6 +187,16 @@ return array(
|
|||||||
'rsrc/css/sprite-login.css' => '18b368a6',
|
'rsrc/css/sprite-login.css' => '18b368a6',
|
||||||
'rsrc/css/sprite-tokens.css' => 'f1896dc5',
|
'rsrc/css/sprite-tokens.css' => 'f1896dc5',
|
||||||
'rsrc/css/syntax/syntax-default.css' => '055fc231',
|
'rsrc/css/syntax/syntax-default.css' => '055fc231',
|
||||||
|
'rsrc/custom/css/phabricator-welcome-page.css' => 'a641fcc9',
|
||||||
|
'rsrc/custom/image/badges/badge_devfund_bronze.png' => '0f98ccf2',
|
||||||
|
'rsrc/custom/image/badges/badge_devfund_diamond.png' => '196d8206',
|
||||||
|
'rsrc/custom/image/badges/badge_devfund_gold.png' => 'd03e1722',
|
||||||
|
'rsrc/custom/image/badges/badge_devfund_platinum.png' => '3e517840',
|
||||||
|
'rsrc/custom/image/badges/badge_devfund_silver.png' => '73594dee',
|
||||||
|
'rsrc/custom/image/badges/badge_devfund_titanium.png' => 'e30aa898',
|
||||||
|
'rsrc/custom/image/badges/badge_sprite_fright.png' => '6f4b20e6',
|
||||||
|
'rsrc/custom/image/badges/badge_studio.png' => 'ffbdcabb',
|
||||||
|
'rsrc/custom/image/blender_logo.png' => '86dc8498',
|
||||||
'rsrc/externals/d3/d3.min.js' => '9d068042',
|
'rsrc/externals/d3/d3.min.js' => '9d068042',
|
||||||
'rsrc/externals/font/fontawesome/fontawesome-webfont.eot' => '23f8c698',
|
'rsrc/externals/font/fontawesome/fontawesome-webfont.eot' => '23f8c698',
|
||||||
'rsrc/externals/font/fontawesome/fontawesome-webfont.ttf' => '70983df0',
|
'rsrc/externals/font/fontawesome/fontawesome-webfont.ttf' => '70983df0',
|
||||||
@@ -276,7 +282,7 @@ return array(
|
|||||||
'rsrc/externals/javelin/lib/control/typeahead/source/TypeaheadPreloadedSource.js' => '5a79f6c3',
|
'rsrc/externals/javelin/lib/control/typeahead/source/TypeaheadPreloadedSource.js' => '5a79f6c3',
|
||||||
'rsrc/externals/javelin/lib/control/typeahead/source/TypeaheadSource.js' => '8badee71',
|
'rsrc/externals/javelin/lib/control/typeahead/source/TypeaheadSource.js' => '8badee71',
|
||||||
'rsrc/externals/javelin/lib/control/typeahead/source/TypeaheadStaticSource.js' => '80bff3af',
|
'rsrc/externals/javelin/lib/control/typeahead/source/TypeaheadStaticSource.js' => '80bff3af',
|
||||||
'rsrc/favicons/favicon-16x16.png' => '4c51a03a',
|
'rsrc/favicons/favicon-16x16.png' => 'b1399751',
|
||||||
'rsrc/favicons/mask-icon.svg' => 'db699fe1',
|
'rsrc/favicons/mask-icon.svg' => 'db699fe1',
|
||||||
'rsrc/image/BFCFDA.png' => '74b5c88b',
|
'rsrc/image/BFCFDA.png' => '74b5c88b',
|
||||||
'rsrc/image/actions/edit.png' => 'fd987dff',
|
'rsrc/image/actions/edit.png' => 'fd987dff',
|
||||||
@@ -383,7 +389,7 @@ return array(
|
|||||||
'rsrc/js/application/dashboard/behavior-dashboard-move-panels.js' => 'a2ab19be',
|
'rsrc/js/application/dashboard/behavior-dashboard-move-panels.js' => 'a2ab19be',
|
||||||
'rsrc/js/application/dashboard/behavior-dashboard-query-panel-select.js' => '1e413dc9',
|
'rsrc/js/application/dashboard/behavior-dashboard-query-panel-select.js' => '1e413dc9',
|
||||||
'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => '0116d3e8',
|
'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => '0116d3e8',
|
||||||
'rsrc/js/application/diff/DiffChangeset.js' => '3b6e1fde',
|
'rsrc/js/application/diff/DiffChangeset.js' => '39dcf2c3',
|
||||||
'rsrc/js/application/diff/DiffChangesetList.js' => 'cc2c5de5',
|
'rsrc/js/application/diff/DiffChangesetList.js' => 'cc2c5de5',
|
||||||
'rsrc/js/application/diff/DiffInline.js' => '511a1315',
|
'rsrc/js/application/diff/DiffInline.js' => '511a1315',
|
||||||
'rsrc/js/application/diff/DiffPathView.js' => '8207abf9',
|
'rsrc/js/application/diff/DiffPathView.js' => '8207abf9',
|
||||||
@@ -394,7 +400,7 @@ return array(
|
|||||||
'rsrc/js/application/diffusion/ExternalEditorLinkEngine.js' => '48a8641f',
|
'rsrc/js/application/diffusion/ExternalEditorLinkEngine.js' => '48a8641f',
|
||||||
'rsrc/js/application/diffusion/behavior-audit-preview.js' => 'b7b73831',
|
'rsrc/js/application/diffusion/behavior-audit-preview.js' => 'b7b73831',
|
||||||
'rsrc/js/application/diffusion/behavior-commit-branches.js' => '4b671572',
|
'rsrc/js/application/diffusion/behavior-commit-branches.js' => '4b671572',
|
||||||
'rsrc/js/application/diffusion/behavior-commit-graph.js' => 'ac10c917',
|
'rsrc/js/application/diffusion/behavior-commit-graph.js' => 'ef836bf2',
|
||||||
'rsrc/js/application/diffusion/behavior-locate-file.js' => '87428eb2',
|
'rsrc/js/application/diffusion/behavior-locate-file.js' => '87428eb2',
|
||||||
'rsrc/js/application/diffusion/behavior-pull-lastmodified.js' => 'c715c123',
|
'rsrc/js/application/diffusion/behavior-pull-lastmodified.js' => 'c715c123',
|
||||||
'rsrc/js/application/doorkeeper/behavior-doorkeeper-tag.js' => '6a85bc5a',
|
'rsrc/js/application/doorkeeper/behavior-doorkeeper-tag.js' => '6a85bc5a',
|
||||||
@@ -477,7 +483,7 @@ return array(
|
|||||||
'rsrc/js/core/behavior-choose-control.js' => '04f8a1e3',
|
'rsrc/js/core/behavior-choose-control.js' => '04f8a1e3',
|
||||||
'rsrc/js/core/behavior-copy.js' => 'cf32921f',
|
'rsrc/js/core/behavior-copy.js' => 'cf32921f',
|
||||||
'rsrc/js/core/behavior-detect-timezone.js' => '78bc5d94',
|
'rsrc/js/core/behavior-detect-timezone.js' => '78bc5d94',
|
||||||
'rsrc/js/core/behavior-device.js' => 'ac2b1e01',
|
'rsrc/js/core/behavior-device.js' => '0cf79f45',
|
||||||
'rsrc/js/core/behavior-drag-and-drop-textarea.js' => '7ad020a5',
|
'rsrc/js/core/behavior-drag-and-drop-textarea.js' => '7ad020a5',
|
||||||
'rsrc/js/core/behavior-fancy-datepicker.js' => '956f3eeb',
|
'rsrc/js/core/behavior-fancy-datepicker.js' => '956f3eeb',
|
||||||
'rsrc/js/core/behavior-form.js' => '55d7b788',
|
'rsrc/js/core/behavior-form.js' => '55d7b788',
|
||||||
@@ -494,7 +500,7 @@ return array(
|
|||||||
'rsrc/js/core/behavior-more.js' => '506aa3f4',
|
'rsrc/js/core/behavior-more.js' => '506aa3f4',
|
||||||
'rsrc/js/core/behavior-object-selector.js' => '98ef467f',
|
'rsrc/js/core/behavior-object-selector.js' => '98ef467f',
|
||||||
'rsrc/js/core/behavior-oncopy.js' => 'da8f5259',
|
'rsrc/js/core/behavior-oncopy.js' => 'da8f5259',
|
||||||
'rsrc/js/core/behavior-phabricator-remarkup-assist.js' => '54262396',
|
'rsrc/js/core/behavior-phabricator-remarkup-assist.js' => '99e30c81',
|
||||||
'rsrc/js/core/behavior-read-only-warning.js' => 'b9109f8f',
|
'rsrc/js/core/behavior-read-only-warning.js' => 'b9109f8f',
|
||||||
'rsrc/js/core/behavior-redirect.js' => '407ee861',
|
'rsrc/js/core/behavior-redirect.js' => '407ee861',
|
||||||
'rsrc/js/core/behavior-refresh-csrf.js' => '46116c01',
|
'rsrc/js/core/behavior-refresh-csrf.js' => '46116c01',
|
||||||
@@ -571,17 +577,13 @@ return array(
|
|||||||
'differential-revision-history-css' => '8aa3eac5',
|
'differential-revision-history-css' => '8aa3eac5',
|
||||||
'differential-revision-list-css' => '93d2df7d',
|
'differential-revision-list-css' => '93d2df7d',
|
||||||
'differential-table-of-contents-css' => 'bba788b9',
|
'differential-table-of-contents-css' => 'bba788b9',
|
||||||
'diffusion-css' => 'e46232d6',
|
'diffusion-css' => 'b54c77b0',
|
||||||
'diffusion-icons-css' => '23b31a1b',
|
'diffusion-icons-css' => '23b31a1b',
|
||||||
'diffusion-readme-css' => 'b68a76e4',
|
'diffusion-readme-css' => 'b68a76e4',
|
||||||
'diffusion-repository-css' => 'b89e8c6c',
|
'diffusion-repository-css' => 'b89e8c6c',
|
||||||
'diviner-shared-css' => '4bd263b0',
|
'diviner-shared-css' => '4bd263b0',
|
||||||
'font-fontawesome' => '3883938a',
|
'font-fontawesome' => '3883938a',
|
||||||
'font-lato' => '23631304',
|
'font-lato' => '23631304',
|
||||||
'fuel-grid-css' => '66697240',
|
|
||||||
'fuel-handle-list-css' => '2c4cbeca',
|
|
||||||
'fuel-map-css' => 'd6e31510',
|
|
||||||
'fuel-menu-css' => '21f5d199',
|
|
||||||
'global-drag-and-drop-css' => '1d2713a4',
|
'global-drag-and-drop-css' => '1d2713a4',
|
||||||
'harbormaster-css' => '8dfe16b2',
|
'harbormaster-css' => '8dfe16b2',
|
||||||
'herald-css' => '648d39e2',
|
'herald-css' => '648d39e2',
|
||||||
@@ -619,11 +621,11 @@ return array(
|
|||||||
'javelin-behavior-day-view' => '727a5a61',
|
'javelin-behavior-day-view' => '727a5a61',
|
||||||
'javelin-behavior-desktop-notifications-control' => '070679fe',
|
'javelin-behavior-desktop-notifications-control' => '070679fe',
|
||||||
'javelin-behavior-detect-timezone' => '78bc5d94',
|
'javelin-behavior-detect-timezone' => '78bc5d94',
|
||||||
'javelin-behavior-device' => 'ac2b1e01',
|
'javelin-behavior-device' => '0cf79f45',
|
||||||
'javelin-behavior-differential-diff-radios' => '925fe8cd',
|
'javelin-behavior-differential-diff-radios' => '925fe8cd',
|
||||||
'javelin-behavior-differential-populate' => 'b86ef6c2',
|
'javelin-behavior-differential-populate' => 'b86ef6c2',
|
||||||
'javelin-behavior-diffusion-commit-branches' => '4b671572',
|
'javelin-behavior-diffusion-commit-branches' => '4b671572',
|
||||||
'javelin-behavior-diffusion-commit-graph' => 'ac10c917',
|
'javelin-behavior-diffusion-commit-graph' => 'ef836bf2',
|
||||||
'javelin-behavior-diffusion-locate-file' => '87428eb2',
|
'javelin-behavior-diffusion-locate-file' => '87428eb2',
|
||||||
'javelin-behavior-diffusion-pull-lastmodified' => 'c715c123',
|
'javelin-behavior-diffusion-pull-lastmodified' => 'c715c123',
|
||||||
'javelin-behavior-document-engine' => '243d6c22',
|
'javelin-behavior-document-engine' => '243d6c22',
|
||||||
@@ -658,7 +660,7 @@ return array(
|
|||||||
'javelin-behavior-phabricator-notification-example' => '29819b75',
|
'javelin-behavior-phabricator-notification-example' => '29819b75',
|
||||||
'javelin-behavior-phabricator-object-selector' => '98ef467f',
|
'javelin-behavior-phabricator-object-selector' => '98ef467f',
|
||||||
'javelin-behavior-phabricator-oncopy' => 'da8f5259',
|
'javelin-behavior-phabricator-oncopy' => 'da8f5259',
|
||||||
'javelin-behavior-phabricator-remarkup-assist' => '54262396',
|
'javelin-behavior-phabricator-remarkup-assist' => '99e30c81',
|
||||||
'javelin-behavior-phabricator-reveal-content' => 'b105a3a6',
|
'javelin-behavior-phabricator-reveal-content' => 'b105a3a6',
|
||||||
'javelin-behavior-phabricator-search-typeahead' => '1cb7d027',
|
'javelin-behavior-phabricator-search-typeahead' => '1cb7d027',
|
||||||
'javelin-behavior-phabricator-show-older-transactions' => '8b5c7d65',
|
'javelin-behavior-phabricator-show-older-transactions' => '8b5c7d65',
|
||||||
@@ -779,12 +781,12 @@ return array(
|
|||||||
'phabricator-busy' => '5202e831',
|
'phabricator-busy' => '5202e831',
|
||||||
'phabricator-chatlog-css' => 'abdc76ee',
|
'phabricator-chatlog-css' => 'abdc76ee',
|
||||||
'phabricator-content-source-view-css' => 'cdf0d579',
|
'phabricator-content-source-view-css' => 'cdf0d579',
|
||||||
'phabricator-core-css' => 'b3ebd90d',
|
'phabricator-core-css' => '1b29ed61',
|
||||||
'phabricator-countdown-css' => 'bff8012f',
|
'phabricator-countdown-css' => 'bff8012f',
|
||||||
'phabricator-darklog' => '3b869402',
|
'phabricator-darklog' => '3b869402',
|
||||||
'phabricator-darkmessage' => '26cd4b73',
|
'phabricator-darkmessage' => '26cd4b73',
|
||||||
'phabricator-dashboard-css' => '5a205b9d',
|
'phabricator-dashboard-css' => '5a205b9d',
|
||||||
'phabricator-diff-changeset' => '3b6e1fde',
|
'phabricator-diff-changeset' => '39dcf2c3',
|
||||||
'phabricator-diff-changeset-list' => 'cc2c5de5',
|
'phabricator-diff-changeset-list' => 'cc2c5de5',
|
||||||
'phabricator-diff-inline' => '511a1315',
|
'phabricator-diff-inline' => '511a1315',
|
||||||
'phabricator-diff-path-view' => '8207abf9',
|
'phabricator-diff-path-view' => '8207abf9',
|
||||||
@@ -798,7 +800,7 @@ return array(
|
|||||||
'phabricator-flag-css' => '2b77be8d',
|
'phabricator-flag-css' => '2b77be8d',
|
||||||
'phabricator-keyboard-shortcut' => '1a844c06',
|
'phabricator-keyboard-shortcut' => '1a844c06',
|
||||||
'phabricator-keyboard-shortcut-manager' => '81debc48',
|
'phabricator-keyboard-shortcut-manager' => '81debc48',
|
||||||
'phabricator-main-menu-view' => 'bcec20f0',
|
'phabricator-main-menu-view' => 'eacf7e46',
|
||||||
'phabricator-nav-view-css' => '423f92cc',
|
'phabricator-nav-view-css' => '423f92cc',
|
||||||
'phabricator-notification' => 'a9b91e3f',
|
'phabricator-notification' => 'a9b91e3f',
|
||||||
'phabricator-notification-css' => '30240bd2',
|
'phabricator-notification-css' => '30240bd2',
|
||||||
@@ -806,7 +808,7 @@ return array(
|
|||||||
'phabricator-object-selector-css' => 'ee77366f',
|
'phabricator-object-selector-css' => 'ee77366f',
|
||||||
'phabricator-phtize' => '2f1db1ed',
|
'phabricator-phtize' => '2f1db1ed',
|
||||||
'phabricator-prefab' => '5793d835',
|
'phabricator-prefab' => '5793d835',
|
||||||
'phabricator-remarkup-css' => '24d48a73',
|
'phabricator-remarkup-css' => 'c286eaef',
|
||||||
'phabricator-search-results-css' => '9ea70ace',
|
'phabricator-search-results-css' => '9ea70ace',
|
||||||
'phabricator-shaped-request' => '995f5102',
|
'phabricator-shaped-request' => '995f5102',
|
||||||
'phabricator-slowvote-css' => '1694baed',
|
'phabricator-slowvote-css' => '1694baed',
|
||||||
@@ -816,6 +818,7 @@ return array(
|
|||||||
'phabricator-title' => '43bc9360',
|
'phabricator-title' => '43bc9360',
|
||||||
'phabricator-tooltip' => '83754533',
|
'phabricator-tooltip' => '83754533',
|
||||||
'phabricator-ui-example-css' => 'b4795059',
|
'phabricator-ui-example-css' => 'b4795059',
|
||||||
|
'phabricator-welcome-page' => 'a641fcc9',
|
||||||
'phabricator-zindex-css' => 'ac3bfcd4',
|
'phabricator-zindex-css' => 'ac3bfcd4',
|
||||||
'phame-css' => 'bb442327',
|
'phame-css' => 'bb442327',
|
||||||
'pholio-css' => '88ef5ef1',
|
'pholio-css' => '88ef5ef1',
|
||||||
@@ -828,7 +831,7 @@ return array(
|
|||||||
'phrequent-css' => 'bd79cc67',
|
'phrequent-css' => 'bd79cc67',
|
||||||
'phriction-document-css' => '03380da0',
|
'phriction-document-css' => '03380da0',
|
||||||
'phui-action-panel-css' => '6c386cbf',
|
'phui-action-panel-css' => '6c386cbf',
|
||||||
'phui-badge-view-css' => '666e25ad',
|
'phui-badge-view-css' => '96576409',
|
||||||
'phui-basic-nav-view-css' => '56ebd66d',
|
'phui-basic-nav-view-css' => '56ebd66d',
|
||||||
'phui-big-info-view-css' => '362ad37b',
|
'phui-big-info-view-css' => '362ad37b',
|
||||||
'phui-box-css' => '5ed3b8cb',
|
'phui-box-css' => '5ed3b8cb',
|
||||||
@@ -854,7 +857,7 @@ return array(
|
|||||||
'phui-font-icon-base-css' => '303c9b87',
|
'phui-font-icon-base-css' => '303c9b87',
|
||||||
'phui-fontkit-css' => '1ec937e5',
|
'phui-fontkit-css' => '1ec937e5',
|
||||||
'phui-form-css' => '1f177cb7',
|
'phui-form-css' => '1f177cb7',
|
||||||
'phui-form-view-css' => '01b796c0',
|
'phui-form-view-css' => 'a8e0a1ab',
|
||||||
'phui-formation-view-css' => 'd2dec8ed',
|
'phui-formation-view-css' => 'd2dec8ed',
|
||||||
'phui-head-thing-view-css' => 'd7f293df',
|
'phui-head-thing-view-css' => 'd7f293df',
|
||||||
'phui-header-view-css' => '36c86a58',
|
'phui-header-view-css' => '36c86a58',
|
||||||
@@ -874,7 +877,7 @@ return array(
|
|||||||
'phui-oi-color-css' => 'b517bfa0',
|
'phui-oi-color-css' => 'b517bfa0',
|
||||||
'phui-oi-drag-ui-css' => 'da15d3dc',
|
'phui-oi-drag-ui-css' => 'da15d3dc',
|
||||||
'phui-oi-flush-ui-css' => '490e2e2e',
|
'phui-oi-flush-ui-css' => '490e2e2e',
|
||||||
'phui-oi-list-view-css' => 'af98a277',
|
'phui-oi-list-view-css' => 'd7723ecc',
|
||||||
'phui-oi-simple-ui-css' => '6a30fa46',
|
'phui-oi-simple-ui-css' => '6a30fa46',
|
||||||
'phui-pager-css' => 'd022c7ad',
|
'phui-pager-css' => 'd022c7ad',
|
||||||
'phui-pinboard-view-css' => '1f08f5d8',
|
'phui-pinboard-view-css' => '1f08f5d8',
|
||||||
@@ -885,7 +888,7 @@ return array(
|
|||||||
'phui-spacing-css' => 'b05cadc3',
|
'phui-spacing-css' => 'b05cadc3',
|
||||||
'phui-status-list-view-css' => 'e5ff8be0',
|
'phui-status-list-view-css' => 'e5ff8be0',
|
||||||
'phui-tag-view-css' => '8519160a',
|
'phui-tag-view-css' => '8519160a',
|
||||||
'phui-theme-css' => '35883b37',
|
'phui-theme-css' => '63311e09',
|
||||||
'phui-timeline-view-css' => '2d32d7a9',
|
'phui-timeline-view-css' => '2d32d7a9',
|
||||||
'phui-two-column-view-css' => 'f96d319f',
|
'phui-two-column-view-css' => 'f96d319f',
|
||||||
'phui-workboard-color-css' => 'e86de308',
|
'phui-workboard-color-css' => 'e86de308',
|
||||||
@@ -1010,6 +1013,13 @@ return array(
|
|||||||
'javelin-dom',
|
'javelin-dom',
|
||||||
'phabricator-draggable-list',
|
'phabricator-draggable-list',
|
||||||
),
|
),
|
||||||
|
'0cf79f45' => array(
|
||||||
|
'javelin-behavior',
|
||||||
|
'javelin-stratcom',
|
||||||
|
'javelin-dom',
|
||||||
|
'javelin-vector',
|
||||||
|
'javelin-install',
|
||||||
|
),
|
||||||
'0d2490ce' => array(
|
'0d2490ce' => array(
|
||||||
'javelin-install',
|
'javelin-install',
|
||||||
),
|
),
|
||||||
@@ -1229,14 +1239,7 @@ return array(
|
|||||||
'trigger-rule',
|
'trigger-rule',
|
||||||
'trigger-rule-type',
|
'trigger-rule-type',
|
||||||
),
|
),
|
||||||
'3ae89b20' => array(
|
'39dcf2c3' => array(
|
||||||
'phui-workcard-view-css',
|
|
||||||
),
|
|
||||||
'3b4899b0' => array(
|
|
||||||
'javelin-behavior',
|
|
||||||
'phabricator-prefab',
|
|
||||||
),
|
|
||||||
'3b6e1fde' => array(
|
|
||||||
'javelin-dom',
|
'javelin-dom',
|
||||||
'javelin-util',
|
'javelin-util',
|
||||||
'javelin-stratcom',
|
'javelin-stratcom',
|
||||||
@@ -1250,6 +1253,13 @@ return array(
|
|||||||
'phuix-button-view',
|
'phuix-button-view',
|
||||||
'javelin-external-editor-link-engine',
|
'javelin-external-editor-link-engine',
|
||||||
),
|
),
|
||||||
|
'3ae89b20' => array(
|
||||||
|
'phui-workcard-view-css',
|
||||||
|
),
|
||||||
|
'3b4899b0' => array(
|
||||||
|
'javelin-behavior',
|
||||||
|
'phabricator-prefab',
|
||||||
|
),
|
||||||
'3dc5ad43' => array(
|
'3dc5ad43' => array(
|
||||||
'javelin-behavior',
|
'javelin-behavior',
|
||||||
'javelin-stratcom',
|
'javelin-stratcom',
|
||||||
@@ -1412,17 +1422,6 @@ return array(
|
|||||||
'541f81c3' => array(
|
'541f81c3' => array(
|
||||||
'javelin-install',
|
'javelin-install',
|
||||||
),
|
),
|
||||||
54262396 => array(
|
|
||||||
'javelin-behavior',
|
|
||||||
'javelin-stratcom',
|
|
||||||
'javelin-dom',
|
|
||||||
'phabricator-phtize',
|
|
||||||
'phabricator-textareautils',
|
|
||||||
'javelin-workflow',
|
|
||||||
'javelin-vector',
|
|
||||||
'phuix-autocomplete',
|
|
||||||
'javelin-mask',
|
|
||||||
),
|
|
||||||
'548567f6' => array(
|
'548567f6' => array(
|
||||||
'syntax-default-css',
|
'syntax-default-css',
|
||||||
),
|
),
|
||||||
@@ -1810,6 +1809,17 @@ return array(
|
|||||||
'javelin-request',
|
'javelin-request',
|
||||||
'javelin-router',
|
'javelin-router',
|
||||||
),
|
),
|
||||||
|
'99e30c81' => array(
|
||||||
|
'javelin-behavior',
|
||||||
|
'javelin-stratcom',
|
||||||
|
'javelin-dom',
|
||||||
|
'phabricator-phtize',
|
||||||
|
'phabricator-textareautils',
|
||||||
|
'javelin-workflow',
|
||||||
|
'javelin-vector',
|
||||||
|
'phuix-autocomplete',
|
||||||
|
'javelin-mask',
|
||||||
|
),
|
||||||
'9aae2b66' => array(
|
'9aae2b66' => array(
|
||||||
'javelin-install',
|
'javelin-install',
|
||||||
'javelin-util',
|
'javelin-util',
|
||||||
@@ -1922,18 +1932,6 @@ return array(
|
|||||||
'javelin-dom',
|
'javelin-dom',
|
||||||
'phabricator-notification',
|
'phabricator-notification',
|
||||||
),
|
),
|
||||||
'ac10c917' => array(
|
|
||||||
'javelin-behavior',
|
|
||||||
'javelin-dom',
|
|
||||||
'javelin-stratcom',
|
|
||||||
),
|
|
||||||
'ac2b1e01' => array(
|
|
||||||
'javelin-behavior',
|
|
||||||
'javelin-stratcom',
|
|
||||||
'javelin-dom',
|
|
||||||
'javelin-vector',
|
|
||||||
'javelin-install',
|
|
||||||
),
|
|
||||||
'ad258e28' => array(
|
'ad258e28' => array(
|
||||||
'javelin-behavior',
|
'javelin-behavior',
|
||||||
'javelin-dom',
|
'javelin-dom',
|
||||||
@@ -2047,9 +2045,6 @@ return array(
|
|||||||
'phabricator-drag-and-drop-file-upload',
|
'phabricator-drag-and-drop-file-upload',
|
||||||
'javelin-workboard-board',
|
'javelin-workboard-board',
|
||||||
),
|
),
|
||||||
'bcec20f0' => array(
|
|
||||||
'phui-theme-css',
|
|
||||||
),
|
|
||||||
'c03f2fb4' => array(
|
'c03f2fb4' => array(
|
||||||
'javelin-install',
|
'javelin-install',
|
||||||
),
|
),
|
||||||
@@ -2177,6 +2172,9 @@ return array(
|
|||||||
'javelin-install',
|
'javelin-install',
|
||||||
'javelin-event',
|
'javelin-event',
|
||||||
),
|
),
|
||||||
|
'eacf7e46' => array(
|
||||||
|
'phui-theme-css',
|
||||||
|
),
|
||||||
'ebe83a6b' => array(
|
'ebe83a6b' => array(
|
||||||
'javelin-install',
|
'javelin-install',
|
||||||
),
|
),
|
||||||
@@ -2186,6 +2184,11 @@ return array(
|
|||||||
'ee77366f' => array(
|
'ee77366f' => array(
|
||||||
'aphront-dialog-view-css',
|
'aphront-dialog-view-css',
|
||||||
),
|
),
|
||||||
|
'ef836bf2' => array(
|
||||||
|
'javelin-behavior',
|
||||||
|
'javelin-dom',
|
||||||
|
'javelin-stratcom',
|
||||||
|
),
|
||||||
'f340a484' => array(
|
'f340a484' => array(
|
||||||
'javelin-install',
|
'javelin-install',
|
||||||
'javelin-dom',
|
'javelin-dom',
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ $status_map = array(
|
|||||||
3 => 'invalid',
|
3 => 'invalid',
|
||||||
4 => 'duplicate',
|
4 => 'duplicate',
|
||||||
5 => 'spite',
|
5 => 'spite',
|
||||||
|
123450 => 'archived',
|
||||||
);
|
);
|
||||||
|
|
||||||
$conn_w = id(new ManiphestTask())->establishConnection('w');
|
$conn_w = id(new ManiphestTask())->establishConnection('w');
|
||||||
|
|||||||
@@ -40,8 +40,7 @@ foreach ($lists as $list) {
|
|||||||
if (!$username_okay) {
|
if (!$username_okay) {
|
||||||
echo pht(
|
echo pht(
|
||||||
'Failed to migrate mailing list "%s": unable to generate a unique '.
|
'Failed to migrate mailing list "%s": unable to generate a unique '.
|
||||||
'username for it.',
|
'username for it.')."\n";
|
||||||
$name)."\n";
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
172
scripts/auth_provider/auth_provider.php
Executable file
@@ -0,0 +1,172 @@
|
|||||||
|
#!/usr/local/bin/php
|
||||||
|
<?php
|
||||||
|
#
|
||||||
|
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License
|
||||||
|
# as published by the Free Software Foundation; either version 2
|
||||||
|
# of the License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software Foundation,
|
||||||
|
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
#
|
||||||
|
# The Original Code is Copyright (C) 2019, Blender Foundation
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# Contributor(s): Sergey Sharybin.
|
||||||
|
#
|
||||||
|
# ***** END GPL LICENSE BLOCK *****
|
||||||
|
#
|
||||||
|
# This scripts implements external AuthBasicProvider which can be used
|
||||||
|
# to authentificate users using Phabricator's database.
|
||||||
|
#
|
||||||
|
# Example configuration:
|
||||||
|
#
|
||||||
|
# .htaccess file:
|
||||||
|
#
|
||||||
|
# AuthType Basic
|
||||||
|
# AuthName "Please Enter Password"
|
||||||
|
# AuthBasicProvider external
|
||||||
|
# AuthExternal phabricator
|
||||||
|
# Require valid-user
|
||||||
|
#
|
||||||
|
# It is also required to have the following provider registered in the
|
||||||
|
# configuration. There are two ways to do it:
|
||||||
|
#
|
||||||
|
# 1. Separate conf file in /etc/apache2/conf-enabled
|
||||||
|
# Create a file (say, authz_external_phabricator.conf) with the following
|
||||||
|
# content:
|
||||||
|
#
|
||||||
|
# DefineExternalAuth phabricator pipe /path/to/auth_provider.php
|
||||||
|
#
|
||||||
|
# This method allows to use provider in any VHOST.
|
||||||
|
#
|
||||||
|
# Downside: from local tests .htaccess file picks the provider nicely,
|
||||||
|
# but attempts to specifu the provider in virtual host configuration
|
||||||
|
# resulted in issues (seems to be different initialization order between
|
||||||
|
# global config in those files and virtual hosts).
|
||||||
|
#
|
||||||
|
# 2. Define provider in the virtual host definition:
|
||||||
|
#
|
||||||
|
# <IfModule mod_authnz_external.c>
|
||||||
|
# AddExternalAuth phabricator /path/to/auth_provider.php
|
||||||
|
# SetExternalAuthMethod phabricator pipe
|
||||||
|
# </IfModule>
|
||||||
|
#
|
||||||
|
# This method allowed to use this auth provider for SVN DAV.
|
||||||
|
|
||||||
|
$IS_DEBUG = false;
|
||||||
|
$PHABRICATOR_ROOT = dirname(dirname(dirname(__FILE__)));
|
||||||
|
require_once $PHABRICATOR_ROOT.'/scripts/__init_script__.php';
|
||||||
|
|
||||||
|
function initLogging() {
|
||||||
|
global $IS_DEBUG;
|
||||||
|
global $argv;
|
||||||
|
for ($i = 1; $i < count($argv); ++$i) {
|
||||||
|
if ($argv[$i] == '--debug') {
|
||||||
|
$IS_DEBUG = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function debugLog(string $text) {
|
||||||
|
global $IS_DEBUG;
|
||||||
|
if (!$IS_DEBUG) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
print("${text}\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
function removeSingleTrailingNewline(string $string) {
|
||||||
|
if ($string === '') {
|
||||||
|
return $string;
|
||||||
|
}
|
||||||
|
$length = strlen($string);
|
||||||
|
if ($string[$length - 1] == "\n") {
|
||||||
|
return substr($string, 0, -1);
|
||||||
|
}
|
||||||
|
return $string;
|
||||||
|
}
|
||||||
|
|
||||||
|
class AuthRequest {
|
||||||
|
public $user_name;
|
||||||
|
public $password;
|
||||||
|
|
||||||
|
static function fromStdin() {
|
||||||
|
$auth_request = new AuthRequest();
|
||||||
|
$stdin = fopen('php://stdin', 'r');
|
||||||
|
$auth_request->user_name = removeSingleTrailingNewline(fgets($stdin));
|
||||||
|
$auth_request->password = removeSingleTrailingNewline(fgets($stdin));
|
||||||
|
return $auth_request;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
function getUserForAuthRequest(AuthRequest $auth_request) {
|
||||||
|
if ($auth_request->user_name === '') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$username_or_email = $auth_request->user_name;
|
||||||
|
|
||||||
|
$user = id(new PhabricatorUser())->loadOneWhere(
|
||||||
|
'username = %s',
|
||||||
|
$username_or_email);
|
||||||
|
|
||||||
|
if (!$user) {
|
||||||
|
$user = PhabricatorUser::loadOneWithEmailAddress(
|
||||||
|
$username_or_email);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $user;
|
||||||
|
}
|
||||||
|
|
||||||
|
function createContentSourceForAuth() {
|
||||||
|
return PhabricatorContentSource::newForSource(
|
||||||
|
PhabricatorUnitTestContentSource::SOURCECONST);
|
||||||
|
}
|
||||||
|
|
||||||
|
function isValidAuth(AuthRequest $auth_request) {
|
||||||
|
debugLog("Begin authentification check for user '$auth_request->user_name'");
|
||||||
|
$user = getUserForAuthRequest($auth_request);
|
||||||
|
if (!$user) {
|
||||||
|
debugLog("No PhabricatorUser() object found for requested user.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$content_source = createContentSourceForAuth();
|
||||||
|
$envelope = new PhutilOpaqueEnvelope($auth_request->password);
|
||||||
|
|
||||||
|
$engine = id(new PhabricatorAuthPasswordEngine())
|
||||||
|
->setViewer($user)
|
||||||
|
->setContentSource($content_source)
|
||||||
|
->setPasswordType(PhabricatorAuthPassword::PASSWORD_TYPE_ACCOUNT)
|
||||||
|
->setObject($user);
|
||||||
|
|
||||||
|
if (!$engine->isValidPassword($envelope)) {
|
||||||
|
debugLog('Engine reported invalid password.');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
debugLog('Authentirfication passed.');
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function main() {
|
||||||
|
initLogging();
|
||||||
|
$auth_request = AuthRequest::fromStdin();
|
||||||
|
if (!isValidAuth($auth_request)) {
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
main();
|
||||||
|
?>
|
||||||
6
scripts/gitadmin/gitx-ssh
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/usr/local/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -u
|
||||||
|
|
||||||
|
ssh -i $SSH_KEYFILE $@
|
||||||
443
scripts/gitadmin/rebuild_gitadmin.php
Executable file
@@ -0,0 +1,443 @@
|
|||||||
|
#!/usr/local/bin/php
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$root = dirname(dirname(dirname(__FILE__)));
|
||||||
|
require_once $root.'/scripts/__init_script__.php';
|
||||||
|
|
||||||
|
function escape_name($name) {
|
||||||
|
return preg_replace('/[^A-Za-z0-9\-]/', '_', $name);
|
||||||
|
}
|
||||||
|
|
||||||
|
function startswith($string, $prefix) {
|
||||||
|
return substr($string, 0, strlen($prefix)) == $prefix;
|
||||||
|
}
|
||||||
|
|
||||||
|
function endswith($string, $suffix) {
|
||||||
|
$suffix_length = strlen($suffix);
|
||||||
|
return substr($string, strlen($string) - $suffix_length,
|
||||||
|
$suffix_length) == $suffix;
|
||||||
|
}
|
||||||
|
|
||||||
|
function write_ini_file($array, $file) {
|
||||||
|
$res = array();
|
||||||
|
foreach ($array as $key => $val) {
|
||||||
|
if (is_array($val)) {
|
||||||
|
$res[] = "[$key]";
|
||||||
|
foreach ($val as $skey => $sval) {
|
||||||
|
$res[] = "$skey = $sval";
|
||||||
|
}
|
||||||
|
$res[] = '';
|
||||||
|
} else {
|
||||||
|
$res[] = "$key = $val";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_put_contents($file, implode("\n", $res));
|
||||||
|
}
|
||||||
|
|
||||||
|
function getProjectMembersPHIDs($viewer, $project_phid) {
|
||||||
|
$project = id(new PhabricatorProjectQuery())
|
||||||
|
->setViewer($viewer)
|
||||||
|
->needMembers(true)
|
||||||
|
->withPHIDs(array($project_phid))
|
||||||
|
->executeOne();
|
||||||
|
|
||||||
|
return $project->getMemberPHIDs();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get user's heys and put them to the configuration
|
||||||
|
function handleSingleUserPHID(
|
||||||
|
$keydir, $viewer, $userPHID, $system_keys, &$used_keys) {
|
||||||
|
$user = id(new PhabricatorPeopleQuery())
|
||||||
|
->setViewer($viewer)
|
||||||
|
->withPHIDs(array($userPHID))
|
||||||
|
->executeOne();
|
||||||
|
if (!$user) {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($user->getIsDisabled()) {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
|
$keys = id(new PhabricatorAuthSSHKey())->loadAllWhere(
|
||||||
|
'objectPHID = %s',
|
||||||
|
$user->getPHID());
|
||||||
|
|
||||||
|
$members = array();
|
||||||
|
foreach ($keys as $key) {
|
||||||
|
$full_key_content =
|
||||||
|
$key->getKeyType().' '.
|
||||||
|
$key->getKeyBody().' '.
|
||||||
|
$key->getKeyComment()."\n";
|
||||||
|
|
||||||
|
if (array_key_exists($full_key_content, $system_keys)) {
|
||||||
|
$members[] = $system_keys[$full_key_content];
|
||||||
|
} else {
|
||||||
|
$escaped_key_name = escape_name($key->getName());
|
||||||
|
$member = 'PHAB_'.$user->getUserName().
|
||||||
|
'_'.$escaped_key_name.
|
||||||
|
'_'.$key->getID();
|
||||||
|
$members[] = $member;
|
||||||
|
if (!array_key_exists($member, $used_keys)) {
|
||||||
|
$used_keys[$member] = true;
|
||||||
|
file_put_contents("$keydir/$member.pub", $full_key_content);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $members;
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleUsersPolicyRule(
|
||||||
|
$keydir, $viewer, $rule, $system_keys, &$used_keys) {
|
||||||
|
$members = array();
|
||||||
|
foreach ($rule['value'] as $userPHID) {
|
||||||
|
$members = array_merge($members,
|
||||||
|
handleSingleUserPHID($keydir, $viewer, $userPHID,
|
||||||
|
$system_keys, $used_keys));
|
||||||
|
}
|
||||||
|
return $members;
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleProjectsPolicyRule(
|
||||||
|
$keydir, $viewer, $rule, $system_keys, &$used_keys) {
|
||||||
|
$members = array();
|
||||||
|
foreach ($rule['value'] as $projectPHID) {
|
||||||
|
$memberPHIDs = getProjectMembersPHIDs($viewer, $projectPHID);
|
||||||
|
foreach ($memberPHIDs as $userPHID) {
|
||||||
|
$members = array_merge($members,
|
||||||
|
handleSingleUserPHID($keydir, $viewer, $userPHID,
|
||||||
|
$system_keys, $used_keys));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $members;
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleProjectsAllPolicyRule(
|
||||||
|
$keydir, $viewer, $rule, $system_keys, &$used_keys) {
|
||||||
|
$is_first_project = true;
|
||||||
|
$allowed_members_phids = array();
|
||||||
|
foreach ($rule['value'] as $project_phid) {
|
||||||
|
$memberPHIDs = getProjectMembersPHIDs($viewer, $project_phid);
|
||||||
|
if ($is_first_project) {
|
||||||
|
$allowed_members_phids = $memberPHIDs;
|
||||||
|
$is_first_project = false;
|
||||||
|
} else {
|
||||||
|
$allowed_members_phids = array_intersect(
|
||||||
|
$allowed_members_phids, $memberPHIDs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$members = array();
|
||||||
|
foreach ($allowed_members_phids as $userPHID) {
|
||||||
|
$members = array_merge($members,
|
||||||
|
handleSingleUserPHID($keydir, $viewer, $userPHID,
|
||||||
|
$system_keys, $used_keys));
|
||||||
|
}
|
||||||
|
return $members;
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleAdministratorsPolicyRule(
|
||||||
|
$keydir, $viewer, $rule, $system_keys, &$used_keys) {
|
||||||
|
$administrators = id(new PhabricatorPeopleQuery())
|
||||||
|
->setViewer($viewer)
|
||||||
|
->withIsAdmin(true)
|
||||||
|
->execute();
|
||||||
|
|
||||||
|
$members = array();
|
||||||
|
foreach ($administrators as $administrator) {
|
||||||
|
$members = array_merge($members,
|
||||||
|
handleSingleUserPHID($keydir, $viewer, $administrator->getPHID(),
|
||||||
|
$system_keys, $used_keys));
|
||||||
|
}
|
||||||
|
return $members;
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleLegalpadSingleDocument(
|
||||||
|
$keydir, $viewer, $document, $system_keys, &$used_keys) {
|
||||||
|
if ($document->getSignatureType() !=
|
||||||
|
LegalpadDocument::SIGNATURE_TYPE_INDIVIDUAL) {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
|
$members = array();
|
||||||
|
foreach ($document->getSignatures() as $signature) {
|
||||||
|
if ($signature->getSignatureType() !=
|
||||||
|
LegalpadDocument::SIGNATURE_TYPE_INDIVIDUAL) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$members = array_merge($members,
|
||||||
|
handleSingleUserPHID($keydir, $viewer, $signature->getSignerPHID(),
|
||||||
|
$system_keys, $used_keys));
|
||||||
|
}
|
||||||
|
return $members;
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleLegalpadSignaturePolicyRule(
|
||||||
|
$keydir, $viewer, $rule, $system_keys, &$used_keys) {
|
||||||
|
$documents = id(new LegalpadDocumentQuery())
|
||||||
|
->setViewer($viewer)
|
||||||
|
->withPHIDs($rule['value'])
|
||||||
|
->needSignatures(true)
|
||||||
|
->execute();
|
||||||
|
|
||||||
|
$members = array();
|
||||||
|
foreach ($documents as $document) {
|
||||||
|
$members = array_merge(
|
||||||
|
$members,
|
||||||
|
handleLegalpadSingleDocument(
|
||||||
|
$keydir, $viewer, $document, $system_keys, $used_keys));
|
||||||
|
}
|
||||||
|
return $members;
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleCustomPolicy(
|
||||||
|
$keydir, $viewer, $policy, $system_keys, &$used_keys) {
|
||||||
|
$members = array();
|
||||||
|
$rules = $policy->getRules();
|
||||||
|
foreach ($rules as $rule) {
|
||||||
|
// Everyone is denied by default anyway
|
||||||
|
if ($rule['action'] != 'allow') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$policy_members = array();
|
||||||
|
$rule_type = $rule['rule'];
|
||||||
|
if ($rule_type == 'PhabricatorPolicyRuleUsers') {
|
||||||
|
$policy_members = handleUsersPolicyRule(
|
||||||
|
$keydir, $viewer, $rule, $system_keys, $used_keys);
|
||||||
|
} else if ($rule_type == 'PhabricatorProjectsPolicyRule') {
|
||||||
|
$policy_members = handleProjectsPolicyRule(
|
||||||
|
$keydir, $viewer, $rule, $system_keys, $used_keys);
|
||||||
|
} else if ($rule_type == 'PhabricatorProjectsAllPolicyRule') {
|
||||||
|
$policy_members = handleProjectsAllPolicyRule(
|
||||||
|
$keydir, $viewer, $rule, $system_keys, $used_keys);
|
||||||
|
} else if ($rule_type == 'PhabricatorAdministratorsPolicyRule') {
|
||||||
|
$policy_members = handleAdministratorsPolicyRule(
|
||||||
|
$keydir, $viewer, $rule, $system_keys, $used_keys);
|
||||||
|
} else if ($rule_type == 'PhabricatorLegalpadSignaturePolicyRule') {
|
||||||
|
$policy_members = handleLegalpadSignaturePolicyRule(
|
||||||
|
$keydir, $viewer, $rule, $system_keys, $used_keys);
|
||||||
|
}
|
||||||
|
|
||||||
|
$members = array_merge($members, $policy_members);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $members;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Parse repository and put it's members to the config file
|
||||||
|
function handleSingleRepository(
|
||||||
|
$keydir, $viewer, $repository, $all_repositories, $system_keys,
|
||||||
|
&$new_configuration, &$used_keys) {
|
||||||
|
$policies = PhabricatorPolicyQuery::loadPolicies(
|
||||||
|
$viewer,
|
||||||
|
$repository);
|
||||||
|
|
||||||
|
$pushable = $policies[DiffusionPushCapability::CAPABILITY];
|
||||||
|
$type = $pushable->getType();
|
||||||
|
|
||||||
|
$members = array();
|
||||||
|
|
||||||
|
if ($type == PhabricatorPolicyType::TYPE_PROJECT) {
|
||||||
|
$project = id(new PhabricatorProjectQuery())
|
||||||
|
->setViewer($viewer)
|
||||||
|
->needMembers(true)
|
||||||
|
->withPHIDs(array($pushable->getPHID()))
|
||||||
|
->executeOne();
|
||||||
|
|
||||||
|
$memberPHIDs = $project->getMemberPHIDs();
|
||||||
|
foreach ($memberPHIDs as $memberPHID) {
|
||||||
|
$members = array_merge($members,
|
||||||
|
handleSingleUserPHID($keydir, $viewer, $memberPHID,
|
||||||
|
$system_keys, $used_keys));
|
||||||
|
}
|
||||||
|
} else if ($type == PhabricatorPolicyType::TYPE_USER) {
|
||||||
|
$members = handleSingleUserPHID(
|
||||||
|
$keydir, $viewer, $pushable->getPHID(), $system_keys, $used_keys);
|
||||||
|
} else if ($type == PhabricatorPolicyType::TYPE_CUSTOM) {
|
||||||
|
$members = handleCustomPolicy(
|
||||||
|
$keydir, $viewer, $pushable, $system_keys, $used_keys);
|
||||||
|
} else {
|
||||||
|
/* pass */
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($members)) {
|
||||||
|
$uri = $repository->getRemoteURI();
|
||||||
|
$repository_name = basename($uri, '.git');
|
||||||
|
$escaped_repository_name = escape_name($repository->getName());
|
||||||
|
$group_name = "PHAB_${escaped_repository_name}";
|
||||||
|
$values = array();
|
||||||
|
$values['members'] = join(' ', $members);
|
||||||
|
$values['readonly'] = join(' ', $all_repositories);
|
||||||
|
$values['writable'] = $repository_name;
|
||||||
|
$new_configuration["group $group_name"] = $values;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove groups from previous automated configuration built
|
||||||
|
function getCleanOldConfiguration($old_configuration) {
|
||||||
|
$new_configuration = array();
|
||||||
|
foreach ($old_configuration as $group => $values) {
|
||||||
|
if (!startswith($group, 'group PHAB')) {
|
||||||
|
$new_configuration[$group] = $values;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $new_configuration;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get non-phab keys
|
||||||
|
function getSystemPublicKeys($keydir) {
|
||||||
|
$files = scandir($keydir);
|
||||||
|
$system_keys = array();
|
||||||
|
foreach ($files as $file) {
|
||||||
|
if (!startswith($file, "PHAB") && endswith($file, '.pub')) {
|
||||||
|
$key = file_get_contents("$keydir/$file");
|
||||||
|
$system_keys[$key] = basename($file, '.pub');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $system_keys;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove unused public keys
|
||||||
|
function removeUnusedPublicKeys($keydir, $used_keys) {
|
||||||
|
$files = scandir($keydir);
|
||||||
|
foreach ($files as $file) {
|
||||||
|
if (startswith($file, "PHAB")) {
|
||||||
|
$member = basename($file, '.pub');
|
||||||
|
if (!array_key_exists($member, $used_keys)) {
|
||||||
|
unlink("$keydir/$file");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function rebuildConfiguration($gitosis_root) {
|
||||||
|
$keydir = "$gitosis_root/keydir";
|
||||||
|
$configuration_file = "$gitosis_root/gitosis.conf";
|
||||||
|
|
||||||
|
if (!file_exists($configuration_file)) {
|
||||||
|
print("Not found: $configuration_file\n");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$viewer = id(new PhabricatorUser())
|
||||||
|
->loadOneWhere('username = %s', 'sergey');
|
||||||
|
|
||||||
|
$old_configuration = parse_ini_file(
|
||||||
|
$configuration_file, true, INI_SCANNER_RAW);
|
||||||
|
|
||||||
|
$new_configuration = getCleanOldConfiguration(
|
||||||
|
$old_configuration);
|
||||||
|
|
||||||
|
// Get "system" keys to re-use if phab account uses the
|
||||||
|
// same public key
|
||||||
|
$system_keys = getSystemPublicKeys($keydir);
|
||||||
|
|
||||||
|
// Get list of all repos which is awailable for read
|
||||||
|
$all_repositories = array();
|
||||||
|
foreach ($old_configuration as $group => $values) {
|
||||||
|
if (startswith($group, 'repo')) {
|
||||||
|
$repository_name = substr($group, 5, strlen($group) - 5);
|
||||||
|
if ($repository_name == 'gitosis-admin')
|
||||||
|
continue;
|
||||||
|
$all_repositories[] = $repository_name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fill in new configuration and keys
|
||||||
|
$used_keys = array();
|
||||||
|
$repositories = id(new PhabricatorRepositoryQuery())
|
||||||
|
->setViewer($viewer)
|
||||||
|
->execute();
|
||||||
|
|
||||||
|
foreach ($repositories as $repository_id => $repository) {
|
||||||
|
$type = $repository->getVersionControlSystem();
|
||||||
|
if ($type == PhabricatorRepositoryType::REPOSITORY_TYPE_GIT) {
|
||||||
|
handleSingleRepository(
|
||||||
|
$keydir, $viewer, $repository, $all_repositories, $system_keys,
|
||||||
|
$new_configuration, $used_keys);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
write_ini_file($new_configuration, $configuration_file);
|
||||||
|
removeUnusedPublicKeys($keydir, $used_keys);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getGitCommand($repository) {
|
||||||
|
$git_dir = realpath("$repository/.git");
|
||||||
|
$git = "git --git-dir='$git_dir'";
|
||||||
|
$git .= ' --work-tree='.realpath($repository);
|
||||||
|
return $git;
|
||||||
|
}
|
||||||
|
|
||||||
|
function runGitCommand($repository, $arguments,
|
||||||
|
&$output=null, &$return_var=null) {
|
||||||
|
$git = getGitCommand($repository);
|
||||||
|
$git .= " $arguments";
|
||||||
|
exec($git, $output, $return_var);
|
||||||
|
return $return_var == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
function runGitSshCommand($repository, $key, $arguments,
|
||||||
|
&$output=null, &$return_var=null) {
|
||||||
|
$gitx_ssh = realpath(dirname(__FILE__) . "/gitx-ssh");
|
||||||
|
$abs_key = realpath($key);
|
||||||
|
$git = "SSH_KEYFILE=$abs_key GIT_SSH=$gitx_ssh ";
|
||||||
|
$git .= getGitCommand($repository);
|
||||||
|
$git .= " $arguments";
|
||||||
|
exec($git, $output, $return_var);
|
||||||
|
return $return_var == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
function repositoryPull($repository, $key) {
|
||||||
|
return runGitSshCommand($repository, $key, 'pull');
|
||||||
|
}
|
||||||
|
|
||||||
|
function repositoryCommitAll($repository, $author, $message) {
|
||||||
|
if (!runGitCommand(
|
||||||
|
$repository, 'ls-files --other --exclude-standard', $untracked_files)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (count($untracked_files)) {
|
||||||
|
$flat_files = join(' ', $untracked_files);
|
||||||
|
if (!runGitCommand($repository, "add $flat_files")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
runGitCommand($repository, "update-index -q --refresh", $output);
|
||||||
|
runGitCommand($repository, "diff-index --name-only HEAD --", $output);
|
||||||
|
if (count($output)) {
|
||||||
|
return runGitCommand(
|
||||||
|
$repository, "commit --author='$author' -a -m '$message'", $output);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($argv) != 3) {
|
||||||
|
print("Usage: {$argv[0]} /path/to/gitosis-admin /path/to/id_rsa.pub\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
$gitosis_root = $argv[1];
|
||||||
|
$key = $argv[2];
|
||||||
|
|
||||||
|
if (!repositoryPull($gitosis_root, $key)) {
|
||||||
|
print("Failed to pull changes from server.\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!rebuildConfiguration($gitosis_root)) {
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!repositoryCommitAll(
|
||||||
|
$gitosis_root, 'Rebuild Gitadmin <null@git.blender.org>',
|
||||||
|
'Update to correspond changes in Phabricator')) {
|
||||||
|
print("Failed to commit changes.\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
runGitSshCommand($gitosis_root, $key, 'push origin master');
|
||||||
|
?>
|
||||||
504
scripts/gitolite/rebuild_gitolite.php
Executable file
@@ -0,0 +1,504 @@
|
|||||||
|
#!/usr/local/bin/php
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$root = dirname(dirname(dirname(__FILE__)));
|
||||||
|
require_once $root.'/scripts/__init_script__.php';
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Utilities.
|
||||||
|
//
|
||||||
|
// TODO(sergey): Move somewhere else. Or, evenmore ideally, use Phabricator's
|
||||||
|
// utilities instead.
|
||||||
|
|
||||||
|
function escape_name($name) {
|
||||||
|
return preg_replace('/[^A-Za-z0-9]/', '_', $name);
|
||||||
|
}
|
||||||
|
|
||||||
|
function startswith($string, $prefix) {
|
||||||
|
return substr($string, 0, strlen($prefix)) == $prefix;
|
||||||
|
}
|
||||||
|
|
||||||
|
function endswith($string, $suffix) {
|
||||||
|
$suffix_length = strlen($suffix);
|
||||||
|
return substr($string, strlen($string) - $suffix_length,
|
||||||
|
$suffix_length) == $suffix;
|
||||||
|
}
|
||||||
|
|
||||||
|
function file_put_contents_if_different($file_name, $content) {
|
||||||
|
if (file_exists($file_name)) {
|
||||||
|
$current_content = file_get_contents($file_name);
|
||||||
|
if ($current_content == $content) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
file_put_contents($file_name, $content);
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Phabricator access list traversal.
|
||||||
|
|
||||||
|
class Configuration {
|
||||||
|
// Phabricator user which is used as a viewer.
|
||||||
|
public $viewer;
|
||||||
|
|
||||||
|
// Directory where public keys are stored.
|
||||||
|
// Full path.
|
||||||
|
protected $keys_directory;
|
||||||
|
|
||||||
|
// Gitolite configuration file (gitolite.conf).
|
||||||
|
// Full path.
|
||||||
|
protected $config_file;
|
||||||
|
|
||||||
|
// Indexed by key content, contains configuration user name.
|
||||||
|
protected $stored_keys;
|
||||||
|
|
||||||
|
// Indexed by config user name.
|
||||||
|
protected $used_keys;
|
||||||
|
|
||||||
|
// Indexed by committers variable name, contains list of users which are
|
||||||
|
// configured by Phabricator to be able to commit to the repository.
|
||||||
|
protected $committers;
|
||||||
|
|
||||||
|
public function __construct($gitolite_root) {
|
||||||
|
$this->viewer = PhabricatorUser::getOmnipotentUser();
|
||||||
|
$this->keys_directory = "$gitolite_root/keydir";
|
||||||
|
$this->config_file = "$gitolite_root/conf/gitolite.conf";
|
||||||
|
|
||||||
|
$this->collectSystemPublicKeys();
|
||||||
|
|
||||||
|
$this->used_keys = array();
|
||||||
|
$this->committers = array();
|
||||||
|
|
||||||
|
if (!file_exists($this->config_file)) {
|
||||||
|
die("Not found: $this->config_file\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Store given key of given user.
|
||||||
|
//
|
||||||
|
// Includes both storing public key in the file, and storing mapping between
|
||||||
|
// user and the key.
|
||||||
|
public function storeUserPublicKey($user, $key) {
|
||||||
|
$full_key_content = $this->getPublicKeyContent($key);
|
||||||
|
|
||||||
|
if (array_key_exists($full_key_content, $this->stored_keys)) {
|
||||||
|
return $this->stored_keys[$full_key_content];
|
||||||
|
}
|
||||||
|
|
||||||
|
$config_user_name = $this->getConfigUserName($user, $key);
|
||||||
|
|
||||||
|
if (!array_key_exists($config_user_name, $this->used_keys)) {
|
||||||
|
$this->used_keys[$config_user_name] = true;
|
||||||
|
file_put_contents_if_different("$this->keys_directory/$config_user_name.pub",
|
||||||
|
$full_key_content);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->stored_keys[$full_key_content] = $config_user_name;
|
||||||
|
|
||||||
|
return $config_user_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setRepositoryUsers($repository, $config_user_names) {
|
||||||
|
$uri = $repository->getRemoteURI();
|
||||||
|
$repository_name = basename($uri, '.git');
|
||||||
|
|
||||||
|
$variable_name = '@committers_' . escape_name(strtolower($repository_name));
|
||||||
|
|
||||||
|
if (array_key_exists($variable_name, $this->committers)) {
|
||||||
|
die("Duplicate variable mapping for repository $uri\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->committers[$variable_name] = $config_user_names;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function writeNewConfiguration() {
|
||||||
|
$current_config = file_get_contents($this->config_file);
|
||||||
|
$current_config_lines = explode("\n", $current_config);
|
||||||
|
|
||||||
|
$new_config = "";
|
||||||
|
foreach ($current_config_lines as $line) {
|
||||||
|
if (startswith($line, '@committers_')) {
|
||||||
|
$parts = explode('=', $line);
|
||||||
|
$variable_name = trim($parts[0]);
|
||||||
|
if (array_key_exists($variable_name, $this->committers)) {
|
||||||
|
$system_committers = $this->getNonPhabtricatorUsers($parts[1]);
|
||||||
|
$all_committers = array_merge(
|
||||||
|
$system_committers, $this->committers[$variable_name]);
|
||||||
|
$unique_committers = array_unique($all_committers);
|
||||||
|
$committers = implode(' ', $unique_committers);
|
||||||
|
$line = "$variable_name = $committers";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$new_config .= $line . "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
file_put_contents_if_different($this->config_file, trim($new_config) . "\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getNonPhabtricatorUsers($configuration_value) {
|
||||||
|
$system_users = array();
|
||||||
|
$users = explode(' ', $configuration_value);
|
||||||
|
foreach ($users as $user) {
|
||||||
|
$user = trim($user);
|
||||||
|
if (empty($user)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (startswith($user, 'PHAB')) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$system_users[] = $user;
|
||||||
|
}
|
||||||
|
return $system_users;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function finalize() {
|
||||||
|
$this->removeUnusedPublicKeys();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get content of a public key to be stored in file.
|
||||||
|
protected function getPublicKeyContent($key) {
|
||||||
|
return $key->getKeyType().' '.
|
||||||
|
$key->getKeyBody().' '.
|
||||||
|
$key->getKeyComment()."\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get user+key name used by the Gitolite configuration.
|
||||||
|
protected function getConfigUserName($user, $key) {
|
||||||
|
$escaped_key_name = escape_name($key->getName());
|
||||||
|
return 'PHAB_'.$user->getUserName().
|
||||||
|
'_'.$escaped_key_name.
|
||||||
|
'_'.$key->getID();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get keys which are not managed by this Phabricator/Git integration script.
|
||||||
|
//
|
||||||
|
// Returns map from key content to the key file name. This is used to avoid
|
||||||
|
// public key duplication in the case system key is used by phabricator user.
|
||||||
|
protected function collectSystemPublicKeys() {
|
||||||
|
$files = scandir($this->keys_directory);
|
||||||
|
foreach ($files as $file) {
|
||||||
|
if (startswith($file, "PHAB")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (!endswith($file, '.pub')) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$key = file_get_contents("$this->keys_directory/$file");
|
||||||
|
$file_we = basename($file, '.pub');
|
||||||
|
$this->stored_keys[$key] = $file_we;
|
||||||
|
$this->used_keys[$file_we] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function removeUnusedPublicKeys() {
|
||||||
|
$files = scandir($this->keys_directory);
|
||||||
|
foreach ($files as $file) {
|
||||||
|
if (!startswith($file, "PHAB")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$config_user_name = basename($file, '.pub');
|
||||||
|
if (!array_key_exists($config_user_name, $this->used_keys)) {
|
||||||
|
unlink("$this->keys_directory/$file");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
function getProjectMembersPHIDs($viewer, $project_phid) {
|
||||||
|
$project = id(new PhabricatorProjectQuery())
|
||||||
|
->setViewer($viewer)
|
||||||
|
->needMembers(true)
|
||||||
|
->withPHIDs(array($project_phid))
|
||||||
|
->executeOne();
|
||||||
|
|
||||||
|
return $project->getMemberPHIDs();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get user's heys and put them to the configuration
|
||||||
|
function handleSingleUserPHID($config, $userPHID) {
|
||||||
|
$user = id(new PhabricatorPeopleQuery())
|
||||||
|
->setViewer($config->viewer)
|
||||||
|
->withPHIDs(array($userPHID))
|
||||||
|
->executeOne();
|
||||||
|
if (!$user) {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($user->getIsDisabled()) {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
|
$keys = id(new PhabricatorAuthSSHKey())->loadAllWhere(
|
||||||
|
'objectPHID = %s',
|
||||||
|
$user->getPHID());
|
||||||
|
|
||||||
|
$config_user_names = array();
|
||||||
|
foreach ($keys as $key) {
|
||||||
|
$config_user_name = $config->storeUserPublicKey($user, $key);
|
||||||
|
$config_user_names[] = $config_user_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $config_user_names;
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleUsersPolicyRule($config, $rule) {
|
||||||
|
$config_user_names = array();
|
||||||
|
foreach ($rule['value'] as $userPHID) {
|
||||||
|
$config_user_names = array_merge($config_user_names,
|
||||||
|
handleSingleUserPHID($config, $userPHID));
|
||||||
|
}
|
||||||
|
return $config_user_names;
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleProjectsPolicyRule($config, $rule) {
|
||||||
|
$config_user_names = array();
|
||||||
|
foreach ($rule['value'] as $projectPHID) {
|
||||||
|
$memberPHIDs = getProjectMembersPHIDs($config->viewer, $projectPHID);
|
||||||
|
foreach ($memberPHIDs as $userPHID) {
|
||||||
|
$config_user_names = array_merge($config_user_names,
|
||||||
|
handleSingleUserPHID($config, $userPHID));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $config_user_names;
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleProjectsAllPolicyRule($config, $rule) {
|
||||||
|
$is_first_project = true;
|
||||||
|
$allowed_members_phids = array();
|
||||||
|
foreach ($rule['value'] as $project_phid) {
|
||||||
|
$memberPHIDs = getProjectMembersPHIDs($config->viewer, $project_phid);
|
||||||
|
if ($is_first_project) {
|
||||||
|
$allowed_members_phids = $memberPHIDs;
|
||||||
|
$is_first_project = false;
|
||||||
|
} else {
|
||||||
|
$allowed_members_phids = array_intersect(
|
||||||
|
$allowed_members_phids, $memberPHIDs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$config_user_names = array();
|
||||||
|
foreach ($allowed_members_phids as $userPHID) {
|
||||||
|
$config_user_names = array_merge($config_user_names,
|
||||||
|
handleSingleUserPHID($config, $userPHID));
|
||||||
|
}
|
||||||
|
return $config_user_names;
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleAdministratorsPolicyRule($config, $rule) {
|
||||||
|
$administrators = id(new PhabricatorPeopleQuery())
|
||||||
|
->setViewer($config->viewer)
|
||||||
|
->withIsAdmin(true)
|
||||||
|
->execute();
|
||||||
|
|
||||||
|
$config_user_names = array();
|
||||||
|
foreach ($administrators as $administrator) {
|
||||||
|
$config_user_names = array_merge($config_user_names,
|
||||||
|
handleSingleUserPHID($config, $administrator->getPHID()));
|
||||||
|
}
|
||||||
|
return $config_user_names;
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleLegalpadSingleDocument($config, $document) {
|
||||||
|
if ($document->getSignatureType() !=
|
||||||
|
LegalpadDocument::SIGNATURE_TYPE_INDIVIDUAL) {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
|
$config_user_names = array();
|
||||||
|
foreach ($document->getSignatures() as $signature) {
|
||||||
|
if ($signature->getSignatureType() !=
|
||||||
|
LegalpadDocument::SIGNATURE_TYPE_INDIVIDUAL) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$config_user_names = array_merge($config_user_names,
|
||||||
|
handleSingleUserPHID($config, $signature->getSignerPHID()));
|
||||||
|
}
|
||||||
|
return $config_user_names;
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleLegalpadSignaturePolicyRule($config, $rule) {
|
||||||
|
$documents = id(new LegalpadDocumentQuery())
|
||||||
|
->setViewer($config->viewer)
|
||||||
|
->withPHIDs($rule['value'])
|
||||||
|
->needSignatures(true)
|
||||||
|
->execute();
|
||||||
|
|
||||||
|
$config_user_names = array();
|
||||||
|
foreach ($documents as $document) {
|
||||||
|
$config_user_names = array_merge($config_user_names,
|
||||||
|
handleLegalpadSingleDocument($config, $document));
|
||||||
|
}
|
||||||
|
return $config_user_names;
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleCustomPolicy($config, $policy) {
|
||||||
|
$config_user_names = array();
|
||||||
|
$rules = $policy->getRules();
|
||||||
|
foreach ($rules as $rule) {
|
||||||
|
// Everyone is denied by default anyway
|
||||||
|
if ($rule['action'] != 'allow') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$policy_config_user_names = array();
|
||||||
|
$rule_type = $rule['rule'];
|
||||||
|
if ($rule_type == 'PhabricatorPolicyRuleUsers') {
|
||||||
|
$policy_config_user_names =
|
||||||
|
handleUsersPolicyRule($config, $rule);
|
||||||
|
} else if ($rule_type == 'PhabricatorProjectsPolicyRule') {
|
||||||
|
$policy_config_user_names =
|
||||||
|
handleProjectsPolicyRule($config, $rule);
|
||||||
|
} else if ($rule_type == 'PhabricatorProjectsAllPolicyRule') {
|
||||||
|
$policy_config_user_names =
|
||||||
|
handleProjectsAllPolicyRule($config, $rule);
|
||||||
|
} else if ($rule_type == 'PhabricatorAdministratorsPolicyRule') {
|
||||||
|
$policy_config_user_names =
|
||||||
|
handleAdministratorsPolicyRule($config, $rule);
|
||||||
|
} else if ($rule_type == 'PhabricatorLegalpadSignaturePolicyRule') {
|
||||||
|
$policy_config_user_names =
|
||||||
|
handleLegalpadSignaturePolicyRule($config, $rule);
|
||||||
|
}
|
||||||
|
|
||||||
|
$config_user_names = array_merge(
|
||||||
|
$config_user_names, $policy_config_user_names);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $config_user_names;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Parse repository and put it's members to the config file
|
||||||
|
function handleSingleRepository($config, $repository) {
|
||||||
|
$policies = PhabricatorPolicyQuery::loadPolicies(
|
||||||
|
$config->viewer,
|
||||||
|
$repository);
|
||||||
|
|
||||||
|
$pushable = $policies[DiffusionPushCapability::CAPABILITY];
|
||||||
|
$type = $pushable->getType();
|
||||||
|
|
||||||
|
$config_user_names = array();
|
||||||
|
|
||||||
|
if ($type == PhabricatorPolicyType::TYPE_PROJECT) {
|
||||||
|
$project = id(new PhabricatorProjectQuery())
|
||||||
|
->setViewer($config->viewer)
|
||||||
|
->needMembers(true)
|
||||||
|
->withPHIDs(array($pushable->getPHID()))
|
||||||
|
->executeOne();
|
||||||
|
|
||||||
|
$memberPHIDs = $project->getMemberPHIDs();
|
||||||
|
foreach ($memberPHIDs as $memberPHID) {
|
||||||
|
$config_user_names = array_merge($config_user_names,
|
||||||
|
handleSingleUserPHID($config, $memberPHID));
|
||||||
|
}
|
||||||
|
} else if ($type == PhabricatorPolicyType::TYPE_USER) {
|
||||||
|
$config_user_names = handleSingleUserPHID($config, $pushable->getPHID());
|
||||||
|
} else if ($type == PhabricatorPolicyType::TYPE_CUSTOM) {
|
||||||
|
$config_user_names = handleCustomPolicy($config, $pushable);
|
||||||
|
} else {
|
||||||
|
/* pass */
|
||||||
|
}
|
||||||
|
|
||||||
|
$config->setRepositoryUsers($repository, $config_user_names);
|
||||||
|
}
|
||||||
|
|
||||||
|
function rebuildConfiguration($gitolite_root) {
|
||||||
|
$config = new Configuration($gitolite_root);
|
||||||
|
|
||||||
|
// Fill in new configuration and keys
|
||||||
|
$used_keys = array();
|
||||||
|
$repositories = id(new PhabricatorRepositoryQuery())
|
||||||
|
->setViewer($config->viewer)
|
||||||
|
->execute();
|
||||||
|
|
||||||
|
foreach ($repositories as $repository_id => $repository) {
|
||||||
|
$type = $repository->getVersionControlSystem();
|
||||||
|
if ($type == PhabricatorRepositoryType::REPOSITORY_TYPE_GIT) {
|
||||||
|
handleSingleRepository($config, $repository);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$config->writeNewConfiguration();
|
||||||
|
|
||||||
|
$config->finalize();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Repository manipulation functionality.
|
||||||
|
|
||||||
|
function getGitCommand($repository) {
|
||||||
|
$git_dir = realpath("$repository/.git");
|
||||||
|
$git = "git --git-dir='$git_dir'";
|
||||||
|
$git .= ' --work-tree='.realpath($repository);
|
||||||
|
return $git;
|
||||||
|
}
|
||||||
|
|
||||||
|
function runGitCommand($repository, $arguments,
|
||||||
|
&$output=null, &$return_var=null) {
|
||||||
|
$git = getGitCommand($repository);
|
||||||
|
$git .= " $arguments";
|
||||||
|
exec($git, $output, $return_var);
|
||||||
|
return $return_var == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
function runGitSshCommand($repository, $key, $arguments,
|
||||||
|
&$output=null, &$return_var=null) {
|
||||||
|
$abs_key = realpath($key);
|
||||||
|
$git = "GIT_SSH_COMMAND=\"ssh -i $key -o IdentitiesOnly=yes\" ";
|
||||||
|
$git .= getGitCommand($repository);
|
||||||
|
$git .= " $arguments";
|
||||||
|
exec($git, $output, $return_var);
|
||||||
|
return $return_var == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
function repositoryPull($repository, $key) {
|
||||||
|
return runGitSshCommand($repository, $key, 'pull --rebase');
|
||||||
|
}
|
||||||
|
|
||||||
|
function repositoryCommitAll($repository, $author, $message) {
|
||||||
|
if (!runGitCommand(
|
||||||
|
$repository, 'ls-files --other --exclude-standard', $untracked_files)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (count($untracked_files)) {
|
||||||
|
$flat_files = join(' ', $untracked_files);
|
||||||
|
if (!runGitCommand($repository, "add $flat_files")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
runGitCommand($repository, "update-index -q --refresh", $output);
|
||||||
|
runGitCommand($repository, "diff-index --name-only HEAD --", $output);
|
||||||
|
if (count($output)) {
|
||||||
|
return runGitCommand(
|
||||||
|
$repository, "commit --author='$author' -a -m '$message'", $output);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($argv) != 3) {
|
||||||
|
print("Usage: {$argv[0]} /path/to/gitolite-admin /path/to/id_rsa.pub\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
$gitolite_root = $argv[1];
|
||||||
|
$key = $argv[2];
|
||||||
|
|
||||||
|
if (!repositoryPull($gitolite_root, $key)) {
|
||||||
|
print("Failed to pull changes from server.\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!rebuildConfiguration($gitolite_root)) {
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!repositoryCommitAll(
|
||||||
|
$gitolite_root, 'Rebuild Gitadmin <null@git.blender.org>',
|
||||||
|
'Update to correspond changes in Phabricator')) {
|
||||||
|
print("Failed to commit changes.\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
runGitSshCommand($gitolite_root, $key, 'push origin master');
|
||||||
|
?>
|
||||||
@@ -22,7 +22,7 @@ failed() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ISSUE=`cat /etc/issue`
|
ISSUE=`cat /etc/issue`
|
||||||
if [[ $ISSUE != Ubuntu* ]]
|
if [[ ($ISSUE != Ubuntu*) && ($ISSUE != Debian*) ]];
|
||||||
then
|
then
|
||||||
echo "This script is intended for use on Ubuntu, but this system appears";
|
echo "This script is intended for use on Ubuntu, but this system appears";
|
||||||
echo "to be something else. Your results may vary.";
|
echo "to be something else. Your results may vary.";
|
||||||
|
|||||||
@@ -211,29 +211,21 @@ try {
|
|||||||
->setUniqueMethod('getName')
|
->setUniqueMethod('getName')
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
$command_list = array_keys($workflows);
|
|
||||||
$command_list = implode(', ', $command_list);
|
|
||||||
|
|
||||||
$error_lines = array();
|
|
||||||
$error_lines[] = pht('Welcome to Phabricator.');
|
|
||||||
$error_lines[] = pht(
|
|
||||||
'You are logged in as %s.',
|
|
||||||
$user_name);
|
|
||||||
|
|
||||||
if (!$original_argv) {
|
if (!$original_argv) {
|
||||||
$error_lines[] = pht(
|
throw new Exception(
|
||||||
'You have not specified a command to run. This means you are requesting '.
|
pht(
|
||||||
'an interactive shell, but Phabricator does not provide interactive '.
|
"Welcome to Phabricator.\n\n".
|
||||||
'shells over SSH.');
|
"You are logged in as %s.\n\n".
|
||||||
$error_lines[] = pht(
|
"You haven't specified a command to run. This means you're requesting ".
|
||||||
'(Usually, you should run a command like "git clone" or "hg push" '.
|
"an interactive shell, but Phabricator does not provide an ".
|
||||||
'instead of connecting directly with SSH.)');
|
"interactive shell over SSH.\n\n".
|
||||||
$error_lines[] = pht(
|
"Usually, you should run a command like `%s` or `%s` ".
|
||||||
'Supported commands are: %s.',
|
"rather than connecting directly with SSH.\n\n".
|
||||||
$command_list);
|
"Supported commands are: %s.",
|
||||||
|
$user_name,
|
||||||
$error_lines = implode("\n\n", $error_lines);
|
'git clone',
|
||||||
throw new PhutilArgumentUsageException($error_lines);
|
'hg push',
|
||||||
|
implode(', ', array_keys($workflows))));
|
||||||
}
|
}
|
||||||
|
|
||||||
$log_argv = implode(' ', $original_argv);
|
$log_argv = implode(' ', $original_argv);
|
||||||
@@ -255,20 +247,7 @@ try {
|
|||||||
$parsed_args = new PhutilArgumentParser($parseable_argv);
|
$parsed_args = new PhutilArgumentParser($parseable_argv);
|
||||||
|
|
||||||
if (empty($workflows[$command])) {
|
if (empty($workflows[$command])) {
|
||||||
$error_lines[] = pht(
|
throw new Exception(pht('Invalid command.'));
|
||||||
'You have specified the command "%s", but that command is not '.
|
|
||||||
'supported by Phabricator. As received by Phabricator, your entire '.
|
|
||||||
'argument list was:',
|
|
||||||
$command);
|
|
||||||
|
|
||||||
$error_lines[] = csprintf(' $ ssh ... -- %Ls', $parseable_argv);
|
|
||||||
|
|
||||||
$error_lines[] = pht(
|
|
||||||
'Supported commands are: %s.',
|
|
||||||
$command_list);
|
|
||||||
|
|
||||||
$error_lines = implode("\n\n", $error_lines);
|
|
||||||
throw new PhutilArgumentUsageException($error_lines);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$workflow = $parsed_args->parseWorkflows($workflows);
|
$workflow = $parsed_args->parseWorkflows($workflows);
|
||||||
|
|||||||
61
scripts/svnauth/archived_repos.php
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
<?php
|
||||||
|
$ARCHIVED_REPOS = array(
|
||||||
|
'abstractmesh',
|
||||||
|
'beast',
|
||||||
|
# 'bf-blender',
|
||||||
|
'bf-docboard-es',
|
||||||
|
'bf-extensions',
|
||||||
|
'bf-funboard',
|
||||||
|
'bf-scripts',
|
||||||
|
# 'bf-translations',
|
||||||
|
'bfct',
|
||||||
|
'bforge',
|
||||||
|
'blend-doc',
|
||||||
|
'blend2cs',
|
||||||
|
'blendedmidi',
|
||||||
|
'blendercad',
|
||||||
|
'blendxml',
|
||||||
|
'bzoo',
|
||||||
|
'docboard',
|
||||||
|
'drqueue',
|
||||||
|
'ghost',
|
||||||
|
'girona',
|
||||||
|
'guiman',
|
||||||
|
'lsystem',
|
||||||
|
'magic',
|
||||||
|
'makeh',
|
||||||
|
'mechanicblender',
|
||||||
|
'neverblender',
|
||||||
|
'news',
|
||||||
|
'night',
|
||||||
|
'nitrox',
|
||||||
|
'osgexport',
|
||||||
|
'peerrating',
|
||||||
|
'piovra',
|
||||||
|
'pyverse',
|
||||||
|
'qdune',
|
||||||
|
'scolblender',
|
||||||
|
'skined',
|
||||||
|
'smdio',
|
||||||
|
'soapyblender',
|
||||||
|
'soc-2005',
|
||||||
|
'soc-2006',
|
||||||
|
'soc-2007',
|
||||||
|
'soc-2008',
|
||||||
|
'sourceforge',
|
||||||
|
'spe',
|
||||||
|
'stats',
|
||||||
|
'ter2blend',
|
||||||
|
'torqueexporter',
|
||||||
|
'tuhopuu',
|
||||||
|
'tzuray',
|
||||||
|
'vectex',
|
||||||
|
'vectorrender',
|
||||||
|
'verse',
|
||||||
|
'vrmlimportexp',
|
||||||
|
'warblender',
|
||||||
|
'wpyre',
|
||||||
|
'yafray',
|
||||||
|
'yofrankie'
|
||||||
|
);
|
||||||
|
?>
|
||||||
292
scripts/svnauth/rebuild_svnauth.php
Executable file
@@ -0,0 +1,292 @@
|
|||||||
|
#!/usr/local/bin/php
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$root = dirname(dirname(dirname(__FILE__)));
|
||||||
|
require_once $root.'/scripts/__init_script__.php';
|
||||||
|
|
||||||
|
function getSVNRepositoryName($repository) {
|
||||||
|
$uri = $repository->getRemoteURI();
|
||||||
|
return preg_replace(
|
||||||
|
'/https?\:\/\/.*?\/svnroot\/([^\/]+)\/?.*/', '$1', $uri);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get user's heys and put them to the configuration
|
||||||
|
function handleSingleUserPHID(
|
||||||
|
$viewer, $userPHID, $repository, &$namemap, &$access) {
|
||||||
|
$user = id(new PhabricatorPeopleQuery())
|
||||||
|
->setViewer($viewer)
|
||||||
|
->withPHIDs(array($userPHID))
|
||||||
|
->executeOne();
|
||||||
|
if (!$user) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($user->getIsDisabled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$user_name = $user->getUserName();
|
||||||
|
if (!array_key_exists($user_name, $namemap)) {
|
||||||
|
$namemap[$user_name] = array('email' => $user->loadPrimaryEmailAddress(),
|
||||||
|
'name' => $user->getRealName());
|
||||||
|
}
|
||||||
|
|
||||||
|
$repository_name = getSVNRepositoryName($repository);
|
||||||
|
|
||||||
|
$repository_rootpath = $repository_name . ':/';
|
||||||
|
if (!array_key_exists($repository_rootpath, $access)) {
|
||||||
|
$access[$repository_rootpath]['RW'] = array();
|
||||||
|
$access[$repository_rootpath]['RO'] = array();
|
||||||
|
}
|
||||||
|
$access[$repository_rootpath]['RO'][] = $user_name;
|
||||||
|
|
||||||
|
// Store write access settings to current subath
|
||||||
|
$subpath = $repository->getDetail('svn-subpath');
|
||||||
|
$subpath = rtrim($subpath, '/');
|
||||||
|
$repository_pathname = "$repository_name:/$subpath";
|
||||||
|
if (!array_key_exists($repository_pathname, $access)) {
|
||||||
|
$access[$repository_pathname]['RW'] = array();
|
||||||
|
$access[$repository_pathname]['RO'] = array();
|
||||||
|
}
|
||||||
|
$access[$repository_pathname]['RW'][] = $user_name;
|
||||||
|
|
||||||
|
// Write access to the tags
|
||||||
|
$tags_pathname = "$repository_name:/tags";
|
||||||
|
if (!array_key_exists($tags_pathname, $access)) {
|
||||||
|
$access[$tags_pathname]['RW'] = array();
|
||||||
|
$access[$tags_pathname]['RO'] = array();
|
||||||
|
}
|
||||||
|
$access[$tags_pathname]['RW'][] = $user_name;
|
||||||
|
|
||||||
|
// Write access to the branches.
|
||||||
|
$branches_pathname = "$repository_name:/branches";
|
||||||
|
if (!array_key_exists($branches_pathname, $access)) {
|
||||||
|
$access[$branches_pathname]['RW'] = array();
|
||||||
|
$access[$branches_pathname]['RO'] = array();
|
||||||
|
}
|
||||||
|
$access[$branches_pathname]['RW'][] = $user_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getProjectMembersPHIDs($viewer, $project_phid) {
|
||||||
|
$project = id(new PhabricatorProjectQuery())
|
||||||
|
->setViewer($viewer)
|
||||||
|
->needMembers(true)
|
||||||
|
->withPHIDs(array($project_phid))
|
||||||
|
->executeOne();
|
||||||
|
|
||||||
|
return $project->getMemberPHIDs();
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleProjectPHID(
|
||||||
|
$viewer, $project_phid, $repository, &$namemap, &$access) {
|
||||||
|
$memberPHIDs = getProjectMembersPHIDs($viewer, $project_phid);
|
||||||
|
foreach ($memberPHIDs as $memberPHID) {
|
||||||
|
handleSingleUserPHID(
|
||||||
|
$viewer, $memberPHID, $repository, $namemap, $access);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleUsersPolicyRule(
|
||||||
|
$viewer, $rule, $repository, &$namemap, &$access) {
|
||||||
|
foreach ($rule['value'] as $user_phid) {
|
||||||
|
handleSingleUserPHID(
|
||||||
|
$viewer, $user_phid, $repository, $namemap, $access);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleProjectsPolicyRule(
|
||||||
|
$viewer, $rule, $repository, &$namemap, &$access) {
|
||||||
|
foreach ($rule['value'] as $project_phid) {
|
||||||
|
handleProjectPHID(
|
||||||
|
$viewer, $project_phid, $repository, $namemap, $access);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleProjectsAllPolicyRule(
|
||||||
|
$viewer, $rule, $repository, &$namemap, &$access) {
|
||||||
|
$is_first_project = true;
|
||||||
|
$allowed_members_phids = array();
|
||||||
|
foreach ($rule['value'] as $project_phid) {
|
||||||
|
$memberPHIDs = getProjectMembersPHIDs($viewer, $project_phid);
|
||||||
|
if ($is_first_project) {
|
||||||
|
$allowed_members_phids = $memberPHIDs;
|
||||||
|
$is_first_project = false;
|
||||||
|
} else {
|
||||||
|
$allowed_members_phids = array_intersect(
|
||||||
|
$allowed_members_phids, $memberPHIDs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($allowed_members_phids as $user_phid) {
|
||||||
|
handleSingleUserPHID(
|
||||||
|
$viewer, $user_phid, $repository, $namemap, $access);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleAdministratorsPolicyRule(
|
||||||
|
$viewer, $rule, $repository, &$namemap, &$access) {
|
||||||
|
$administrators = id(new PhabricatorPeopleQuery())
|
||||||
|
->setViewer($viewer)
|
||||||
|
->withIsAdmin(true)
|
||||||
|
->execute();
|
||||||
|
foreach ($administrators as $administrator) {
|
||||||
|
handleSingleUserPHID(
|
||||||
|
$viewer, $administrator->getPHID(), $repository, $namemap, $access);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleLegalpadSingleDocument(
|
||||||
|
$viewer, $document, $repository, &$namemap, &$access) {
|
||||||
|
if ($document->getSignatureType() !=
|
||||||
|
LegalpadDocument::SIGNATURE_TYPE_INDIVIDUAL) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($document->getSignatures() as $signature) {
|
||||||
|
if ($signature->getSignatureType() !=
|
||||||
|
LegalpadDocument::SIGNATURE_TYPE_INDIVIDUAL) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
handleSingleUserPHID(
|
||||||
|
$viewer, $signature->getSignerPHID(), $repository, $namemap, $access);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleLegalpadSignaturePolicyRule(
|
||||||
|
$viewer, $rule, $repository, &$namemap, &$access) {
|
||||||
|
$documents = id(new LegalpadDocumentQuery())
|
||||||
|
->setViewer($viewer)
|
||||||
|
->withPHIDs($rule['value'])
|
||||||
|
->needSignatures(true)
|
||||||
|
->execute();
|
||||||
|
|
||||||
|
foreach ($documents as $document) {
|
||||||
|
handleLegalpadSingleDocument(
|
||||||
|
$viewer, $document, $repository, $namemap, $access);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleCustomPolicyRule(
|
||||||
|
$viewer, $rule, $repository, &$namemap, &$access) {
|
||||||
|
if ($rule['action'] != PhabricatorPolicy::ACTION_ALLOW) {
|
||||||
|
// By default the script decides to DENY unless explicitly allowed.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$rule_type = $rule['rule'];
|
||||||
|
if ($rule_type == 'PhabricatorUsersPolicyRule') {
|
||||||
|
handleUsersPolicyRule(
|
||||||
|
$viewer, $rule, $repository, $namemap, $access);
|
||||||
|
} else if ($rule_type == 'PhabricatorProjectsPolicyRule') {
|
||||||
|
handleProjectsPolicyRule(
|
||||||
|
$viewer, $rule, $repository, $namemap, $access);
|
||||||
|
} else if ($rule_type == 'PhabricatorProjectsAllPolicyRule') {
|
||||||
|
handleProjectsAllPolicyRule(
|
||||||
|
$viewer, $rule, $repository, $namemap, $access);
|
||||||
|
} else if ($rule_type == 'PhabricatorAdministratorsPolicyRule') {
|
||||||
|
handleAdministratorsPolicyRule(
|
||||||
|
$viewer, $rule, $repository, $namemap, $access);
|
||||||
|
} else if ($rule_type == 'PhabricatorLegalpadSignaturePolicyRule') {
|
||||||
|
handleLegalpadSignaturePolicyRule(
|
||||||
|
$viewer, $rule, $repository, $namemap, $access);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleCustomPolicy(
|
||||||
|
$viewer, $policy, $repository, &$namemap, &$access) {
|
||||||
|
foreach ($policy->getRules() as $rule) {
|
||||||
|
handleCustomPolicyRule($viewer, $rule, $repository, $namemap, $access);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Parse repository and put it's members to the config file
|
||||||
|
function handleSingleRepository(
|
||||||
|
$viewer, $repository, &$namemap, &$access) {
|
||||||
|
$policies = PhabricatorPolicyQuery::loadPolicies(
|
||||||
|
$viewer,
|
||||||
|
$repository);
|
||||||
|
|
||||||
|
$pushable = $policies[DiffusionPushCapability::CAPABILITY];
|
||||||
|
$type = phid_get_type($pushable->getPHID());
|
||||||
|
|
||||||
|
// Make sure repository is always available for read-only access
|
||||||
|
$repository_rootpath = getSVNRepositoryName($repository) . ':/';
|
||||||
|
if (!array_key_exists($repository_rootpath, $access)) {
|
||||||
|
$access[$repository_rootpath]['RW'] = array();
|
||||||
|
$access[$repository_rootpath]['RO'] = array();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($type == PhabricatorProjectProjectPHIDType::TYPECONST) {
|
||||||
|
handleProjectPHID(
|
||||||
|
$viewer, $pushable->getPHID(), $repository, $namemap, $access);
|
||||||
|
} else if ($type == PhabricatorPolicyType::TYPE_USER) {
|
||||||
|
handleSingleUserPHID(
|
||||||
|
$viewer, $pushable->getPHID(), $repository, $namemap, $access);
|
||||||
|
} else if ($type == PhabricatorPolicyPHIDTypePolicy::TYPECONST) {
|
||||||
|
handleCustomPolicy(
|
||||||
|
$viewer, $pushable, $repository, $namemap, $access);
|
||||||
|
/* pass */
|
||||||
|
} else {
|
||||||
|
/* pass */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function rebuildConfiguration($what) {
|
||||||
|
$viewer = id(new PhabricatorUser())
|
||||||
|
->loadOneWhere('username = %s', 'sergey');
|
||||||
|
|
||||||
|
$repositories = id(new PhabricatorRepositoryQuery())
|
||||||
|
->setViewer($viewer)
|
||||||
|
->execute();
|
||||||
|
|
||||||
|
$namemap = array();
|
||||||
|
$access = array();
|
||||||
|
|
||||||
|
require_once 'archived_repos.php';
|
||||||
|
foreach ($ARCHIVED_REPOS as $repository) {
|
||||||
|
$repository_pathname = "$repository:/";
|
||||||
|
$access[$repository_pathname]['RW'] = array();
|
||||||
|
$access[$repository_pathname]['RO'] = array();
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($repositories as $repository_id => $repository) {
|
||||||
|
$type = $repository->getVersionControlSystem();
|
||||||
|
if ($type == PhabricatorRepositoryType::REPOSITORY_TYPE_SVN) {
|
||||||
|
handleSingleRepository(
|
||||||
|
$viewer, $repository, $namemap, $access);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($what == 'ACCESS') {
|
||||||
|
foreach ($access as $repository => $users) {
|
||||||
|
print("[$repository]\n");
|
||||||
|
$rw_users = array();
|
||||||
|
foreach ($users['RW'] as $user) {
|
||||||
|
print("$user = rw\n");
|
||||||
|
$rw_users[$user] = true;
|
||||||
|
}
|
||||||
|
foreach ($users['RO'] as $user) {
|
||||||
|
if (!array_key_exists($user, $rw_users)) {
|
||||||
|
print("$user = r\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
print("anonsvn = r\n");
|
||||||
|
print("* = r\n\n");
|
||||||
|
}
|
||||||
|
} else if ($what == 'NAMEMAP') {
|
||||||
|
foreach ($namemap as $user => $data) {
|
||||||
|
print("$user\t${data['email']}\t${data['name']}\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($argv) != 2 ||
|
||||||
|
($argv[1] != 'ACCESS' && $argv[1] != 'NAMEMAP')) {
|
||||||
|
print("Usage: {$argv[0]} ACCESS|NAMEMAP\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
rebuildConfiguration($argv[1]);
|
||||||
|
?>
|
||||||
@@ -770,7 +770,6 @@ phutil_register_library_map(array(
|
|||||||
'DiffusionCommitEditEngine' => 'applications/diffusion/editor/DiffusionCommitEditEngine.php',
|
'DiffusionCommitEditEngine' => 'applications/diffusion/editor/DiffusionCommitEditEngine.php',
|
||||||
'DiffusionCommitFerretEngine' => 'applications/repository/search/DiffusionCommitFerretEngine.php',
|
'DiffusionCommitFerretEngine' => 'applications/repository/search/DiffusionCommitFerretEngine.php',
|
||||||
'DiffusionCommitFulltextEngine' => 'applications/repository/search/DiffusionCommitFulltextEngine.php',
|
'DiffusionCommitFulltextEngine' => 'applications/repository/search/DiffusionCommitFulltextEngine.php',
|
||||||
'DiffusionCommitGraphView' => 'applications/diffusion/view/DiffusionCommitGraphView.php',
|
|
||||||
'DiffusionCommitHasPackageEdgeType' => 'applications/diffusion/edge/DiffusionCommitHasPackageEdgeType.php',
|
'DiffusionCommitHasPackageEdgeType' => 'applications/diffusion/edge/DiffusionCommitHasPackageEdgeType.php',
|
||||||
'DiffusionCommitHasRevisionEdgeType' => 'applications/diffusion/edge/DiffusionCommitHasRevisionEdgeType.php',
|
'DiffusionCommitHasRevisionEdgeType' => 'applications/diffusion/edge/DiffusionCommitHasRevisionEdgeType.php',
|
||||||
'DiffusionCommitHasRevisionRelationship' => 'applications/diffusion/relationships/DiffusionCommitHasRevisionRelationship.php',
|
'DiffusionCommitHasRevisionRelationship' => 'applications/diffusion/relationships/DiffusionCommitHasRevisionRelationship.php',
|
||||||
@@ -783,6 +782,7 @@ phutil_register_library_map(array(
|
|||||||
'DiffusionCommitHookEngine' => 'applications/diffusion/engine/DiffusionCommitHookEngine.php',
|
'DiffusionCommitHookEngine' => 'applications/diffusion/engine/DiffusionCommitHookEngine.php',
|
||||||
'DiffusionCommitHookRejectException' => 'applications/diffusion/exception/DiffusionCommitHookRejectException.php',
|
'DiffusionCommitHookRejectException' => 'applications/diffusion/exception/DiffusionCommitHookRejectException.php',
|
||||||
'DiffusionCommitListController' => 'applications/diffusion/controller/DiffusionCommitListController.php',
|
'DiffusionCommitListController' => 'applications/diffusion/controller/DiffusionCommitListController.php',
|
||||||
|
'DiffusionCommitListView' => 'applications/diffusion/view/DiffusionCommitListView.php',
|
||||||
'DiffusionCommitMergeHeraldField' => 'applications/diffusion/herald/DiffusionCommitMergeHeraldField.php',
|
'DiffusionCommitMergeHeraldField' => 'applications/diffusion/herald/DiffusionCommitMergeHeraldField.php',
|
||||||
'DiffusionCommitMessageHeraldField' => 'applications/diffusion/herald/DiffusionCommitMessageHeraldField.php',
|
'DiffusionCommitMessageHeraldField' => 'applications/diffusion/herald/DiffusionCommitMessageHeraldField.php',
|
||||||
'DiffusionCommitPackageAuditHeraldField' => 'applications/diffusion/herald/DiffusionCommitPackageAuditHeraldField.php',
|
'DiffusionCommitPackageAuditHeraldField' => 'applications/diffusion/herald/DiffusionCommitPackageAuditHeraldField.php',
|
||||||
@@ -861,8 +861,12 @@ phutil_register_library_map(array(
|
|||||||
'DiffusionGitWireProtocolCapabilities' => 'applications/diffusion/protocol/DiffusionGitWireProtocolCapabilities.php',
|
'DiffusionGitWireProtocolCapabilities' => 'applications/diffusion/protocol/DiffusionGitWireProtocolCapabilities.php',
|
||||||
'DiffusionGitWireProtocolRef' => 'applications/diffusion/protocol/DiffusionGitWireProtocolRef.php',
|
'DiffusionGitWireProtocolRef' => 'applications/diffusion/protocol/DiffusionGitWireProtocolRef.php',
|
||||||
'DiffusionGitWireProtocolRefList' => 'applications/diffusion/protocol/DiffusionGitWireProtocolRefList.php',
|
'DiffusionGitWireProtocolRefList' => 'applications/diffusion/protocol/DiffusionGitWireProtocolRefList.php',
|
||||||
|
'DiffusionGraphController' => 'applications/diffusion/controller/DiffusionGraphController.php',
|
||||||
'DiffusionHistoryController' => 'applications/diffusion/controller/DiffusionHistoryController.php',
|
'DiffusionHistoryController' => 'applications/diffusion/controller/DiffusionHistoryController.php',
|
||||||
|
'DiffusionHistoryListView' => 'applications/diffusion/view/DiffusionHistoryListView.php',
|
||||||
'DiffusionHistoryQueryConduitAPIMethod' => 'applications/diffusion/conduit/DiffusionHistoryQueryConduitAPIMethod.php',
|
'DiffusionHistoryQueryConduitAPIMethod' => 'applications/diffusion/conduit/DiffusionHistoryQueryConduitAPIMethod.php',
|
||||||
|
'DiffusionHistoryTableView' => 'applications/diffusion/view/DiffusionHistoryTableView.php',
|
||||||
|
'DiffusionHistoryView' => 'applications/diffusion/view/DiffusionHistoryView.php',
|
||||||
'DiffusionHovercardEngineExtension' => 'applications/diffusion/engineextension/DiffusionHovercardEngineExtension.php',
|
'DiffusionHovercardEngineExtension' => 'applications/diffusion/engineextension/DiffusionHovercardEngineExtension.php',
|
||||||
'DiffusionIdentityAssigneeDatasource' => 'applications/diffusion/typeahead/DiffusionIdentityAssigneeDatasource.php',
|
'DiffusionIdentityAssigneeDatasource' => 'applications/diffusion/typeahead/DiffusionIdentityAssigneeDatasource.php',
|
||||||
'DiffusionIdentityAssigneeEditField' => 'applications/diffusion/editfield/DiffusionIdentityAssigneeEditField.php',
|
'DiffusionIdentityAssigneeEditField' => 'applications/diffusion/editfield/DiffusionIdentityAssigneeEditField.php',
|
||||||
@@ -873,8 +877,6 @@ phutil_register_library_map(array(
|
|||||||
'DiffusionIdentityViewController' => 'applications/diffusion/controller/DiffusionIdentityViewController.php',
|
'DiffusionIdentityViewController' => 'applications/diffusion/controller/DiffusionIdentityViewController.php',
|
||||||
'DiffusionInlineCommentController' => 'applications/diffusion/controller/DiffusionInlineCommentController.php',
|
'DiffusionInlineCommentController' => 'applications/diffusion/controller/DiffusionInlineCommentController.php',
|
||||||
'DiffusionInternalAncestorsConduitAPIMethod' => 'applications/diffusion/conduit/DiffusionInternalAncestorsConduitAPIMethod.php',
|
'DiffusionInternalAncestorsConduitAPIMethod' => 'applications/diffusion/conduit/DiffusionInternalAncestorsConduitAPIMethod.php',
|
||||||
'DiffusionInternalCommitSearchConduitAPIMethod' => 'applications/diffusion/conduit/DiffusionInternalCommitSearchConduitAPIMethod.php',
|
|
||||||
'DiffusionInternalCommitSearchEngine' => 'applications/audit/query/DiffusionInternalCommitSearchEngine.php',
|
|
||||||
'DiffusionInternalGitRawDiffQueryConduitAPIMethod' => 'applications/diffusion/conduit/DiffusionInternalGitRawDiffQueryConduitAPIMethod.php',
|
'DiffusionInternalGitRawDiffQueryConduitAPIMethod' => 'applications/diffusion/conduit/DiffusionInternalGitRawDiffQueryConduitAPIMethod.php',
|
||||||
'DiffusionLastModifiedController' => 'applications/diffusion/controller/DiffusionLastModifiedController.php',
|
'DiffusionLastModifiedController' => 'applications/diffusion/controller/DiffusionLastModifiedController.php',
|
||||||
'DiffusionLastModifiedQueryConduitAPIMethod' => 'applications/diffusion/conduit/DiffusionLastModifiedQueryConduitAPIMethod.php',
|
'DiffusionLastModifiedQueryConduitAPIMethod' => 'applications/diffusion/conduit/DiffusionLastModifiedQueryConduitAPIMethod.php',
|
||||||
@@ -1061,6 +1063,7 @@ phutil_register_library_map(array(
|
|||||||
'DiffusionSyncLogSearchEngine' => 'applications/diffusion/query/DiffusionSyncLogSearchEngine.php',
|
'DiffusionSyncLogSearchEngine' => 'applications/diffusion/query/DiffusionSyncLogSearchEngine.php',
|
||||||
'DiffusionTagListController' => 'applications/diffusion/controller/DiffusionTagListController.php',
|
'DiffusionTagListController' => 'applications/diffusion/controller/DiffusionTagListController.php',
|
||||||
'DiffusionTagListView' => 'applications/diffusion/view/DiffusionTagListView.php',
|
'DiffusionTagListView' => 'applications/diffusion/view/DiffusionTagListView.php',
|
||||||
|
'DiffusionTagTableView' => 'applications/diffusion/view/DiffusionTagTableView.php',
|
||||||
'DiffusionTaggedRepositoriesFunctionDatasource' => 'applications/diffusion/typeahead/DiffusionTaggedRepositoriesFunctionDatasource.php',
|
'DiffusionTaggedRepositoriesFunctionDatasource' => 'applications/diffusion/typeahead/DiffusionTaggedRepositoriesFunctionDatasource.php',
|
||||||
'DiffusionTagsQueryConduitAPIMethod' => 'applications/diffusion/conduit/DiffusionTagsQueryConduitAPIMethod.php',
|
'DiffusionTagsQueryConduitAPIMethod' => 'applications/diffusion/conduit/DiffusionTagsQueryConduitAPIMethod.php',
|
||||||
'DiffusionURIEditConduitAPIMethod' => 'applications/diffusion/conduit/DiffusionURIEditConduitAPIMethod.php',
|
'DiffusionURIEditConduitAPIMethod' => 'applications/diffusion/conduit/DiffusionURIEditConduitAPIMethod.php',
|
||||||
@@ -1307,17 +1310,6 @@ phutil_register_library_map(array(
|
|||||||
'FlagDeleteConduitAPIMethod' => 'applications/flag/conduit/FlagDeleteConduitAPIMethod.php',
|
'FlagDeleteConduitAPIMethod' => 'applications/flag/conduit/FlagDeleteConduitAPIMethod.php',
|
||||||
'FlagEditConduitAPIMethod' => 'applications/flag/conduit/FlagEditConduitAPIMethod.php',
|
'FlagEditConduitAPIMethod' => 'applications/flag/conduit/FlagEditConduitAPIMethod.php',
|
||||||
'FlagQueryConduitAPIMethod' => 'applications/flag/conduit/FlagQueryConduitAPIMethod.php',
|
'FlagQueryConduitAPIMethod' => 'applications/flag/conduit/FlagQueryConduitAPIMethod.php',
|
||||||
'FuelComponentView' => 'view/fuel/FuelComponentView.php',
|
|
||||||
'FuelGridCellView' => 'view/fuel/FuelGridCellView.php',
|
|
||||||
'FuelGridRowView' => 'view/fuel/FuelGridRowView.php',
|
|
||||||
'FuelGridView' => 'view/fuel/FuelGridView.php',
|
|
||||||
'FuelHandleListItemView' => 'view/fuel/FuelHandleListItemView.php',
|
|
||||||
'FuelHandleListView' => 'view/fuel/FuelHandleListView.php',
|
|
||||||
'FuelMapItemView' => 'view/fuel/FuelMapItemView.php',
|
|
||||||
'FuelMapView' => 'view/fuel/FuelMapView.php',
|
|
||||||
'FuelMenuItemView' => 'view/fuel/FuelMenuItemView.php',
|
|
||||||
'FuelMenuView' => 'view/fuel/FuelMenuView.php',
|
|
||||||
'FuelView' => 'view/fuel/FuelView.php',
|
|
||||||
'FundBacker' => 'applications/fund/storage/FundBacker.php',
|
'FundBacker' => 'applications/fund/storage/FundBacker.php',
|
||||||
'FundBackerCart' => 'applications/fund/phortune/FundBackerCart.php',
|
'FundBackerCart' => 'applications/fund/phortune/FundBackerCart.php',
|
||||||
'FundBackerEditor' => 'applications/fund/editor/FundBackerEditor.php',
|
'FundBackerEditor' => 'applications/fund/editor/FundBackerEditor.php',
|
||||||
@@ -1430,16 +1422,12 @@ phutil_register_library_map(array(
|
|||||||
'HarbormasterBuildStep' => 'applications/harbormaster/storage/configuration/HarbormasterBuildStep.php',
|
'HarbormasterBuildStep' => 'applications/harbormaster/storage/configuration/HarbormasterBuildStep.php',
|
||||||
'HarbormasterBuildStepCoreCustomField' => 'applications/harbormaster/customfield/HarbormasterBuildStepCoreCustomField.php',
|
'HarbormasterBuildStepCoreCustomField' => 'applications/harbormaster/customfield/HarbormasterBuildStepCoreCustomField.php',
|
||||||
'HarbormasterBuildStepCustomField' => 'applications/harbormaster/customfield/HarbormasterBuildStepCustomField.php',
|
'HarbormasterBuildStepCustomField' => 'applications/harbormaster/customfield/HarbormasterBuildStepCustomField.php',
|
||||||
'HarbormasterBuildStepEditAPIMethod' => 'applications/harbormaster/conduit/HarbormasterBuildStepEditAPIMethod.php',
|
|
||||||
'HarbormasterBuildStepEditEngine' => 'applications/harbormaster/editor/HarbormasterBuildStepEditEngine.php',
|
|
||||||
'HarbormasterBuildStepEditor' => 'applications/harbormaster/editor/HarbormasterBuildStepEditor.php',
|
'HarbormasterBuildStepEditor' => 'applications/harbormaster/editor/HarbormasterBuildStepEditor.php',
|
||||||
'HarbormasterBuildStepGroup' => 'applications/harbormaster/stepgroup/HarbormasterBuildStepGroup.php',
|
'HarbormasterBuildStepGroup' => 'applications/harbormaster/stepgroup/HarbormasterBuildStepGroup.php',
|
||||||
'HarbormasterBuildStepImplementation' => 'applications/harbormaster/step/HarbormasterBuildStepImplementation.php',
|
'HarbormasterBuildStepImplementation' => 'applications/harbormaster/step/HarbormasterBuildStepImplementation.php',
|
||||||
'HarbormasterBuildStepImplementationTestCase' => 'applications/harbormaster/step/__tests__/HarbormasterBuildStepImplementationTestCase.php',
|
'HarbormasterBuildStepImplementationTestCase' => 'applications/harbormaster/step/__tests__/HarbormasterBuildStepImplementationTestCase.php',
|
||||||
'HarbormasterBuildStepPHIDType' => 'applications/harbormaster/phid/HarbormasterBuildStepPHIDType.php',
|
'HarbormasterBuildStepPHIDType' => 'applications/harbormaster/phid/HarbormasterBuildStepPHIDType.php',
|
||||||
'HarbormasterBuildStepQuery' => 'applications/harbormaster/query/HarbormasterBuildStepQuery.php',
|
'HarbormasterBuildStepQuery' => 'applications/harbormaster/query/HarbormasterBuildStepQuery.php',
|
||||||
'HarbormasterBuildStepSearchAPIMethod' => 'applications/harbormaster/conduit/HarbormasterBuildStepSearchAPIMethod.php',
|
|
||||||
'HarbormasterBuildStepSearchEngine' => 'applications/harbormaster/query/HarbormasterBuildStepSearchEngine.php',
|
|
||||||
'HarbormasterBuildStepTransaction' => 'applications/harbormaster/storage/configuration/HarbormasterBuildStepTransaction.php',
|
'HarbormasterBuildStepTransaction' => 'applications/harbormaster/storage/configuration/HarbormasterBuildStepTransaction.php',
|
||||||
'HarbormasterBuildStepTransactionQuery' => 'applications/harbormaster/query/HarbormasterBuildStepTransactionQuery.php',
|
'HarbormasterBuildStepTransactionQuery' => 'applications/harbormaster/query/HarbormasterBuildStepTransactionQuery.php',
|
||||||
'HarbormasterBuildTarget' => 'applications/harbormaster/storage/build/HarbormasterBuildTarget.php',
|
'HarbormasterBuildTarget' => 'applications/harbormaster/storage/build/HarbormasterBuildTarget.php',
|
||||||
@@ -1561,7 +1549,6 @@ phutil_register_library_map(array(
|
|||||||
'HeraldBuildableState' => 'applications/herald/state/HeraldBuildableState.php',
|
'HeraldBuildableState' => 'applications/herald/state/HeraldBuildableState.php',
|
||||||
'HeraldCallWebhookAction' => 'applications/herald/action/HeraldCallWebhookAction.php',
|
'HeraldCallWebhookAction' => 'applications/herald/action/HeraldCallWebhookAction.php',
|
||||||
'HeraldCommentAction' => 'applications/herald/action/HeraldCommentAction.php',
|
'HeraldCommentAction' => 'applications/herald/action/HeraldCommentAction.php',
|
||||||
'HeraldCommentContentField' => 'applications/herald/field/HeraldCommentContentField.php',
|
|
||||||
'HeraldCommitAdapter' => 'applications/diffusion/herald/HeraldCommitAdapter.php',
|
'HeraldCommitAdapter' => 'applications/diffusion/herald/HeraldCommitAdapter.php',
|
||||||
'HeraldCondition' => 'applications/herald/storage/HeraldCondition.php',
|
'HeraldCondition' => 'applications/herald/storage/HeraldCondition.php',
|
||||||
'HeraldConditionTranscript' => 'applications/herald/storage/transcript/HeraldConditionTranscript.php',
|
'HeraldConditionTranscript' => 'applications/herald/storage/transcript/HeraldConditionTranscript.php',
|
||||||
@@ -1786,6 +1773,7 @@ phutil_register_library_map(array(
|
|||||||
'ManiphestReportController' => 'applications/maniphest/controller/ManiphestReportController.php',
|
'ManiphestReportController' => 'applications/maniphest/controller/ManiphestReportController.php',
|
||||||
'ManiphestSchemaSpec' => 'applications/maniphest/storage/ManiphestSchemaSpec.php',
|
'ManiphestSchemaSpec' => 'applications/maniphest/storage/ManiphestSchemaSpec.php',
|
||||||
'ManiphestSearchConduitAPIMethod' => 'applications/maniphest/conduit/ManiphestSearchConduitAPIMethod.php',
|
'ManiphestSearchConduitAPIMethod' => 'applications/maniphest/conduit/ManiphestSearchConduitAPIMethod.php',
|
||||||
|
'ManiphestSearchController' => 'applications/maniphest/controller/ManiphestSearchController.php',
|
||||||
'ManiphestStatusEmailCommand' => 'applications/maniphest/command/ManiphestStatusEmailCommand.php',
|
'ManiphestStatusEmailCommand' => 'applications/maniphest/command/ManiphestStatusEmailCommand.php',
|
||||||
'ManiphestStatusSearchConduitAPIMethod' => 'applications/maniphest/conduit/ManiphestStatusSearchConduitAPIMethod.php',
|
'ManiphestStatusSearchConduitAPIMethod' => 'applications/maniphest/conduit/ManiphestStatusSearchConduitAPIMethod.php',
|
||||||
'ManiphestStatusesConfigType' => 'applications/maniphest/config/ManiphestStatusesConfigType.php',
|
'ManiphestStatusesConfigType' => 'applications/maniphest/config/ManiphestStatusesConfigType.php',
|
||||||
@@ -2178,13 +2166,13 @@ phutil_register_library_map(array(
|
|||||||
'PasteSearchConduitAPIMethod' => 'applications/paste/conduit/PasteSearchConduitAPIMethod.php',
|
'PasteSearchConduitAPIMethod' => 'applications/paste/conduit/PasteSearchConduitAPIMethod.php',
|
||||||
'PeopleBrowseUserDirectoryCapability' => 'applications/people/capability/PeopleBrowseUserDirectoryCapability.php',
|
'PeopleBrowseUserDirectoryCapability' => 'applications/people/capability/PeopleBrowseUserDirectoryCapability.php',
|
||||||
'PeopleCreateUsersCapability' => 'applications/people/capability/PeopleCreateUsersCapability.php',
|
'PeopleCreateUsersCapability' => 'applications/people/capability/PeopleCreateUsersCapability.php',
|
||||||
|
'PeopleDisableSpamUsersCapability' => 'applications/people/capability/PeopleDisableSpamUsersCapability.php',
|
||||||
'PeopleDisableUsersCapability' => 'applications/people/capability/PeopleDisableUsersCapability.php',
|
'PeopleDisableUsersCapability' => 'applications/people/capability/PeopleDisableUsersCapability.php',
|
||||||
'PeopleHovercardEngineExtension' => 'applications/people/engineextension/PeopleHovercardEngineExtension.php',
|
'PeopleHovercardEngineExtension' => 'applications/people/engineextension/PeopleHovercardEngineExtension.php',
|
||||||
'PeopleMainMenuBarExtension' => 'applications/people/engineextension/PeopleMainMenuBarExtension.php',
|
'PeopleMainMenuBarExtension' => 'applications/people/engineextension/PeopleMainMenuBarExtension.php',
|
||||||
'PeopleUserLogGarbageCollector' => 'applications/people/garbagecollector/PeopleUserLogGarbageCollector.php',
|
'PeopleUserLogGarbageCollector' => 'applications/people/garbagecollector/PeopleUserLogGarbageCollector.php',
|
||||||
'Phabricator404Controller' => 'applications/base/controller/Phabricator404Controller.php',
|
'Phabricator404Controller' => 'applications/base/controller/Phabricator404Controller.php',
|
||||||
'PhabricatorAWSConfigOptions' => 'applications/config/option/PhabricatorAWSConfigOptions.php',
|
'PhabricatorAWSConfigOptions' => 'applications/config/option/PhabricatorAWSConfigOptions.php',
|
||||||
'PhabricatorAWSSESFuture' => 'applications/metamta/future/PhabricatorAWSSESFuture.php',
|
|
||||||
'PhabricatorAccessControlTestCase' => 'applications/base/controller/__tests__/PhabricatorAccessControlTestCase.php',
|
'PhabricatorAccessControlTestCase' => 'applications/base/controller/__tests__/PhabricatorAccessControlTestCase.php',
|
||||||
'PhabricatorAccessLog' => 'infrastructure/log/PhabricatorAccessLog.php',
|
'PhabricatorAccessLog' => 'infrastructure/log/PhabricatorAccessLog.php',
|
||||||
'PhabricatorAccessLogConfigOptions' => 'applications/config/option/PhabricatorAccessLogConfigOptions.php',
|
'PhabricatorAccessLogConfigOptions' => 'applications/config/option/PhabricatorAccessLogConfigOptions.php',
|
||||||
@@ -2240,6 +2228,7 @@ phutil_register_library_map(array(
|
|||||||
'PhabricatorApplicationSearchResultView' => 'applications/search/view/PhabricatorApplicationSearchResultView.php',
|
'PhabricatorApplicationSearchResultView' => 'applications/search/view/PhabricatorApplicationSearchResultView.php',
|
||||||
'PhabricatorApplicationTestCase' => 'applications/base/__tests__/PhabricatorApplicationTestCase.php',
|
'PhabricatorApplicationTestCase' => 'applications/base/__tests__/PhabricatorApplicationTestCase.php',
|
||||||
'PhabricatorApplicationTransaction' => 'applications/transactions/storage/PhabricatorApplicationTransaction.php',
|
'PhabricatorApplicationTransaction' => 'applications/transactions/storage/PhabricatorApplicationTransaction.php',
|
||||||
|
'PhabricatorApplicationTransactionCannedResponsesController' => 'applications/transactions/controller/PhabricatorApplicationTransactionCannedResponsesController.php',
|
||||||
'PhabricatorApplicationTransactionComment' => 'applications/transactions/storage/PhabricatorApplicationTransactionComment.php',
|
'PhabricatorApplicationTransactionComment' => 'applications/transactions/storage/PhabricatorApplicationTransactionComment.php',
|
||||||
'PhabricatorApplicationTransactionCommentEditController' => 'applications/transactions/controller/PhabricatorApplicationTransactionCommentEditController.php',
|
'PhabricatorApplicationTransactionCommentEditController' => 'applications/transactions/controller/PhabricatorApplicationTransactionCommentEditController.php',
|
||||||
'PhabricatorApplicationTransactionCommentEditor' => 'applications/transactions/editor/PhabricatorApplicationTransactionCommentEditor.php',
|
'PhabricatorApplicationTransactionCommentEditor' => 'applications/transactions/editor/PhabricatorApplicationTransactionCommentEditor.php',
|
||||||
@@ -2293,6 +2282,7 @@ phutil_register_library_map(array(
|
|||||||
'PhabricatorAuditController' => 'applications/audit/controller/PhabricatorAuditController.php',
|
'PhabricatorAuditController' => 'applications/audit/controller/PhabricatorAuditController.php',
|
||||||
'PhabricatorAuditEditor' => 'applications/audit/editor/PhabricatorAuditEditor.php',
|
'PhabricatorAuditEditor' => 'applications/audit/editor/PhabricatorAuditEditor.php',
|
||||||
'PhabricatorAuditInlineComment' => 'applications/audit/storage/PhabricatorAuditInlineComment.php',
|
'PhabricatorAuditInlineComment' => 'applications/audit/storage/PhabricatorAuditInlineComment.php',
|
||||||
|
'PhabricatorAuditListView' => 'applications/audit/view/PhabricatorAuditListView.php',
|
||||||
'PhabricatorAuditMailReceiver' => 'applications/audit/mail/PhabricatorAuditMailReceiver.php',
|
'PhabricatorAuditMailReceiver' => 'applications/audit/mail/PhabricatorAuditMailReceiver.php',
|
||||||
'PhabricatorAuditManagementDeleteWorkflow' => 'applications/audit/management/PhabricatorAuditManagementDeleteWorkflow.php',
|
'PhabricatorAuditManagementDeleteWorkflow' => 'applications/audit/management/PhabricatorAuditManagementDeleteWorkflow.php',
|
||||||
'PhabricatorAuditManagementWorkflow' => 'applications/audit/management/PhabricatorAuditManagementWorkflow.php',
|
'PhabricatorAuditManagementWorkflow' => 'applications/audit/management/PhabricatorAuditManagementWorkflow.php',
|
||||||
@@ -4178,6 +4168,7 @@ phutil_register_library_map(array(
|
|||||||
'PhabricatorPeopleRenameController' => 'applications/people/controller/PhabricatorPeopleRenameController.php',
|
'PhabricatorPeopleRenameController' => 'applications/people/controller/PhabricatorPeopleRenameController.php',
|
||||||
'PhabricatorPeopleRevisionsProfileMenuItem' => 'applications/people/menuitem/PhabricatorPeopleRevisionsProfileMenuItem.php',
|
'PhabricatorPeopleRevisionsProfileMenuItem' => 'applications/people/menuitem/PhabricatorPeopleRevisionsProfileMenuItem.php',
|
||||||
'PhabricatorPeopleSearchEngine' => 'applications/people/query/PhabricatorPeopleSearchEngine.php',
|
'PhabricatorPeopleSearchEngine' => 'applications/people/query/PhabricatorPeopleSearchEngine.php',
|
||||||
|
'PhabricatorPeopleSpamController' => 'applications/people/controller/PhabricatorPeopleSpamController.php',
|
||||||
'PhabricatorPeopleTasksProfileMenuItem' => 'applications/people/menuitem/PhabricatorPeopleTasksProfileMenuItem.php',
|
'PhabricatorPeopleTasksProfileMenuItem' => 'applications/people/menuitem/PhabricatorPeopleTasksProfileMenuItem.php',
|
||||||
'PhabricatorPeopleTestDataGenerator' => 'applications/people/lipsum/PhabricatorPeopleTestDataGenerator.php',
|
'PhabricatorPeopleTestDataGenerator' => 'applications/people/lipsum/PhabricatorPeopleTestDataGenerator.php',
|
||||||
'PhabricatorPeopleTransactionQuery' => 'applications/people/query/PhabricatorPeopleTransactionQuery.php',
|
'PhabricatorPeopleTransactionQuery' => 'applications/people/query/PhabricatorPeopleTransactionQuery.php',
|
||||||
@@ -4593,6 +4584,7 @@ phutil_register_library_map(array(
|
|||||||
'PhabricatorRepositoryManagementImportingWorkflow' => 'applications/repository/management/PhabricatorRepositoryManagementImportingWorkflow.php',
|
'PhabricatorRepositoryManagementImportingWorkflow' => 'applications/repository/management/PhabricatorRepositoryManagementImportingWorkflow.php',
|
||||||
'PhabricatorRepositoryManagementListPathsWorkflow' => 'applications/repository/management/PhabricatorRepositoryManagementListPathsWorkflow.php',
|
'PhabricatorRepositoryManagementListPathsWorkflow' => 'applications/repository/management/PhabricatorRepositoryManagementListPathsWorkflow.php',
|
||||||
'PhabricatorRepositoryManagementListWorkflow' => 'applications/repository/management/PhabricatorRepositoryManagementListWorkflow.php',
|
'PhabricatorRepositoryManagementListWorkflow' => 'applications/repository/management/PhabricatorRepositoryManagementListWorkflow.php',
|
||||||
|
'PhabricatorRepositoryManagementLookupUsersWorkflow' => 'applications/repository/management/PhabricatorRepositoryManagementLookupUsersWorkflow.php',
|
||||||
'PhabricatorRepositoryManagementMaintenanceWorkflow' => 'applications/repository/management/PhabricatorRepositoryManagementMaintenanceWorkflow.php',
|
'PhabricatorRepositoryManagementMaintenanceWorkflow' => 'applications/repository/management/PhabricatorRepositoryManagementMaintenanceWorkflow.php',
|
||||||
'PhabricatorRepositoryManagementMarkImportedWorkflow' => 'applications/repository/management/PhabricatorRepositoryManagementMarkImportedWorkflow.php',
|
'PhabricatorRepositoryManagementMarkImportedWorkflow' => 'applications/repository/management/PhabricatorRepositoryManagementMarkImportedWorkflow.php',
|
||||||
'PhabricatorRepositoryManagementMarkReachableWorkflow' => 'applications/repository/management/PhabricatorRepositoryManagementMarkReachableWorkflow.php',
|
'PhabricatorRepositoryManagementMarkReachableWorkflow' => 'applications/repository/management/PhabricatorRepositoryManagementMarkReachableWorkflow.php',
|
||||||
@@ -4665,6 +4657,8 @@ phutil_register_library_map(array(
|
|||||||
'PhabricatorRepositoryType' => 'applications/repository/constants/PhabricatorRepositoryType.php',
|
'PhabricatorRepositoryType' => 'applications/repository/constants/PhabricatorRepositoryType.php',
|
||||||
'PhabricatorRepositoryURI' => 'applications/repository/storage/PhabricatorRepositoryURI.php',
|
'PhabricatorRepositoryURI' => 'applications/repository/storage/PhabricatorRepositoryURI.php',
|
||||||
'PhabricatorRepositoryURIIndex' => 'applications/repository/storage/PhabricatorRepositoryURIIndex.php',
|
'PhabricatorRepositoryURIIndex' => 'applications/repository/storage/PhabricatorRepositoryURIIndex.php',
|
||||||
|
'PhabricatorRepositoryURINormalizer' => 'applications/repository/data/PhabricatorRepositoryURINormalizer.php',
|
||||||
|
'PhabricatorRepositoryURINormalizerTestCase' => 'applications/repository/data/__tests__/PhabricatorRepositoryURINormalizerTestCase.php',
|
||||||
'PhabricatorRepositoryURIPHIDType' => 'applications/repository/phid/PhabricatorRepositoryURIPHIDType.php',
|
'PhabricatorRepositoryURIPHIDType' => 'applications/repository/phid/PhabricatorRepositoryURIPHIDType.php',
|
||||||
'PhabricatorRepositoryURIQuery' => 'applications/repository/query/PhabricatorRepositoryURIQuery.php',
|
'PhabricatorRepositoryURIQuery' => 'applications/repository/query/PhabricatorRepositoryURIQuery.php',
|
||||||
'PhabricatorRepositoryURITestCase' => 'applications/repository/storage/__tests__/PhabricatorRepositoryURITestCase.php',
|
'PhabricatorRepositoryURITestCase' => 'applications/repository/storage/__tests__/PhabricatorRepositoryURITestCase.php',
|
||||||
@@ -4773,6 +4767,7 @@ phutil_register_library_map(array(
|
|||||||
'PhabricatorSettingsLogsPanelGroup' => 'applications/settings/panelgroup/PhabricatorSettingsLogsPanelGroup.php',
|
'PhabricatorSettingsLogsPanelGroup' => 'applications/settings/panelgroup/PhabricatorSettingsLogsPanelGroup.php',
|
||||||
'PhabricatorSettingsMainController' => 'applications/settings/controller/PhabricatorSettingsMainController.php',
|
'PhabricatorSettingsMainController' => 'applications/settings/controller/PhabricatorSettingsMainController.php',
|
||||||
'PhabricatorSettingsPanel' => 'applications/settings/panel/PhabricatorSettingsPanel.php',
|
'PhabricatorSettingsPanel' => 'applications/settings/panel/PhabricatorSettingsPanel.php',
|
||||||
|
'PhabricatorSettingsPanelChangeUsername' => 'applications/settings/panel/PhabricatorSettingsPanelChangeUsername.php',
|
||||||
'PhabricatorSettingsPanelGroup' => 'applications/settings/panelgroup/PhabricatorSettingsPanelGroup.php',
|
'PhabricatorSettingsPanelGroup' => 'applications/settings/panelgroup/PhabricatorSettingsPanelGroup.php',
|
||||||
'PhabricatorSettingsTimezoneController' => 'applications/settings/controller/PhabricatorSettingsTimezoneController.php',
|
'PhabricatorSettingsTimezoneController' => 'applications/settings/controller/PhabricatorSettingsTimezoneController.php',
|
||||||
'PhabricatorSetupCheck' => 'applications/config/check/PhabricatorSetupCheck.php',
|
'PhabricatorSetupCheck' => 'applications/config/check/PhabricatorSetupCheck.php',
|
||||||
@@ -5066,6 +5061,7 @@ phutil_register_library_map(array(
|
|||||||
'PhabricatorUserCustomFieldNumericIndex' => 'applications/people/storage/PhabricatorUserCustomFieldNumericIndex.php',
|
'PhabricatorUserCustomFieldNumericIndex' => 'applications/people/storage/PhabricatorUserCustomFieldNumericIndex.php',
|
||||||
'PhabricatorUserCustomFieldStringIndex' => 'applications/people/storage/PhabricatorUserCustomFieldStringIndex.php',
|
'PhabricatorUserCustomFieldStringIndex' => 'applications/people/storage/PhabricatorUserCustomFieldStringIndex.php',
|
||||||
'PhabricatorUserDAO' => 'applications/people/storage/PhabricatorUserDAO.php',
|
'PhabricatorUserDAO' => 'applications/people/storage/PhabricatorUserDAO.php',
|
||||||
|
'PhabricatorUserDisableSpamTransaction' => 'applications/people/xaction/PhabricatorUserDisableSpamTransaction.php',
|
||||||
'PhabricatorUserDisableTransaction' => 'applications/people/xaction/PhabricatorUserDisableTransaction.php',
|
'PhabricatorUserDisableTransaction' => 'applications/people/xaction/PhabricatorUserDisableTransaction.php',
|
||||||
'PhabricatorUserEditEngine' => 'applications/people/editor/PhabricatorUserEditEngine.php',
|
'PhabricatorUserEditEngine' => 'applications/people/editor/PhabricatorUserEditEngine.php',
|
||||||
'PhabricatorUserEditor' => 'applications/people/editor/PhabricatorUserEditor.php',
|
'PhabricatorUserEditor' => 'applications/people/editor/PhabricatorUserEditor.php',
|
||||||
@@ -5966,11 +5962,9 @@ phutil_register_library_map(array(
|
|||||||
'celerity_get_resource_uri' => 'applications/celerity/api.php',
|
'celerity_get_resource_uri' => 'applications/celerity/api.php',
|
||||||
'hsprintf' => 'infrastructure/markup/render.php',
|
'hsprintf' => 'infrastructure/markup/render.php',
|
||||||
'javelin_tag' => 'infrastructure/javelin/markup.php',
|
'javelin_tag' => 'infrastructure/javelin/markup.php',
|
||||||
'phabricator_absolute_datetime' => 'view/viewutils.php',
|
|
||||||
'phabricator_date' => 'view/viewutils.php',
|
'phabricator_date' => 'view/viewutils.php',
|
||||||
'phabricator_datetime' => 'view/viewutils.php',
|
'phabricator_datetime' => 'view/viewutils.php',
|
||||||
'phabricator_datetimezone' => 'view/viewutils.php',
|
'phabricator_datetimezone' => 'view/viewutils.php',
|
||||||
'phabricator_dual_datetime' => 'view/viewutils.php',
|
|
||||||
'phabricator_form' => 'infrastructure/javelin/markup.php',
|
'phabricator_form' => 'infrastructure/javelin/markup.php',
|
||||||
'phabricator_format_local_time' => 'view/viewutils.php',
|
'phabricator_format_local_time' => 'view/viewutils.php',
|
||||||
'phabricator_relative_date' => 'view/viewutils.php',
|
'phabricator_relative_date' => 'view/viewutils.php',
|
||||||
@@ -6876,7 +6870,6 @@ phutil_register_library_map(array(
|
|||||||
'DiffusionCommitEditEngine' => 'PhabricatorEditEngine',
|
'DiffusionCommitEditEngine' => 'PhabricatorEditEngine',
|
||||||
'DiffusionCommitFerretEngine' => 'PhabricatorFerretEngine',
|
'DiffusionCommitFerretEngine' => 'PhabricatorFerretEngine',
|
||||||
'DiffusionCommitFulltextEngine' => 'PhabricatorFulltextEngine',
|
'DiffusionCommitFulltextEngine' => 'PhabricatorFulltextEngine',
|
||||||
'DiffusionCommitGraphView' => 'DiffusionView',
|
|
||||||
'DiffusionCommitHasPackageEdgeType' => 'PhabricatorEdgeType',
|
'DiffusionCommitHasPackageEdgeType' => 'PhabricatorEdgeType',
|
||||||
'DiffusionCommitHasRevisionEdgeType' => 'PhabricatorEdgeType',
|
'DiffusionCommitHasRevisionEdgeType' => 'PhabricatorEdgeType',
|
||||||
'DiffusionCommitHasRevisionRelationship' => 'DiffusionCommitRelationship',
|
'DiffusionCommitHasRevisionRelationship' => 'DiffusionCommitRelationship',
|
||||||
@@ -6889,6 +6882,7 @@ phutil_register_library_map(array(
|
|||||||
'DiffusionCommitHookEngine' => 'Phobject',
|
'DiffusionCommitHookEngine' => 'Phobject',
|
||||||
'DiffusionCommitHookRejectException' => 'Exception',
|
'DiffusionCommitHookRejectException' => 'Exception',
|
||||||
'DiffusionCommitListController' => 'DiffusionController',
|
'DiffusionCommitListController' => 'DiffusionController',
|
||||||
|
'DiffusionCommitListView' => 'AphrontView',
|
||||||
'DiffusionCommitMergeHeraldField' => 'DiffusionCommitHeraldField',
|
'DiffusionCommitMergeHeraldField' => 'DiffusionCommitHeraldField',
|
||||||
'DiffusionCommitMessageHeraldField' => 'DiffusionCommitHeraldField',
|
'DiffusionCommitMessageHeraldField' => 'DiffusionCommitHeraldField',
|
||||||
'DiffusionCommitPackageAuditHeraldField' => 'DiffusionCommitHeraldField',
|
'DiffusionCommitPackageAuditHeraldField' => 'DiffusionCommitHeraldField',
|
||||||
@@ -6970,8 +6964,12 @@ phutil_register_library_map(array(
|
|||||||
'DiffusionGitWireProtocolCapabilities' => 'Phobject',
|
'DiffusionGitWireProtocolCapabilities' => 'Phobject',
|
||||||
'DiffusionGitWireProtocolRef' => 'Phobject',
|
'DiffusionGitWireProtocolRef' => 'Phobject',
|
||||||
'DiffusionGitWireProtocolRefList' => 'Phobject',
|
'DiffusionGitWireProtocolRefList' => 'Phobject',
|
||||||
|
'DiffusionGraphController' => 'DiffusionController',
|
||||||
'DiffusionHistoryController' => 'DiffusionController',
|
'DiffusionHistoryController' => 'DiffusionController',
|
||||||
|
'DiffusionHistoryListView' => 'DiffusionHistoryView',
|
||||||
'DiffusionHistoryQueryConduitAPIMethod' => 'DiffusionQueryConduitAPIMethod',
|
'DiffusionHistoryQueryConduitAPIMethod' => 'DiffusionQueryConduitAPIMethod',
|
||||||
|
'DiffusionHistoryTableView' => 'DiffusionHistoryView',
|
||||||
|
'DiffusionHistoryView' => 'DiffusionView',
|
||||||
'DiffusionHovercardEngineExtension' => 'PhabricatorHovercardEngineExtension',
|
'DiffusionHovercardEngineExtension' => 'PhabricatorHovercardEngineExtension',
|
||||||
'DiffusionIdentityAssigneeDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
|
'DiffusionIdentityAssigneeDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
|
||||||
'DiffusionIdentityAssigneeEditField' => 'PhabricatorTokenizerEditField',
|
'DiffusionIdentityAssigneeEditField' => 'PhabricatorTokenizerEditField',
|
||||||
@@ -6982,8 +6980,6 @@ phutil_register_library_map(array(
|
|||||||
'DiffusionIdentityViewController' => 'DiffusionController',
|
'DiffusionIdentityViewController' => 'DiffusionController',
|
||||||
'DiffusionInlineCommentController' => 'PhabricatorInlineCommentController',
|
'DiffusionInlineCommentController' => 'PhabricatorInlineCommentController',
|
||||||
'DiffusionInternalAncestorsConduitAPIMethod' => 'DiffusionQueryConduitAPIMethod',
|
'DiffusionInternalAncestorsConduitAPIMethod' => 'DiffusionQueryConduitAPIMethod',
|
||||||
'DiffusionInternalCommitSearchConduitAPIMethod' => 'PhabricatorSearchEngineAPIMethod',
|
|
||||||
'DiffusionInternalCommitSearchEngine' => 'PhabricatorApplicationSearchEngine',
|
|
||||||
'DiffusionInternalGitRawDiffQueryConduitAPIMethod' => 'DiffusionQueryConduitAPIMethod',
|
'DiffusionInternalGitRawDiffQueryConduitAPIMethod' => 'DiffusionQueryConduitAPIMethod',
|
||||||
'DiffusionLastModifiedController' => 'DiffusionController',
|
'DiffusionLastModifiedController' => 'DiffusionController',
|
||||||
'DiffusionLastModifiedQueryConduitAPIMethod' => 'DiffusionQueryConduitAPIMethod',
|
'DiffusionLastModifiedQueryConduitAPIMethod' => 'DiffusionQueryConduitAPIMethod',
|
||||||
@@ -7169,6 +7165,7 @@ phutil_register_library_map(array(
|
|||||||
'DiffusionSyncLogSearchEngine' => 'PhabricatorApplicationSearchEngine',
|
'DiffusionSyncLogSearchEngine' => 'PhabricatorApplicationSearchEngine',
|
||||||
'DiffusionTagListController' => 'DiffusionController',
|
'DiffusionTagListController' => 'DiffusionController',
|
||||||
'DiffusionTagListView' => 'DiffusionView',
|
'DiffusionTagListView' => 'DiffusionView',
|
||||||
|
'DiffusionTagTableView' => 'DiffusionView',
|
||||||
'DiffusionTaggedRepositoriesFunctionDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
|
'DiffusionTaggedRepositoriesFunctionDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
|
||||||
'DiffusionTagsQueryConduitAPIMethod' => 'DiffusionQueryConduitAPIMethod',
|
'DiffusionTagsQueryConduitAPIMethod' => 'DiffusionQueryConduitAPIMethod',
|
||||||
'DiffusionURIEditConduitAPIMethod' => 'PhabricatorEditEngineAPIMethod',
|
'DiffusionURIEditConduitAPIMethod' => 'PhabricatorEditEngineAPIMethod',
|
||||||
@@ -7461,17 +7458,6 @@ phutil_register_library_map(array(
|
|||||||
'FlagDeleteConduitAPIMethod' => 'FlagConduitAPIMethod',
|
'FlagDeleteConduitAPIMethod' => 'FlagConduitAPIMethod',
|
||||||
'FlagEditConduitAPIMethod' => 'FlagConduitAPIMethod',
|
'FlagEditConduitAPIMethod' => 'FlagConduitAPIMethod',
|
||||||
'FlagQueryConduitAPIMethod' => 'FlagConduitAPIMethod',
|
'FlagQueryConduitAPIMethod' => 'FlagConduitAPIMethod',
|
||||||
'FuelComponentView' => 'FuelView',
|
|
||||||
'FuelGridCellView' => 'FuelComponentView',
|
|
||||||
'FuelGridRowView' => 'FuelView',
|
|
||||||
'FuelGridView' => 'FuelComponentView',
|
|
||||||
'FuelHandleListItemView' => 'FuelView',
|
|
||||||
'FuelHandleListView' => 'FuelComponentView',
|
|
||||||
'FuelMapItemView' => 'AphrontView',
|
|
||||||
'FuelMapView' => 'FuelComponentView',
|
|
||||||
'FuelMenuItemView' => 'FuelView',
|
|
||||||
'FuelMenuView' => 'FuelComponentView',
|
|
||||||
'FuelView' => 'AphrontView',
|
|
||||||
'FundBacker' => array(
|
'FundBacker' => array(
|
||||||
'FundDAO',
|
'FundDAO',
|
||||||
'PhabricatorPolicyInterface',
|
'PhabricatorPolicyInterface',
|
||||||
@@ -7631,23 +7617,18 @@ phutil_register_library_map(array(
|
|||||||
'PhabricatorApplicationTransactionInterface',
|
'PhabricatorApplicationTransactionInterface',
|
||||||
'PhabricatorPolicyInterface',
|
'PhabricatorPolicyInterface',
|
||||||
'PhabricatorCustomFieldInterface',
|
'PhabricatorCustomFieldInterface',
|
||||||
'PhabricatorConduitResultInterface',
|
|
||||||
),
|
),
|
||||||
'HarbormasterBuildStepCoreCustomField' => array(
|
'HarbormasterBuildStepCoreCustomField' => array(
|
||||||
'HarbormasterBuildStepCustomField',
|
'HarbormasterBuildStepCustomField',
|
||||||
'PhabricatorStandardCustomFieldInterface',
|
'PhabricatorStandardCustomFieldInterface',
|
||||||
),
|
),
|
||||||
'HarbormasterBuildStepCustomField' => 'PhabricatorCustomField',
|
'HarbormasterBuildStepCustomField' => 'PhabricatorCustomField',
|
||||||
'HarbormasterBuildStepEditAPIMethod' => 'PhabricatorEditEngineAPIMethod',
|
|
||||||
'HarbormasterBuildStepEditEngine' => 'PhabricatorEditEngine',
|
|
||||||
'HarbormasterBuildStepEditor' => 'PhabricatorApplicationTransactionEditor',
|
'HarbormasterBuildStepEditor' => 'PhabricatorApplicationTransactionEditor',
|
||||||
'HarbormasterBuildStepGroup' => 'Phobject',
|
'HarbormasterBuildStepGroup' => 'Phobject',
|
||||||
'HarbormasterBuildStepImplementation' => 'Phobject',
|
'HarbormasterBuildStepImplementation' => 'Phobject',
|
||||||
'HarbormasterBuildStepImplementationTestCase' => 'PhabricatorTestCase',
|
'HarbormasterBuildStepImplementationTestCase' => 'PhabricatorTestCase',
|
||||||
'HarbormasterBuildStepPHIDType' => 'PhabricatorPHIDType',
|
'HarbormasterBuildStepPHIDType' => 'PhabricatorPHIDType',
|
||||||
'HarbormasterBuildStepQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
'HarbormasterBuildStepQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
||||||
'HarbormasterBuildStepSearchAPIMethod' => 'PhabricatorSearchEngineAPIMethod',
|
|
||||||
'HarbormasterBuildStepSearchEngine' => 'PhabricatorApplicationSearchEngine',
|
|
||||||
'HarbormasterBuildStepTransaction' => 'PhabricatorApplicationTransaction',
|
'HarbormasterBuildStepTransaction' => 'PhabricatorApplicationTransaction',
|
||||||
'HarbormasterBuildStepTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
|
'HarbormasterBuildStepTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
|
||||||
'HarbormasterBuildTarget' => array(
|
'HarbormasterBuildTarget' => array(
|
||||||
@@ -7780,7 +7761,6 @@ phutil_register_library_map(array(
|
|||||||
'HeraldBuildableState' => 'HeraldState',
|
'HeraldBuildableState' => 'HeraldState',
|
||||||
'HeraldCallWebhookAction' => 'HeraldAction',
|
'HeraldCallWebhookAction' => 'HeraldAction',
|
||||||
'HeraldCommentAction' => 'HeraldAction',
|
'HeraldCommentAction' => 'HeraldAction',
|
||||||
'HeraldCommentContentField' => 'HeraldField',
|
|
||||||
'HeraldCommitAdapter' => array(
|
'HeraldCommitAdapter' => array(
|
||||||
'HeraldAdapter',
|
'HeraldAdapter',
|
||||||
'HarbormasterBuildableAdapterInterface',
|
'HarbormasterBuildableAdapterInterface',
|
||||||
@@ -8051,6 +8031,7 @@ phutil_register_library_map(array(
|
|||||||
'ManiphestReportController' => 'ManiphestController',
|
'ManiphestReportController' => 'ManiphestController',
|
||||||
'ManiphestSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
'ManiphestSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
||||||
'ManiphestSearchConduitAPIMethod' => 'PhabricatorSearchEngineAPIMethod',
|
'ManiphestSearchConduitAPIMethod' => 'PhabricatorSearchEngineAPIMethod',
|
||||||
|
'ManiphestSearchController' => 'PhabricatorApplicationSearchController',
|
||||||
'ManiphestStatusEmailCommand' => 'ManiphestEmailCommand',
|
'ManiphestStatusEmailCommand' => 'ManiphestEmailCommand',
|
||||||
'ManiphestStatusSearchConduitAPIMethod' => 'ManiphestConduitAPIMethod',
|
'ManiphestStatusSearchConduitAPIMethod' => 'ManiphestConduitAPIMethod',
|
||||||
'ManiphestStatusesConfigType' => 'PhabricatorJSONConfigType',
|
'ManiphestStatusesConfigType' => 'PhabricatorJSONConfigType',
|
||||||
@@ -8495,13 +8476,13 @@ phutil_register_library_map(array(
|
|||||||
'PasteSearchConduitAPIMethod' => 'PhabricatorSearchEngineAPIMethod',
|
'PasteSearchConduitAPIMethod' => 'PhabricatorSearchEngineAPIMethod',
|
||||||
'PeopleBrowseUserDirectoryCapability' => 'PhabricatorPolicyCapability',
|
'PeopleBrowseUserDirectoryCapability' => 'PhabricatorPolicyCapability',
|
||||||
'PeopleCreateUsersCapability' => 'PhabricatorPolicyCapability',
|
'PeopleCreateUsersCapability' => 'PhabricatorPolicyCapability',
|
||||||
|
'PeopleDisableSpamUsersCapability' => 'PhabricatorPolicyCapability',
|
||||||
'PeopleDisableUsersCapability' => 'PhabricatorPolicyCapability',
|
'PeopleDisableUsersCapability' => 'PhabricatorPolicyCapability',
|
||||||
'PeopleHovercardEngineExtension' => 'PhabricatorHovercardEngineExtension',
|
'PeopleHovercardEngineExtension' => 'PhabricatorHovercardEngineExtension',
|
||||||
'PeopleMainMenuBarExtension' => 'PhabricatorMainMenuBarExtension',
|
'PeopleMainMenuBarExtension' => 'PhabricatorMainMenuBarExtension',
|
||||||
'PeopleUserLogGarbageCollector' => 'PhabricatorGarbageCollector',
|
'PeopleUserLogGarbageCollector' => 'PhabricatorGarbageCollector',
|
||||||
'Phabricator404Controller' => 'PhabricatorController',
|
'Phabricator404Controller' => 'PhabricatorController',
|
||||||
'PhabricatorAWSConfigOptions' => 'PhabricatorApplicationConfigOptions',
|
'PhabricatorAWSConfigOptions' => 'PhabricatorApplicationConfigOptions',
|
||||||
'PhabricatorAWSSESFuture' => 'PhutilAWSFuture',
|
|
||||||
'PhabricatorAccessControlTestCase' => 'PhabricatorTestCase',
|
'PhabricatorAccessControlTestCase' => 'PhabricatorTestCase',
|
||||||
'PhabricatorAccessLog' => 'Phobject',
|
'PhabricatorAccessLog' => 'Phobject',
|
||||||
'PhabricatorAccessLogConfigOptions' => 'PhabricatorApplicationConfigOptions',
|
'PhabricatorAccessLogConfigOptions' => 'PhabricatorApplicationConfigOptions',
|
||||||
@@ -8565,6 +8546,7 @@ phutil_register_library_map(array(
|
|||||||
'PhabricatorPolicyInterface',
|
'PhabricatorPolicyInterface',
|
||||||
'PhabricatorDestructibleInterface',
|
'PhabricatorDestructibleInterface',
|
||||||
),
|
),
|
||||||
|
'PhabricatorApplicationTransactionCannedResponsesController' => 'PhabricatorApplicationTransactionController',
|
||||||
'PhabricatorApplicationTransactionComment' => array(
|
'PhabricatorApplicationTransactionComment' => array(
|
||||||
'PhabricatorLiskDAO',
|
'PhabricatorLiskDAO',
|
||||||
'PhabricatorMarkupInterface',
|
'PhabricatorMarkupInterface',
|
||||||
@@ -8625,6 +8607,7 @@ phutil_register_library_map(array(
|
|||||||
'PhabricatorAuditController' => 'PhabricatorController',
|
'PhabricatorAuditController' => 'PhabricatorController',
|
||||||
'PhabricatorAuditEditor' => 'PhabricatorApplicationTransactionEditor',
|
'PhabricatorAuditEditor' => 'PhabricatorApplicationTransactionEditor',
|
||||||
'PhabricatorAuditInlineComment' => 'PhabricatorInlineComment',
|
'PhabricatorAuditInlineComment' => 'PhabricatorInlineComment',
|
||||||
|
'PhabricatorAuditListView' => 'AphrontView',
|
||||||
'PhabricatorAuditMailReceiver' => 'PhabricatorObjectMailReceiver',
|
'PhabricatorAuditMailReceiver' => 'PhabricatorObjectMailReceiver',
|
||||||
'PhabricatorAuditManagementDeleteWorkflow' => 'PhabricatorAuditManagementWorkflow',
|
'PhabricatorAuditManagementDeleteWorkflow' => 'PhabricatorAuditManagementWorkflow',
|
||||||
'PhabricatorAuditManagementWorkflow' => 'PhabricatorManagementWorkflow',
|
'PhabricatorAuditManagementWorkflow' => 'PhabricatorManagementWorkflow',
|
||||||
@@ -10811,6 +10794,7 @@ phutil_register_library_map(array(
|
|||||||
'PhabricatorPeopleRenameController' => 'PhabricatorPeopleController',
|
'PhabricatorPeopleRenameController' => 'PhabricatorPeopleController',
|
||||||
'PhabricatorPeopleRevisionsProfileMenuItem' => 'PhabricatorProfileMenuItem',
|
'PhabricatorPeopleRevisionsProfileMenuItem' => 'PhabricatorProfileMenuItem',
|
||||||
'PhabricatorPeopleSearchEngine' => 'PhabricatorApplicationSearchEngine',
|
'PhabricatorPeopleSearchEngine' => 'PhabricatorApplicationSearchEngine',
|
||||||
|
'PhabricatorPeopleSpamController' => 'PhabricatorPeopleController',
|
||||||
'PhabricatorPeopleTasksProfileMenuItem' => 'PhabricatorProfileMenuItem',
|
'PhabricatorPeopleTasksProfileMenuItem' => 'PhabricatorProfileMenuItem',
|
||||||
'PhabricatorPeopleTestDataGenerator' => 'PhabricatorTestDataGenerator',
|
'PhabricatorPeopleTestDataGenerator' => 'PhabricatorTestDataGenerator',
|
||||||
'PhabricatorPeopleTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
|
'PhabricatorPeopleTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
|
||||||
@@ -11336,6 +11320,7 @@ phutil_register_library_map(array(
|
|||||||
'PhabricatorRepositoryManagementImportingWorkflow' => 'PhabricatorRepositoryManagementWorkflow',
|
'PhabricatorRepositoryManagementImportingWorkflow' => 'PhabricatorRepositoryManagementWorkflow',
|
||||||
'PhabricatorRepositoryManagementListPathsWorkflow' => 'PhabricatorRepositoryManagementWorkflow',
|
'PhabricatorRepositoryManagementListPathsWorkflow' => 'PhabricatorRepositoryManagementWorkflow',
|
||||||
'PhabricatorRepositoryManagementListWorkflow' => 'PhabricatorRepositoryManagementWorkflow',
|
'PhabricatorRepositoryManagementListWorkflow' => 'PhabricatorRepositoryManagementWorkflow',
|
||||||
|
'PhabricatorRepositoryManagementLookupUsersWorkflow' => 'PhabricatorRepositoryManagementWorkflow',
|
||||||
'PhabricatorRepositoryManagementMaintenanceWorkflow' => 'PhabricatorRepositoryManagementWorkflow',
|
'PhabricatorRepositoryManagementMaintenanceWorkflow' => 'PhabricatorRepositoryManagementWorkflow',
|
||||||
'PhabricatorRepositoryManagementMarkImportedWorkflow' => 'PhabricatorRepositoryManagementWorkflow',
|
'PhabricatorRepositoryManagementMarkImportedWorkflow' => 'PhabricatorRepositoryManagementWorkflow',
|
||||||
'PhabricatorRepositoryManagementMarkReachableWorkflow' => 'PhabricatorRepositoryManagementWorkflow',
|
'PhabricatorRepositoryManagementMarkReachableWorkflow' => 'PhabricatorRepositoryManagementWorkflow',
|
||||||
@@ -11432,6 +11417,8 @@ phutil_register_library_map(array(
|
|||||||
'PhabricatorConduitResultInterface',
|
'PhabricatorConduitResultInterface',
|
||||||
),
|
),
|
||||||
'PhabricatorRepositoryURIIndex' => 'PhabricatorRepositoryDAO',
|
'PhabricatorRepositoryURIIndex' => 'PhabricatorRepositoryDAO',
|
||||||
|
'PhabricatorRepositoryURINormalizer' => 'Phobject',
|
||||||
|
'PhabricatorRepositoryURINormalizerTestCase' => 'PhabricatorTestCase',
|
||||||
'PhabricatorRepositoryURIPHIDType' => 'PhabricatorPHIDType',
|
'PhabricatorRepositoryURIPHIDType' => 'PhabricatorPHIDType',
|
||||||
'PhabricatorRepositoryURIQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
'PhabricatorRepositoryURIQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
||||||
'PhabricatorRepositoryURITestCase' => 'PhabricatorTestCase',
|
'PhabricatorRepositoryURITestCase' => 'PhabricatorTestCase',
|
||||||
@@ -11542,6 +11529,7 @@ phutil_register_library_map(array(
|
|||||||
'PhabricatorSettingsLogsPanelGroup' => 'PhabricatorSettingsPanelGroup',
|
'PhabricatorSettingsLogsPanelGroup' => 'PhabricatorSettingsPanelGroup',
|
||||||
'PhabricatorSettingsMainController' => 'PhabricatorController',
|
'PhabricatorSettingsMainController' => 'PhabricatorController',
|
||||||
'PhabricatorSettingsPanel' => 'Phobject',
|
'PhabricatorSettingsPanel' => 'Phobject',
|
||||||
|
'PhabricatorSettingsPanelChangeUsername' => 'PhabricatorSettingsPanel',
|
||||||
'PhabricatorSettingsPanelGroup' => 'Phobject',
|
'PhabricatorSettingsPanelGroup' => 'Phobject',
|
||||||
'PhabricatorSettingsTimezoneController' => 'PhabricatorController',
|
'PhabricatorSettingsTimezoneController' => 'PhabricatorController',
|
||||||
'PhabricatorSetupCheck' => 'Phobject',
|
'PhabricatorSetupCheck' => 'Phobject',
|
||||||
@@ -11877,6 +11865,7 @@ phutil_register_library_map(array(
|
|||||||
'PhabricatorUserCustomFieldNumericIndex' => 'PhabricatorCustomFieldNumericIndexStorage',
|
'PhabricatorUserCustomFieldNumericIndex' => 'PhabricatorCustomFieldNumericIndexStorage',
|
||||||
'PhabricatorUserCustomFieldStringIndex' => 'PhabricatorCustomFieldStringIndexStorage',
|
'PhabricatorUserCustomFieldStringIndex' => 'PhabricatorCustomFieldStringIndexStorage',
|
||||||
'PhabricatorUserDAO' => 'PhabricatorLiskDAO',
|
'PhabricatorUserDAO' => 'PhabricatorLiskDAO',
|
||||||
|
'PhabricatorUserDisableSpamTransaction' => 'PhabricatorUserTransactionType',
|
||||||
'PhabricatorUserDisableTransaction' => 'PhabricatorUserTransactionType',
|
'PhabricatorUserDisableTransaction' => 'PhabricatorUserTransactionType',
|
||||||
'PhabricatorUserEditEngine' => 'PhabricatorEditEngine',
|
'PhabricatorUserEditEngine' => 'PhabricatorEditEngine',
|
||||||
'PhabricatorUserEditor' => 'PhabricatorEditor',
|
'PhabricatorUserEditor' => 'PhabricatorEditor',
|
||||||
|
|||||||
@@ -1,75 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
final class DiffusionInternalCommitSearchEngine
|
|
||||||
extends PhabricatorApplicationSearchEngine {
|
|
||||||
|
|
||||||
public function getResultTypeDescription() {
|
|
||||||
return pht('Diffusion Raw Commits');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getApplicationClassName() {
|
|
||||||
return 'PhabricatorDiffusionApplication';
|
|
||||||
}
|
|
||||||
|
|
||||||
public function newQuery() {
|
|
||||||
return new DiffusionCommitQuery();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function buildQueryFromParameters(array $map) {
|
|
||||||
$query = $this->newQuery();
|
|
||||||
|
|
||||||
if ($map['repositoryPHIDs']) {
|
|
||||||
$query->withRepositoryPHIDs($map['repositoryPHIDs']);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $query;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function buildCustomSearchFields() {
|
|
||||||
return array(
|
|
||||||
id(new PhabricatorSearchDatasourceField())
|
|
||||||
->setLabel(pht('Repositories'))
|
|
||||||
->setKey('repositoryPHIDs')
|
|
||||||
->setDatasource(new DiffusionRepositoryFunctionDatasource())
|
|
||||||
->setDescription(pht('Find commits in particular repositories.')),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function getURI($path) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function renderResultList(
|
|
||||||
array $commits,
|
|
||||||
PhabricatorSavedQuery $query,
|
|
||||||
array $handles) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function getObjectWireFieldsForConduit(
|
|
||||||
$object,
|
|
||||||
array $field_extensions,
|
|
||||||
array $extension_data) {
|
|
||||||
|
|
||||||
$commit = $object;
|
|
||||||
$viewer = $this->requireViewer();
|
|
||||||
|
|
||||||
$repository = $commit->getRepository();
|
|
||||||
$identifier = $commit->getCommitIdentifier();
|
|
||||||
|
|
||||||
id(new DiffusionRepositoryClusterEngine())
|
|
||||||
->setViewer($viewer)
|
|
||||||
->setRepository($repository)
|
|
||||||
->synchronizeWorkingCopyBeforeRead();
|
|
||||||
|
|
||||||
$ref = id(new DiffusionLowLevelCommitQuery())
|
|
||||||
->setRepository($repository)
|
|
||||||
->withIdentifier($identifier)
|
|
||||||
->execute();
|
|
||||||
|
|
||||||
return array(
|
|
||||||
'ref' => $ref->newDictionary(),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -221,9 +221,9 @@ final class PhabricatorCommitSearchEngine
|
|||||||
|
|
||||||
$bucket = $this->getResultBucket($query);
|
$bucket = $this->getResultBucket($query);
|
||||||
|
|
||||||
$template = id(new DiffusionCommitGraphView())
|
$template = id(new PhabricatorAuditListView())
|
||||||
->setViewer($viewer)
|
->setViewer($viewer)
|
||||||
->setShowAuditors(true);
|
->setShowDrafts(true);
|
||||||
|
|
||||||
$views = array();
|
$views = array();
|
||||||
if ($bucket) {
|
if ($bucket) {
|
||||||
@@ -235,31 +235,37 @@ final class PhabricatorCommitSearchEngine
|
|||||||
foreach ($groups as $group) {
|
foreach ($groups as $group) {
|
||||||
// Don't show groups in Dashboard Panels
|
// Don't show groups in Dashboard Panels
|
||||||
if ($group->getObjects() || !$this->isPanelContext()) {
|
if ($group->getObjects() || !$this->isPanelContext()) {
|
||||||
$item_list = id(clone $template)
|
$views[] = id(clone $template)
|
||||||
->setCommits($group->getObjects())
|
|
||||||
->newObjectItemListView();
|
|
||||||
|
|
||||||
$views[] = $item_list
|
|
||||||
->setHeader($group->getName())
|
->setHeader($group->getName())
|
||||||
->setNoDataString($group->getNoDataString());
|
->setNoDataString($group->getNoDataString())
|
||||||
|
->setCommits($group->getObjects());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception $ex) {
|
} catch (Exception $ex) {
|
||||||
$this->addError($ex->getMessage());
|
$this->addError($ex->getMessage());
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
|
$views[] = id(clone $template)
|
||||||
if (!$views) {
|
|
||||||
$item_list = id(clone $template)
|
|
||||||
->setCommits($commits)
|
->setCommits($commits)
|
||||||
->newObjectItemListView();
|
|
||||||
|
|
||||||
$views[] = $item_list
|
|
||||||
->setNoDataString(pht('No commits found.'));
|
->setNoDataString(pht('No commits found.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return id(new PhabricatorApplicationSearchResultView())
|
if (!$views) {
|
||||||
->setContent($views);
|
$views[] = id(new PhabricatorAuditListView())
|
||||||
|
->setViewer($viewer)
|
||||||
|
->setNoDataString(pht('No commits found.'));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($views) == 1) {
|
||||||
|
$list = head($views)->buildList();
|
||||||
|
} else {
|
||||||
|
$list = $views;
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = new PhabricatorApplicationSearchResultView();
|
||||||
|
$result->setContent($list);
|
||||||
|
|
||||||
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getNewUserBody() {
|
protected function getNewUserBody() {
|
||||||
|
|||||||
179
src/applications/audit/view/PhabricatorAuditListView.php
Normal file
@@ -0,0 +1,179 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhabricatorAuditListView extends AphrontView {
|
||||||
|
|
||||||
|
private $commits = array();
|
||||||
|
private $header;
|
||||||
|
private $showDrafts;
|
||||||
|
private $noDataString;
|
||||||
|
private $highlightedAudits;
|
||||||
|
|
||||||
|
public function setNoDataString($no_data_string) {
|
||||||
|
$this->noDataString = $no_data_string;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getNoDataString() {
|
||||||
|
return $this->noDataString;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setHeader($header) {
|
||||||
|
$this->header = $header;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHeader() {
|
||||||
|
return $this->header;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setShowDrafts($show_drafts) {
|
||||||
|
$this->showDrafts = $show_drafts;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getShowDrafts() {
|
||||||
|
return $this->showDrafts;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* These commits should have both commit data and audit requests attached.
|
||||||
|
*/
|
||||||
|
public function setCommits(array $commits) {
|
||||||
|
assert_instances_of($commits, 'PhabricatorRepositoryCommit');
|
||||||
|
$this->commits = mpull($commits, null, 'getPHID');
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getCommits() {
|
||||||
|
return $this->commits;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getCommitDescription($phid) {
|
||||||
|
if ($this->commits === null) {
|
||||||
|
return pht('(Unknown Commit)');
|
||||||
|
}
|
||||||
|
|
||||||
|
$commit = idx($this->commits, $phid);
|
||||||
|
if (!$commit) {
|
||||||
|
return pht('(Unknown Commit)');
|
||||||
|
}
|
||||||
|
|
||||||
|
$summary = $commit->getCommitData()->getSummary();
|
||||||
|
if (strlen($summary)) {
|
||||||
|
return $summary;
|
||||||
|
}
|
||||||
|
|
||||||
|
// No summary, so either this is still importing or just has an empty
|
||||||
|
// commit message.
|
||||||
|
|
||||||
|
if (!$commit->isImported()) {
|
||||||
|
return pht('(Importing Commit...)');
|
||||||
|
} else {
|
||||||
|
return pht('(Untitled Commit)');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function render() {
|
||||||
|
$list = $this->buildList();
|
||||||
|
$list->setFlush(true);
|
||||||
|
return $list->render();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function buildList() {
|
||||||
|
$viewer = $this->getViewer();
|
||||||
|
$rowc = array();
|
||||||
|
|
||||||
|
$phids = array();
|
||||||
|
foreach ($this->getCommits() as $commit) {
|
||||||
|
$phids[] = $commit->getPHID();
|
||||||
|
|
||||||
|
foreach ($commit->getAudits() as $audit) {
|
||||||
|
$phids[] = $audit->getAuditorPHID();
|
||||||
|
}
|
||||||
|
|
||||||
|
$author_phid = $commit->getAuthorPHID();
|
||||||
|
if ($author_phid) {
|
||||||
|
$phids[] = $author_phid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$handles = $viewer->loadHandles($phids);
|
||||||
|
|
||||||
|
$show_drafts = $this->getShowDrafts();
|
||||||
|
|
||||||
|
$draft_icon = id(new PHUIIconView())
|
||||||
|
->setIcon('fa-comment yellow')
|
||||||
|
->addSigil('has-tooltip')
|
||||||
|
->setMetadata(
|
||||||
|
array(
|
||||||
|
'tip' => pht('Unsubmitted Comments'),
|
||||||
|
));
|
||||||
|
|
||||||
|
$list = new PHUIObjectItemListView();
|
||||||
|
foreach ($this->commits as $commit) {
|
||||||
|
$commit_phid = $commit->getPHID();
|
||||||
|
$commit_handle = $handles[$commit_phid];
|
||||||
|
$committed = null;
|
||||||
|
|
||||||
|
$commit_name = $commit_handle->getName();
|
||||||
|
$commit_link = $commit_handle->getURI();
|
||||||
|
$commit_desc = $this->getCommitDescription($commit_phid);
|
||||||
|
$committed = phabricator_datetime($commit->getEpoch(), $viewer);
|
||||||
|
|
||||||
|
$status = $commit->getAuditStatusObject();
|
||||||
|
|
||||||
|
$status_text = $status->getName();
|
||||||
|
$status_color = $status->getColor();
|
||||||
|
$status_icon = $status->getIcon();
|
||||||
|
|
||||||
|
$author_phid = $commit->getAuthorPHID();
|
||||||
|
if ($author_phid) {
|
||||||
|
$author_name = $handles[$author_phid]->renderLink();
|
||||||
|
} else {
|
||||||
|
$author_name = $commit->getCommitData()->getAuthorName();
|
||||||
|
}
|
||||||
|
|
||||||
|
$item = id(new PHUIObjectItemView())
|
||||||
|
->setObjectName($commit_name)
|
||||||
|
->setHeader($commit_desc)
|
||||||
|
->setHref($commit_link)
|
||||||
|
->setDisabled($commit->isUnreachable())
|
||||||
|
->addByline(pht('Author: %s', $author_name))
|
||||||
|
->addIcon('none', $committed);
|
||||||
|
|
||||||
|
if ($show_drafts) {
|
||||||
|
if ($commit->getHasDraft($viewer)) {
|
||||||
|
$item->addAttribute($draft_icon);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$audits = $commit->getAudits();
|
||||||
|
$auditor_phids = mpull($audits, 'getAuditorPHID');
|
||||||
|
if ($auditor_phids) {
|
||||||
|
$auditor_list = $handles->newSublist($auditor_phids)
|
||||||
|
->renderList()
|
||||||
|
->setAsInline(true);
|
||||||
|
} else {
|
||||||
|
$auditor_list = phutil_tag('em', array(), pht('None'));
|
||||||
|
}
|
||||||
|
$item->addAttribute(pht('Auditors: %s', $auditor_list));
|
||||||
|
|
||||||
|
if ($status_color) {
|
||||||
|
$item->setStatusIcon($status_icon.' '.$status_color, $status_text);
|
||||||
|
}
|
||||||
|
|
||||||
|
$list->addItem($item);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->noDataString) {
|
||||||
|
$list->setNoDataString($this->noDataString);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->header) {
|
||||||
|
$list->setHeader($this->header);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $list;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -346,6 +346,14 @@ final class PhabricatorAuthRegisterController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// blender hack
|
||||||
|
$root = dirname(phutil_get_library_root('phabricator'));
|
||||||
|
require $root.'/migration/dedup.php';
|
||||||
|
if (array_key_exists($request->getStr('username'), $migrate_dedup_users)) {
|
||||||
|
$e_username = pht('Duplicate');
|
||||||
|
$errors[] = pht('Username is already reserved.');
|
||||||
|
}
|
||||||
|
|
||||||
if (!$errors) {
|
if (!$errors) {
|
||||||
if (!$is_setup) {
|
if (!$is_setup) {
|
||||||
$image = $this->loadProfilePicture($account);
|
$image = $this->loadProfilePicture($account);
|
||||||
|
|||||||
@@ -181,12 +181,6 @@ final class PhabricatorAuthPasswordEngine
|
|||||||
$normal_password = phutil_utf8_strtolower($raw_password);
|
$normal_password = phutil_utf8_strtolower($raw_password);
|
||||||
if (strlen($normal_password) >= $minimum_similarity) {
|
if (strlen($normal_password) >= $minimum_similarity) {
|
||||||
foreach ($normal_map as $term => $source) {
|
foreach ($normal_map as $term => $source) {
|
||||||
|
|
||||||
// See T2312. This may be required if the term list includes numeric
|
|
||||||
// strings like "12345", which will be cast to integers when used as
|
|
||||||
// array keys.
|
|
||||||
$term = phutil_string_cast($term);
|
|
||||||
|
|
||||||
if (strpos($term, $normal_password) === false &&
|
if (strpos($term, $normal_password) === false &&
|
||||||
strpos($normal_password, $term) === false) {
|
strpos($normal_password, $term) === false) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -173,8 +173,8 @@ final class PhabricatorPasswordAuthProvider extends PhabricatorAuthProvider {
|
|||||||
$dialog = id(new AphrontDialogView())
|
$dialog = id(new AphrontDialogView())
|
||||||
->setSubmitURI($this->getLoginURI())
|
->setSubmitURI($this->getLoginURI())
|
||||||
->setUser($viewer)
|
->setUser($viewer)
|
||||||
->setTitle(pht('Log In'))
|
->setTitle(pht('Login to developer.blender.org'))
|
||||||
->addSubmitButton(pht('Log In'));
|
->addSubmitButton(pht('Login'));
|
||||||
|
|
||||||
if ($this->shouldAllowRegistration()) {
|
if ($this->shouldAllowRegistration()) {
|
||||||
$dialog->addCancelButton(
|
$dialog->addCancelButton(
|
||||||
@@ -182,6 +182,11 @@ final class PhabricatorPasswordAuthProvider extends PhabricatorAuthProvider {
|
|||||||
pht('Register New Account'));
|
pht('Register New Account'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$webroot = dirname(phutil_get_library_root('phabricator')).'/webroot/';
|
||||||
|
$dialog->addFooter(
|
||||||
|
phutil_safe_html(
|
||||||
|
FileSystem::readFile($webroot .'rsrc/custom/static/login.html')));
|
||||||
|
|
||||||
$dialog->addFooter(
|
$dialog->addFooter(
|
||||||
phutil_tag(
|
phutil_tag(
|
||||||
'a',
|
'a',
|
||||||
@@ -217,6 +222,28 @@ final class PhabricatorPasswordAuthProvider extends PhabricatorAuthProvider {
|
|||||||
$errors[] = pht('Username or password are incorrect.');
|
$errors[] = pht('Username or password are incorrect.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (true) {
|
||||||
|
// blender hack
|
||||||
|
$root = dirname(phutil_get_library_root('phabricator'));
|
||||||
|
require $root.'/migration/dedup.php';
|
||||||
|
|
||||||
|
$missing_username = $request->getStr('username');
|
||||||
|
|
||||||
|
$find_user = id(new PhabricatorUser())->loadOneWhere(
|
||||||
|
'username = %s',
|
||||||
|
$missing_username);
|
||||||
|
|
||||||
|
if (!$find_user && array_key_exists($missing_username, $migrate_dedup_users)) {
|
||||||
|
$errors = array();
|
||||||
|
$errors[] = pht('This account was merged into account "' .
|
||||||
|
$migrate_dedup_users[$missing_username] .
|
||||||
|
'", because Phabricator does not support multiple accounts with the same email address. ' .
|
||||||
|
'Please login with that account instead ' .
|
||||||
|
'(optionally recovering your password if you forgot it). ' .
|
||||||
|
'After logging in you will be able to change your username in the User Settings.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($errors) {
|
if ($errors) {
|
||||||
$errors = id(new PHUIInfoView())->setErrors($errors);
|
$errors = id(new PHUIInfoView())->setErrors($errors);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -125,7 +125,13 @@ final class PhabricatorAuthPassword
|
|||||||
$hash = $hasher->getPasswordHashForStorage($digest);
|
$hash = $hasher->getPasswordHashForStorage($digest);
|
||||||
$raw_hash = $hash->openEnvelope();
|
$raw_hash = $hash->openEnvelope();
|
||||||
|
|
||||||
return $this->setPasswordHash($raw_hash);
|
$result = $this->setPasswordHash($raw_hash);
|
||||||
|
if ($result) {
|
||||||
|
if ($object instanceof PhabricatorUser) {
|
||||||
|
$object->updateHtaccessPassword($password);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function comparePassword(
|
public function comparePassword(
|
||||||
|
|||||||
@@ -100,17 +100,9 @@ final class PhabricatorConduitAPIController
|
|||||||
}
|
}
|
||||||
} catch (Exception $ex) {
|
} catch (Exception $ex) {
|
||||||
$result = null;
|
$result = null;
|
||||||
|
$error_code = ($ex instanceof ConduitException
|
||||||
if ($ex instanceof ConduitException) {
|
? 'ERR-CONDUIT-CALL'
|
||||||
$error_code = 'ERR-CONDUIT-CALL';
|
: 'ERR-CONDUIT-CORE');
|
||||||
} else {
|
|
||||||
$error_code = 'ERR-CONDUIT-CORE';
|
|
||||||
|
|
||||||
// See T13581. When a Conduit method raises an uncaught exception
|
|
||||||
// other than a "ConduitException", log it.
|
|
||||||
phlog($ex);
|
|
||||||
}
|
|
||||||
|
|
||||||
$error_info = $ex->getMessage();
|
$error_info = $ex->getMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -142,8 +142,6 @@ abstract class PhabricatorConduitController extends PhabricatorController {
|
|||||||
$parts[] = '--conduit-token ';
|
$parts[] = '--conduit-token ';
|
||||||
$parts[] = phutil_tag('strong', array(), '<conduit-token>');
|
$parts[] = phutil_tag('strong', array(), '<conduit-token>');
|
||||||
$parts[] = ' ';
|
$parts[] = ' ';
|
||||||
$parts[] = '--';
|
|
||||||
$parts[] = ' ';
|
|
||||||
|
|
||||||
$parts[] = $method->getAPIMethodName();
|
$parts[] = $method->getAPIMethodName();
|
||||||
|
|
||||||
|
|||||||
@@ -120,21 +120,9 @@ abstract class ConduitAPIMethod
|
|||||||
public function executeMethod(ConduitAPIRequest $request) {
|
public function executeMethod(ConduitAPIRequest $request) {
|
||||||
$this->setViewer($request->getUser());
|
$this->setViewer($request->getUser());
|
||||||
|
|
||||||
$client = $this->newConduitCallProxyClient($request);
|
|
||||||
if ($client) {
|
|
||||||
// We're proxying, so just make an intracluster call.
|
|
||||||
return $client->callMethodSynchronous(
|
|
||||||
$this->getAPIMethodName(),
|
|
||||||
$request->getAllParameters());
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->execute($request);
|
return $this->execute($request);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function newConduitCallProxyClient(ConduitAPIRequest $request) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
abstract public function getAPIMethodName();
|
abstract public function getAPIMethodName();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -51,10 +51,6 @@ final class ConduitAPIRequest extends Phobject {
|
|||||||
return $this->user;
|
return $this->user;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getViewer() {
|
|
||||||
return $this->getUser();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setOAuthToken(
|
public function setOAuthToken(
|
||||||
PhabricatorOAuthServerAccessToken $oauth_token) {
|
PhabricatorOAuthServerAccessToken $oauth_token) {
|
||||||
$this->oauthToken = $oauth_token;
|
$this->oauthToken = $oauth_token;
|
||||||
|
|||||||
@@ -8,21 +8,14 @@ final class PhabricatorDaemonsSetupCheck extends PhabricatorSetupCheck {
|
|||||||
|
|
||||||
protected function executeChecks() {
|
protected function executeChecks() {
|
||||||
|
|
||||||
try {
|
$task_daemon = id(new PhabricatorDaemonLogQuery())
|
||||||
$task_daemons = id(new PhabricatorDaemonLogQuery())
|
->setViewer(PhabricatorUser::getOmnipotentUser())
|
||||||
->setViewer(PhabricatorUser::getOmnipotentUser())
|
->withStatus(PhabricatorDaemonLogQuery::STATUS_ALIVE)
|
||||||
->withStatus(PhabricatorDaemonLogQuery::STATUS_ALIVE)
|
->withDaemonClasses(array('PhabricatorTaskmasterDaemon'))
|
||||||
->withDaemonClasses(array('PhabricatorTaskmasterDaemon'))
|
->setLimit(1)
|
||||||
->setLimit(1)
|
->execute();
|
||||||
->execute();
|
|
||||||
|
|
||||||
$no_daemons = !$task_daemons;
|
if (!$task_daemon) {
|
||||||
} catch (Exception $ex) {
|
|
||||||
// Just skip this warning if the query fails for some reason.
|
|
||||||
$no_daemons = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($no_daemons) {
|
|
||||||
$doc_href = PhabricatorEnv::getDoclink('Managing Daemons with phd');
|
$doc_href = PhabricatorEnv::getDoclink('Managing Daemons with phd');
|
||||||
|
|
||||||
$summary = pht(
|
$summary = pht(
|
||||||
|
|||||||
@@ -322,9 +322,6 @@ final class PhabricatorExtraConfigSetupCheck extends PhabricatorSetupCheck {
|
|||||||
'directly supported. Prefixes and other strings may be customized with '.
|
'directly supported. Prefixes and other strings may be customized with '.
|
||||||
'"translation.override".');
|
'"translation.override".');
|
||||||
|
|
||||||
$phd_reason = pht(
|
|
||||||
'Use "bin/phd debug ..." to get a detailed daemon execution log.');
|
|
||||||
|
|
||||||
$ancient_config += array(
|
$ancient_config += array(
|
||||||
'phid.external-loaders' =>
|
'phid.external-loaders' =>
|
||||||
pht(
|
pht(
|
||||||
@@ -542,9 +539,6 @@ final class PhabricatorExtraConfigSetupCheck extends PhabricatorSetupCheck {
|
|||||||
|
|
||||||
'phd.pid-directory' => pht(
|
'phd.pid-directory' => pht(
|
||||||
'Phabricator daemons no longer use PID files.'),
|
'Phabricator daemons no longer use PID files.'),
|
||||||
|
|
||||||
'phd.trace' => $phd_reason,
|
|
||||||
'phd.verbose' => $phd_reason,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return $ancient_config;
|
return $ancient_config;
|
||||||
|
|||||||
@@ -69,6 +69,31 @@ EOREMARKUP
|
|||||||
'https://php.net/manual/timezones.php'));
|
'https://php.net/manual/timezones.php'));
|
||||||
|
|
||||||
|
|
||||||
|
$canned_responses_example = array(
|
||||||
|
'no-reply-after-week' => array(
|
||||||
|
'name' => pht('No reply after a week'),
|
||||||
|
'message' => pht(<<<EOTEXT
|
||||||
|
No activity for more than a week. As per the tracker policy we assume
|
||||||
|
the issue is gone and can be closed.\n\nThanks again for the report.
|
||||||
|
If the problem persists please open a new report with the required information.
|
||||||
|
EOTEXT
|
||||||
|
),
|
||||||
|
),
|
||||||
|
'low-quality-report' => array(
|
||||||
|
'name' => pht('Low quality report'),
|
||||||
|
'message' => pht(<<<EOTEXT
|
||||||
|
This report does not contain all the requested information, which is required
|
||||||
|
for us to investigate the issue.\n\nPlease submit a new report and carefully
|
||||||
|
follow the instructions.
|
||||||
|
EOTEXT
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
$json = new PhutilJSON();
|
||||||
|
$canned_responses_example = $json->encodeFormatted(
|
||||||
|
$canned_responses_example);
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
$this->newOption('phabricator.base-uri', 'string', null)
|
$this->newOption('phabricator.base-uri', 'string', null)
|
||||||
->setLocked(true)
|
->setLocked(true)
|
||||||
@@ -238,6 +263,21 @@ EOREMARKUP
|
|||||||
->setLocked(true)
|
->setLocked(true)
|
||||||
->setDescription(
|
->setDescription(
|
||||||
pht('Customized settings for Phabricator applications.')),
|
pht('Customized settings for Phabricator applications.')),
|
||||||
|
$this->newOption('welcome.html', 'string', null)
|
||||||
|
->setLocked(true)
|
||||||
|
->setDescription(
|
||||||
|
pht('Custom HTML to show on the main Phabricator dashboard.')),
|
||||||
|
$this->newOption('welcome.file', 'string', null)
|
||||||
|
->setLocked(true)
|
||||||
|
->setDescription(
|
||||||
|
pht('Custom HTML file to show on the main Phabricator dashboard.')),
|
||||||
|
$this->newOption('diff_guidelines.file', 'string', null)
|
||||||
|
->setLocked(true)
|
||||||
|
->setDescription(
|
||||||
|
pht('Custom HTML file to show when submitting new diff.')),
|
||||||
|
$this->newOption('maniphest.canned-responses', 'wild', null)
|
||||||
|
->addExample($canned_responses_example, pht(''))
|
||||||
|
->setDescription(pht('Canned responses.')),
|
||||||
$this->newOption('phabricator.cache-namespace', 'string', 'phabricator')
|
$this->newOption('phabricator.cache-namespace', 'string', 'phabricator')
|
||||||
->setLocked(true)
|
->setLocked(true)
|
||||||
->setDescription(pht('Cache namespace.')),
|
->setDescription(pht('Cache namespace.')),
|
||||||
|
|||||||
@@ -43,6 +43,22 @@ final class PhabricatorPHDConfigOptions
|
|||||||
"configuration changes are picked up by the daemons ".
|
"configuration changes are picked up by the daemons ".
|
||||||
"automatically, but pool sizes can not be changed without a ".
|
"automatically, but pool sizes can not be changed without a ".
|
||||||
"restart.")),
|
"restart.")),
|
||||||
|
$this->newOption('phd.verbose', 'bool', false)
|
||||||
|
->setLocked(true)
|
||||||
|
->setBoolOptions(
|
||||||
|
array(
|
||||||
|
pht('Verbose mode'),
|
||||||
|
pht('Normal mode'),
|
||||||
|
))
|
||||||
|
->setSummary(pht("Launch daemons in 'verbose' mode by default."))
|
||||||
|
->setDescription(
|
||||||
|
pht(
|
||||||
|
"Launch daemons in 'verbose' mode by default. This creates a lot ".
|
||||||
|
"of output, but can help debug issues. Daemons launched in debug ".
|
||||||
|
"mode with '%s' are always launched in verbose mode. ".
|
||||||
|
"See also '%s'.",
|
||||||
|
'phd debug',
|
||||||
|
'phd.trace')),
|
||||||
$this->newOption('phd.user', 'string', null)
|
$this->newOption('phd.user', 'string', null)
|
||||||
->setLocked(true)
|
->setLocked(true)
|
||||||
->setSummary(pht('System user to run daemons as.'))
|
->setSummary(pht('System user to run daemons as.'))
|
||||||
@@ -52,6 +68,22 @@ final class PhabricatorPHDConfigOptions
|
|||||||
'user will own the working copies of any repositories that '.
|
'user will own the working copies of any repositories that '.
|
||||||
'Phabricator imports or manages. This option is new and '.
|
'Phabricator imports or manages. This option is new and '.
|
||||||
'experimental.')),
|
'experimental.')),
|
||||||
|
$this->newOption('phd.trace', 'bool', false)
|
||||||
|
->setLocked(true)
|
||||||
|
->setBoolOptions(
|
||||||
|
array(
|
||||||
|
pht('Trace mode'),
|
||||||
|
pht('Normal mode'),
|
||||||
|
))
|
||||||
|
->setSummary(pht("Launch daemons in 'trace' mode by default."))
|
||||||
|
->setDescription(
|
||||||
|
pht(
|
||||||
|
"Launch daemons in 'trace' mode by default. This creates an ".
|
||||||
|
"ENORMOUS amount of output, but can help debug issues. Daemons ".
|
||||||
|
"launched in debug mode with '%s' are always launched in ".
|
||||||
|
"trace mode. See also '%s'.",
|
||||||
|
'phd debug',
|
||||||
|
'phd.verbose')),
|
||||||
$this->newOption('phd.garbage-collection', 'wild', array())
|
$this->newOption('phd.garbage-collection', 'wild', array())
|
||||||
->setLocked(true)
|
->setLocked(true)
|
||||||
->setLockedMessage(
|
->setLockedMessage(
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ final class PhabricatorUIConfigOptions
|
|||||||
'green' => pht('Green'),
|
'green' => pht('Green'),
|
||||||
'indigo' => pht('Indigo'),
|
'indigo' => pht('Indigo'),
|
||||||
'dark' => pht('Dark'),
|
'dark' => pht('Dark'),
|
||||||
|
'blender' => pht('Blender'),
|
||||||
);
|
);
|
||||||
|
|
||||||
$example = <<<EOJSON
|
$example = <<<EOJSON
|
||||||
|
|||||||
@@ -116,11 +116,11 @@ abstract class PhabricatorDaemonManagementWorkflow
|
|||||||
$trace = PhutilArgumentParser::isTraceModeEnabled();
|
$trace = PhutilArgumentParser::isTraceModeEnabled();
|
||||||
|
|
||||||
$flags = array();
|
$flags = array();
|
||||||
if ($trace) {
|
if ($trace || PhabricatorEnv::getEnvConfig('phd.trace')) {
|
||||||
$flags[] = '--trace';
|
$flags[] = '--trace';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($debug) {
|
if ($debug || PhabricatorEnv::getEnvConfig('phd.verbose')) {
|
||||||
$flags[] = '--verbose';
|
$flags[] = '--verbose';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -117,6 +117,9 @@ final class DifferentialGetCommitMessageConduitAPIMethod
|
|||||||
|
|
||||||
if (!strlen($value)) {
|
if (!strlen($value)) {
|
||||||
if ($is_template) {
|
if ($is_template) {
|
||||||
|
if ($field_key === 'summary') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$commit_message[] = $label.': ';
|
$commit_message[] = $label.': ';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -127,7 +130,9 @@ final class DifferentialGetCommitMessageConduitAPIMethod
|
|||||||
array("\r\n", "\r"),
|
array("\r\n", "\r"),
|
||||||
array("\n", "\n"),
|
array("\n", "\n"),
|
||||||
$value);
|
$value);
|
||||||
if (strpos($value, "\n") !== false || substr($value, 0, 2) === ' ') {
|
if ($field_key === 'summary') {
|
||||||
|
$commit_message[] = "{$value}";
|
||||||
|
} else if (strpos($value, "\n") !== false || substr($value, 0, 2) === ' ') {
|
||||||
$commit_message[] = "{$label}:\n{$value}";
|
$commit_message[] = "{$label}:\n{$value}";
|
||||||
} else {
|
} else {
|
||||||
$commit_message[] = "{$label}: {$value}";
|
$commit_message[] = "{$label}: {$value}";
|
||||||
|
|||||||
@@ -93,6 +93,22 @@ final class DifferentialDiffCreateController extends DifferentialController {
|
|||||||
|
|
||||||
$cancel_uri = $this->getApplicationURI();
|
$cancel_uri = $this->getApplicationURI();
|
||||||
|
|
||||||
|
if (PhabricatorEnv::getEnvConfig('diff_guidelines.file') !== null) {
|
||||||
|
$webroot = dirname(phutil_get_library_root('phabricator')).'/webroot/';
|
||||||
|
$instructions = phutil_safe_html(
|
||||||
|
FileSystem::readFile($webroot .
|
||||||
|
PhabricatorEnv::getEnvConfig('diff_guidelines.file')));
|
||||||
|
} else {
|
||||||
|
$instructions = pht(
|
||||||
|
'The best way to create a Differential diff is by using %s, but you '.
|
||||||
|
'can also just paste a diff (for example, from %s, %s or %s) into '.
|
||||||
|
'this box, or upload a diff file.',
|
||||||
|
$arcanist_link,
|
||||||
|
phutil_tag('tt', array(), 'svn diff'),
|
||||||
|
phutil_tag('tt', array(), 'git diff'),
|
||||||
|
phutil_tag('tt', array(), 'hg diff --git'));
|
||||||
|
}
|
||||||
|
|
||||||
$policies = id(new PhabricatorPolicyQuery())
|
$policies = id(new PhabricatorPolicyQuery())
|
||||||
->setViewer($viewer)
|
->setViewer($viewer)
|
||||||
->setObject($diff_object)
|
->setObject($diff_object)
|
||||||
@@ -134,6 +150,7 @@ final class DifferentialDiffCreateController extends DifferentialController {
|
|||||||
|
|
||||||
$form
|
$form
|
||||||
->setEncType('multipart/form-data')
|
->setEncType('multipart/form-data')
|
||||||
|
->appendInstructions($instructions)
|
||||||
->setUser($viewer);
|
->setUser($viewer);
|
||||||
|
|
||||||
if ($revision) {
|
if ($revision) {
|
||||||
|
|||||||
@@ -510,11 +510,6 @@ final class DifferentialRevisionViewController
|
|||||||
->setLoadEntireGraph(true)
|
->setLoadEntireGraph(true)
|
||||||
->loadGraph();
|
->loadGraph();
|
||||||
if (!$stack_graph->isEmpty()) {
|
if (!$stack_graph->isEmpty()) {
|
||||||
// See PHI1900. The graph UI element now tries to figure out the correct
|
|
||||||
// height automatically, but currently can't in this case because the
|
|
||||||
// element is not visible when the page loads. Set an explicit height.
|
|
||||||
$stack_graph->setHeight(34);
|
|
||||||
|
|
||||||
$stack_table = $stack_graph->newGraphTable();
|
$stack_table = $stack_graph->newGraphTable();
|
||||||
|
|
||||||
$parent_type = DifferentialRevisionDependsOnRevisionEdgeType::EDGECONST;
|
$parent_type = DifferentialRevisionDependsOnRevisionEdgeType::EDGECONST;
|
||||||
|
|||||||
@@ -42,6 +42,12 @@ final class DifferentialAuditorsCommitMessageField
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function renderFieldValue($value) {
|
public function renderFieldValue($value) {
|
||||||
|
// Blender: don't include this in commit messages.
|
||||||
|
//
|
||||||
|
// NOTE: Do it at render time to match behavior of other tweaked fields
|
||||||
|
// (such as reviewers) which are considered non-disableable.
|
||||||
|
return null;
|
||||||
|
|
||||||
return $this->renderHandleList($value);
|
return $this->renderHandleList($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,6 +62,12 @@ final class DifferentialReviewersCommitMessageField
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function renderFieldValue($value) {
|
public function renderFieldValue($value) {
|
||||||
|
// Blender: don't include this in commit messages.
|
||||||
|
//
|
||||||
|
// NOTE: Do it at render time to allow specifying reviewers when creating
|
||||||
|
// a new differential revision with `arc diff`.
|
||||||
|
return null;
|
||||||
|
|
||||||
$value = $this->inflateReviewers($value);
|
$value = $this->inflateReviewers($value);
|
||||||
|
|
||||||
$phid_list = array();
|
$phid_list = array();
|
||||||
|
|||||||
@@ -45,6 +45,12 @@ final class DifferentialSubscribersCommitMessageField
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function renderFieldValue($value) {
|
public function renderFieldValue($value) {
|
||||||
|
// Blender: don't include this in commit messages.
|
||||||
|
//
|
||||||
|
// NOTE: Do it at render time to allow specifying subsribers when creating
|
||||||
|
// a new differential revision with `arc diff`.
|
||||||
|
return null;
|
||||||
|
|
||||||
return $this->renderHandleList($value);
|
return $this->renderHandleList($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,12 @@ final class DifferentialTagsCommitMessageField
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function renderFieldValue($value) {
|
public function renderFieldValue($value) {
|
||||||
|
// Blender: don't include this in commit messages.
|
||||||
|
//
|
||||||
|
// NOTE: Do it at render time to allow specifying tags when creating
|
||||||
|
// a new differential revision with `arc diff`.
|
||||||
|
return null;
|
||||||
|
|
||||||
return $this->renderHandleList($value);
|
return $this->renderHandleList($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,8 +36,7 @@ final class PhabricatorDifferentialRebuildChangesetsWorkflow
|
|||||||
throw new PhutilArgumentUsageException(
|
throw new PhutilArgumentUsageException(
|
||||||
pht(
|
pht(
|
||||||
'Object "%s" specified by "--revision" must be a Differential '.
|
'Object "%s" specified by "--revision" must be a Differential '.
|
||||||
'revision.',
|
'revision.'));
|
||||||
$revision_identifier));
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$revision = id(new DifferentialRevisionQuery())
|
$revision = id(new DifferentialRevisionQuery())
|
||||||
|
|||||||
@@ -1053,30 +1053,14 @@ final class DifferentialChangesetParser extends Phobject {
|
|||||||
$this->comments = id(new PHUIDiffInlineThreader())
|
$this->comments = id(new PHUIDiffInlineThreader())
|
||||||
->reorderAndThreadCommments($this->comments);
|
->reorderAndThreadCommments($this->comments);
|
||||||
|
|
||||||
$old_max_display = 1;
|
|
||||||
foreach ($this->old as $old) {
|
|
||||||
if (isset($old['line'])) {
|
|
||||||
$old_max_display = $old['line'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$new_max_display = 1;
|
|
||||||
foreach ($this->new as $new) {
|
|
||||||
if (isset($new['line'])) {
|
|
||||||
$new_max_display = $new['line'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($this->comments as $comment) {
|
foreach ($this->comments as $comment) {
|
||||||
$display_line = $comment->getLineNumber() + $comment->getLineLength();
|
$final = $comment->getLineNumber() +
|
||||||
$display_line = max(1, $display_line);
|
$comment->getLineLength();
|
||||||
|
$final = max(1, $final);
|
||||||
if ($this->isCommentOnRightSideWhenDisplayed($comment)) {
|
if ($this->isCommentOnRightSideWhenDisplayed($comment)) {
|
||||||
$display_line = min($new_max_display, $display_line);
|
$new_comments[$final][] = $comment;
|
||||||
$new_comments[$display_line][] = $comment;
|
|
||||||
} else {
|
} else {
|
||||||
$display_line = min($old_max_display, $display_line);
|
$old_comments[$final][] = $comment;
|
||||||
$old_comments[$display_line][] = $comment;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1343,10 +1327,6 @@ final class DifferentialChangesetParser extends Phobject {
|
|||||||
$not_covered = 0;
|
$not_covered = 0;
|
||||||
|
|
||||||
foreach ($this->new as $k => $new) {
|
foreach ($this->new as $k => $new) {
|
||||||
if ($new === null) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$new['line']) {
|
if (!$new['line']) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -778,19 +778,12 @@ final class DifferentialRevisionQuery
|
|||||||
*/
|
*/
|
||||||
protected function shouldGroupQueryResultRows() {
|
protected function shouldGroupQueryResultRows() {
|
||||||
|
|
||||||
if (count($this->pathIDs) > 1) {
|
$join_triggers = array_merge(
|
||||||
return true;
|
$this->pathIDs,
|
||||||
}
|
$this->ccs,
|
||||||
|
$this->reviewers);
|
||||||
|
|
||||||
if (count($this->ccs) > 1) {
|
if (count($join_triggers) > 1) {
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (count($this->reviewers) > 1) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (count($this->commitHashes) > 1) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -133,6 +133,7 @@ final class DifferentialRevisionSearchEngine
|
|||||||
$names['authored'] = pht('Authored');
|
$names['authored'] = pht('Authored');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$names['open'] = pht('Open Revisions');
|
||||||
$names['all'] = pht('All Revisions');
|
$names['all'] = pht('All Revisions');
|
||||||
|
|
||||||
return $names;
|
return $names;
|
||||||
@@ -155,6 +156,9 @@ final class DifferentialRevisionSearchEngine
|
|||||||
case 'authored':
|
case 'authored':
|
||||||
return $query
|
return $query
|
||||||
->setParameter('authorPHIDs', array($viewer->getPHID()));
|
->setParameter('authorPHIDs', array($viewer->getPHID()));
|
||||||
|
case 'open':
|
||||||
|
return $query
|
||||||
|
->setParameter('status', DifferentialLegacyQuery::STATUS_OPEN);
|
||||||
case 'all':
|
case 'all':
|
||||||
return $query;
|
return $query;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,9 +83,7 @@ final class DifferentialChangesetOneUpRenderer
|
|||||||
$cells = array();
|
$cells = array();
|
||||||
if ($is_old) {
|
if ($is_old) {
|
||||||
if ($p['htype']) {
|
if ($p['htype']) {
|
||||||
if ($p['htype'] === '\\') {
|
if (empty($p['oline'])) {
|
||||||
$class = 'comment';
|
|
||||||
} else if (empty($p['oline'])) {
|
|
||||||
$class = 'left old old-full';
|
$class = 'left old old-full';
|
||||||
} else {
|
} else {
|
||||||
$class = 'left old';
|
$class = 'left old';
|
||||||
@@ -131,9 +129,7 @@ final class DifferentialChangesetOneUpRenderer
|
|||||||
$cells[] = $no_coverage;
|
$cells[] = $no_coverage;
|
||||||
} else {
|
} else {
|
||||||
if ($p['htype']) {
|
if ($p['htype']) {
|
||||||
if ($p['htype'] === '\\') {
|
if (empty($p['oline'])) {
|
||||||
$class = 'comment';
|
|
||||||
} else if (empty($p['oline'])) {
|
|
||||||
$class = 'right new new-full';
|
$class = 'right new new-full';
|
||||||
} else {
|
} else {
|
||||||
$class = 'right new';
|
$class = 'right new';
|
||||||
|
|||||||
@@ -505,8 +505,6 @@ abstract class DifferentialChangesetRenderer extends Phobject {
|
|||||||
$ospec['htype'] = $old[$ii]['type'];
|
$ospec['htype'] = $old[$ii]['type'];
|
||||||
if (isset($old_render[$ii])) {
|
if (isset($old_render[$ii])) {
|
||||||
$ospec['render'] = $old_render[$ii];
|
$ospec['render'] = $old_render[$ii];
|
||||||
} else if ($ospec['htype'] === '\\') {
|
|
||||||
$ospec['render'] = $old[$ii]['text'];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -516,8 +514,6 @@ abstract class DifferentialChangesetRenderer extends Phobject {
|
|||||||
$nspec['htype'] = $new[$ii]['type'];
|
$nspec['htype'] = $new[$ii]['type'];
|
||||||
if (isset($new_render[$ii])) {
|
if (isset($new_render[$ii])) {
|
||||||
$nspec['render'] = $new_render[$ii];
|
$nspec['render'] = $new_render[$ii];
|
||||||
} else if ($nspec['htype'] === '\\') {
|
|
||||||
$nspec['render'] = $new[$ii]['text'];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -284,6 +284,16 @@ final class DifferentialDiff
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Blender: auto set git commit author from user if none provided.
|
||||||
|
// Use username instead of email, Phabricator will recognize this
|
||||||
|
// and we avoid sharing private information.
|
||||||
|
$user = id(new PhabricatorUser())
|
||||||
|
->loadOneWhere('phid = %s', $this->authorPHID);
|
||||||
|
if ($user) {
|
||||||
|
$dict['authorName'] = $user->getRealName();
|
||||||
|
$dict['authorEmail'] = $user->getUserName();
|
||||||
|
}
|
||||||
|
|
||||||
return $dict;
|
return $dict;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -737,10 +747,9 @@ final class DifferentialDiff
|
|||||||
$prop->delete();
|
$prop->delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
$viewstate_query = id(new DifferentialViewStateQuery())
|
$viewstates = id(new DifferentialViewStateQuery())
|
||||||
->setViewer($viewer)
|
->setViewer($viewer)
|
||||||
->withObjectPHIDs(array($this->getPHID()));
|
->withObjectPHIDs(array($this->getPHID()));
|
||||||
$viewstates = new PhabricatorQueryIterator($viewstate_query);
|
|
||||||
foreach ($viewstates as $viewstate) {
|
foreach ($viewstates as $viewstate) {
|
||||||
$viewstate->delete();
|
$viewstate->delete();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1033,10 +1033,9 @@ final class DifferentialRevision extends DifferentialDAO
|
|||||||
$dummy_path->getTableName(),
|
$dummy_path->getTableName(),
|
||||||
$this->getID());
|
$this->getID());
|
||||||
|
|
||||||
$viewstate_query = id(new DifferentialViewStateQuery())
|
$viewstates = id(new DifferentialViewStateQuery())
|
||||||
->setViewer($viewer)
|
->setViewer($viewer)
|
||||||
->withObjectPHIDs(array($this->getPHID()));
|
->withObjectPHIDs(array($this->getPHID()));
|
||||||
$viewstates = new PhabricatorQueryIterator($viewstate_query);
|
|
||||||
foreach ($viewstates as $viewstate) {
|
foreach ($viewstates as $viewstate) {
|
||||||
$viewstate->delete();
|
$viewstate->delete();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,15 +6,12 @@ final class DifferentialRevisionAbandonTransaction
|
|||||||
const TRANSACTIONTYPE = 'differential.revision.abandon';
|
const TRANSACTIONTYPE = 'differential.revision.abandon';
|
||||||
const ACTIONKEY = 'abandon';
|
const ACTIONKEY = 'abandon';
|
||||||
|
|
||||||
protected function getRevisionActionLabel(
|
protected function getRevisionActionLabel() {
|
||||||
DifferentialRevision $revision,
|
|
||||||
PhabricatorUser $viewer) {
|
|
||||||
return pht('Abandon Revision');
|
return pht('Abandon Revision');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getRevisionActionDescription(
|
protected function getRevisionActionDescription(
|
||||||
DifferentialRevision $revision,
|
DifferentialRevision $revision) {
|
||||||
PhabricatorUser $viewer) {
|
|
||||||
return pht('This revision will be abandoned and closed.');
|
return pht('This revision will be abandoned and closed.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,15 +6,12 @@ final class DifferentialRevisionAcceptTransaction
|
|||||||
const TRANSACTIONTYPE = 'differential.revision.accept';
|
const TRANSACTIONTYPE = 'differential.revision.accept';
|
||||||
const ACTIONKEY = 'accept';
|
const ACTIONKEY = 'accept';
|
||||||
|
|
||||||
protected function getRevisionActionLabel(
|
protected function getRevisionActionLabel() {
|
||||||
DifferentialRevision $revision,
|
|
||||||
PhabricatorUser $viewer) {
|
|
||||||
return pht('Accept Revision');
|
return pht('Accept Revision');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getRevisionActionDescription(
|
protected function getRevisionActionDescription(
|
||||||
DifferentialRevision $revision,
|
DifferentialRevision $revision) {
|
||||||
PhabricatorUser $viewer) {
|
|
||||||
return pht('These changes will be approved.');
|
return pht('These changes will be approved.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,9 +17,7 @@ abstract class DifferentialRevisionActionTransaction
|
|||||||
}
|
}
|
||||||
|
|
||||||
abstract protected function validateAction($object, PhabricatorUser $viewer);
|
abstract protected function validateAction($object, PhabricatorUser $viewer);
|
||||||
abstract protected function getRevisionActionLabel(
|
abstract protected function getRevisionActionLabel();
|
||||||
DifferentialRevision $revision,
|
|
||||||
PhabricatorUser $viewer);
|
|
||||||
|
|
||||||
protected function validateOptionValue($object, $actor, array $value) {
|
protected function validateOptionValue($object, $actor, array $value) {
|
||||||
return null;
|
return null;
|
||||||
@@ -55,23 +53,15 @@ abstract class DifferentialRevisionActionTransaction
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected function getRevisionActionDescription(
|
protected function getRevisionActionDescription(
|
||||||
DifferentialRevision $revision,
|
DifferentialRevision $revision) {
|
||||||
PhabricatorUser $viewer) {
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getRevisionActionSubmitButtonText(
|
protected function getRevisionActionSubmitButtonText(
|
||||||
DifferentialRevision $revision,
|
DifferentialRevision $revision) {
|
||||||
PhabricatorUser $viewer) {
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getRevisionActionMetadata(
|
|
||||||
DifferentialRevision $revision,
|
|
||||||
PhabricatorUser $viewer) {
|
|
||||||
return array();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function loadAllActions() {
|
public static function loadAllActions() {
|
||||||
return id(new PhutilClassMapQuery())
|
return id(new PhutilClassMapQuery())
|
||||||
->setAncestorClass(__CLASS__)
|
->setAncestorClass(__CLASS__)
|
||||||
@@ -115,19 +105,17 @@ abstract class DifferentialRevisionActionTransaction
|
|||||||
->setValue(true);
|
->setValue(true);
|
||||||
|
|
||||||
if ($this->isActionAvailable($revision, $viewer)) {
|
if ($this->isActionAvailable($revision, $viewer)) {
|
||||||
$label = $this->getRevisionActionLabel($revision, $viewer);
|
$label = $this->getRevisionActionLabel();
|
||||||
if ($label !== null) {
|
if ($label !== null) {
|
||||||
$field->setCommentActionLabel($label);
|
$field->setCommentActionLabel($label);
|
||||||
|
|
||||||
$description = $this->getRevisionActionDescription($revision, $viewer);
|
$description = $this->getRevisionActionDescription($revision);
|
||||||
$field->setActionDescription($description);
|
$field->setActionDescription($description);
|
||||||
|
|
||||||
$group_key = $this->getRevisionActionGroupKey();
|
$group_key = $this->getRevisionActionGroupKey();
|
||||||
$field->setCommentActionGroupKey($group_key);
|
$field->setCommentActionGroupKey($group_key);
|
||||||
|
|
||||||
$button_text = $this->getRevisionActionSubmitButtonText(
|
$button_text = $this->getRevisionActionSubmitButtonText($revision);
|
||||||
$revision,
|
|
||||||
$viewer);
|
|
||||||
$field->setActionSubmitButtonText($button_text);
|
$field->setActionSubmitButtonText($button_text);
|
||||||
|
|
||||||
// Currently, every revision action conflicts with every other
|
// Currently, every revision action conflicts with every other
|
||||||
@@ -156,11 +144,6 @@ abstract class DifferentialRevisionActionTransaction
|
|||||||
$field->setOptions($options);
|
$field->setOptions($options);
|
||||||
$field->setValue($value);
|
$field->setValue($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
$metadata = $this->getRevisionActionMetadata($revision, $viewer);
|
|
||||||
foreach ($metadata as $metadata_key => $metadata_value) {
|
|
||||||
$field->setMetadataValue($metadata_key, $metadata_value);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,15 +6,12 @@ final class DifferentialRevisionCloseTransaction
|
|||||||
const TRANSACTIONTYPE = 'differential.revision.close';
|
const TRANSACTIONTYPE = 'differential.revision.close';
|
||||||
const ACTIONKEY = 'close';
|
const ACTIONKEY = 'close';
|
||||||
|
|
||||||
protected function getRevisionActionLabel(
|
protected function getRevisionActionLabel() {
|
||||||
DifferentialRevision $revision,
|
|
||||||
PhabricatorUser $viewer) {
|
|
||||||
return pht('Close Revision');
|
return pht('Close Revision');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getRevisionActionDescription(
|
protected function getRevisionActionDescription(
|
||||||
DifferentialRevision $revision,
|
DifferentialRevision $revision) {
|
||||||
PhabricatorUser $viewer) {
|
|
||||||
return pht('This revision will be closed.');
|
return pht('This revision will be closed.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,15 +6,12 @@ final class DifferentialRevisionCommandeerTransaction
|
|||||||
const TRANSACTIONTYPE = 'differential.revision.commandeer';
|
const TRANSACTIONTYPE = 'differential.revision.commandeer';
|
||||||
const ACTIONKEY = 'commandeer';
|
const ACTIONKEY = 'commandeer';
|
||||||
|
|
||||||
protected function getRevisionActionLabel(
|
protected function getRevisionActionLabel() {
|
||||||
DifferentialRevision $revision,
|
|
||||||
PhabricatorUser $viewer) {
|
|
||||||
return pht('Commandeer Revision');
|
return pht('Commandeer Revision');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getRevisionActionDescription(
|
protected function getRevisionActionDescription(
|
||||||
DifferentialRevision $revision,
|
DifferentialRevision $revision) {
|
||||||
PhabricatorUser $viewer) {
|
|
||||||
return pht('You will take control of this revision and become its author.');
|
return pht('You will take control of this revision and become its author.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,15 +6,12 @@ final class DifferentialRevisionPlanChangesTransaction
|
|||||||
const TRANSACTIONTYPE = 'differential.revision.plan';
|
const TRANSACTIONTYPE = 'differential.revision.plan';
|
||||||
const ACTIONKEY = 'plan-changes';
|
const ACTIONKEY = 'plan-changes';
|
||||||
|
|
||||||
protected function getRevisionActionLabel(
|
protected function getRevisionActionLabel() {
|
||||||
DifferentialRevision $revision,
|
|
||||||
PhabricatorUser $viewer) {
|
|
||||||
return pht('Plan Changes');
|
return pht('Plan Changes');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getRevisionActionDescription(
|
protected function getRevisionActionDescription(
|
||||||
DifferentialRevision $revision,
|
DifferentialRevision $revision) {
|
||||||
PhabricatorUser $viewer) {
|
|
||||||
return pht(
|
return pht(
|
||||||
'This revision will be removed from review queues until it is revised.');
|
'This revision will be removed from review queues until it is revised.');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,15 +6,12 @@ final class DifferentialRevisionReclaimTransaction
|
|||||||
const TRANSACTIONTYPE = 'differential.revision.reclaim';
|
const TRANSACTIONTYPE = 'differential.revision.reclaim';
|
||||||
const ACTIONKEY = 'reclaim';
|
const ACTIONKEY = 'reclaim';
|
||||||
|
|
||||||
protected function getRevisionActionLabel(
|
protected function getRevisionActionLabel() {
|
||||||
DifferentialRevision $revision,
|
|
||||||
PhabricatorUser $viewer) {
|
|
||||||
return pht('Reclaim Revision');
|
return pht('Reclaim Revision');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getRevisionActionDescription(
|
protected function getRevisionActionDescription(
|
||||||
DifferentialRevision $revision,
|
DifferentialRevision $revision) {
|
||||||
PhabricatorUser $viewer) {
|
|
||||||
return pht('This revision will be reclaimed and reopened.');
|
return pht('This revision will be reclaimed and reopened.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,15 +6,12 @@ final class DifferentialRevisionRejectTransaction
|
|||||||
const TRANSACTIONTYPE = 'differential.revision.reject';
|
const TRANSACTIONTYPE = 'differential.revision.reject';
|
||||||
const ACTIONKEY = 'reject';
|
const ACTIONKEY = 'reject';
|
||||||
|
|
||||||
protected function getRevisionActionLabel(
|
protected function getRevisionActionLabel() {
|
||||||
DifferentialRevision $revision,
|
|
||||||
PhabricatorUser $viewer) {
|
|
||||||
return pht('Request Changes');
|
return pht('Request Changes');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getRevisionActionDescription(
|
protected function getRevisionActionDescription(
|
||||||
DifferentialRevision $revision,
|
DifferentialRevision $revision) {
|
||||||
PhabricatorUser $viewer) {
|
|
||||||
return pht('This revision will be returned to the author for updates.');
|
return pht('This revision will be returned to the author for updates.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,15 +6,12 @@ final class DifferentialRevisionReopenTransaction
|
|||||||
const TRANSACTIONTYPE = 'differential.revision.reopen';
|
const TRANSACTIONTYPE = 'differential.revision.reopen';
|
||||||
const ACTIONKEY = 'reopen';
|
const ACTIONKEY = 'reopen';
|
||||||
|
|
||||||
protected function getRevisionActionLabel(
|
protected function getRevisionActionLabel() {
|
||||||
DifferentialRevision $revision,
|
|
||||||
PhabricatorUser $viewer) {
|
|
||||||
return pht('Reopen Revision');
|
return pht('Reopen Revision');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getRevisionActionDescription(
|
protected function getRevisionActionDescription(
|
||||||
DifferentialRevision $revision,
|
DifferentialRevision $revision) {
|
||||||
PhabricatorUser $viewer) {
|
|
||||||
return pht('This revision will be reopened for review.');
|
return pht('This revision will be reopened for review.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -84,8 +84,7 @@ final class DifferentialRevisionRepositoryTransaction
|
|||||||
$errors[] = $this->newInvalidError(
|
$errors[] = $this->newInvalidError(
|
||||||
pht(
|
pht(
|
||||||
'Repository "%s" is not a valid repository, or you do not have '.
|
'Repository "%s" is not a valid repository, or you do not have '.
|
||||||
'permission to view it.',
|
'permission to view it.'),
|
||||||
$new_value),
|
|
||||||
$xaction);
|
$xaction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,63 +6,21 @@ final class DifferentialRevisionRequestReviewTransaction
|
|||||||
const TRANSACTIONTYPE = 'differential.revision.request';
|
const TRANSACTIONTYPE = 'differential.revision.request';
|
||||||
const ACTIONKEY = 'request-review';
|
const ACTIONKEY = 'request-review';
|
||||||
|
|
||||||
const SOURCE_HARBORMASTER = 'harbormaster';
|
protected function getRevisionActionLabel() {
|
||||||
const SOURCE_AUTHOR = 'author';
|
|
||||||
const SOURCE_VIEWER = 'viewer';
|
|
||||||
|
|
||||||
protected function getRevisionActionLabel(
|
|
||||||
DifferentialRevision $revision,
|
|
||||||
PhabricatorUser $viewer) {
|
|
||||||
|
|
||||||
// See PHI1810. Allow non-authors to "Request Review" on draft revisions
|
|
||||||
// to promote them out of the draft state. This smoothes over the workflow
|
|
||||||
// where an author asks for review of an urgent change but has not used
|
|
||||||
// "Request Review" to skip builds.
|
|
||||||
|
|
||||||
if ($revision->isDraft()) {
|
|
||||||
if (!$this->isViewerRevisionAuthor($revision, $viewer)) {
|
|
||||||
return pht('Begin Review Now');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return pht('Request Review');
|
return pht('Request Review');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getRevisionActionDescription(
|
protected function getRevisionActionDescription(
|
||||||
DifferentialRevision $revision,
|
DifferentialRevision $revision) {
|
||||||
PhabricatorUser $viewer) {
|
|
||||||
if ($revision->isDraft()) {
|
if ($revision->isDraft()) {
|
||||||
if (!$this->isViewerRevisionAuthor($revision, $viewer)) {
|
return pht('This revision will be submitted to reviewers for feedback.');
|
||||||
return pht(
|
|
||||||
'This revision will be moved out of the draft state so you can '.
|
|
||||||
'review it immediately.');
|
|
||||||
} else {
|
|
||||||
return pht(
|
|
||||||
'This revision will be submitted to reviewers for feedback.');
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
return pht('This revision will be returned to reviewers for feedback.');
|
return pht('This revision will be returned to reviewers for feedback.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getRevisionActionMetadata(
|
|
||||||
DifferentialRevision $revision,
|
|
||||||
PhabricatorUser $viewer) {
|
|
||||||
$map = array();
|
|
||||||
|
|
||||||
if ($revision->isDraft()) {
|
|
||||||
$action_source = $this->getActorSourceType(
|
|
||||||
$revision,
|
|
||||||
$viewer);
|
|
||||||
$map['promotion.source'] = $action_source;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $map;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function getRevisionActionSubmitButtonText(
|
protected function getRevisionActionSubmitButtonText(
|
||||||
DifferentialRevision $revision,
|
DifferentialRevision $revision) {
|
||||||
PhabricatorUser $viewer) {
|
|
||||||
|
|
||||||
// See PHI975. When the action stack will promote the revision out of
|
// See PHI975. When the action stack will promote the revision out of
|
||||||
// draft, change the button text from "Submit Quietly".
|
// draft, change the button text from "Submit Quietly".
|
||||||
@@ -114,43 +72,29 @@ final class DifferentialRevisionRequestReviewTransaction
|
|||||||
'revisions.'));
|
'revisions.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->getActorSourceType($object, $viewer);
|
// When revisions automatically promote out of "Draft" after builds finish,
|
||||||
|
// the viewer may be acting as the Harbormaster application.
|
||||||
|
if (!$viewer->isOmnipotent()) {
|
||||||
|
if (!$this->isViewerRevisionAuthor($object, $viewer)) {
|
||||||
|
throw new Exception(
|
||||||
|
pht(
|
||||||
|
'You can not request review of this revision because you are not '.
|
||||||
|
'the author of the revision.'));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle() {
|
public function getTitle() {
|
||||||
$source = $this->getDraftPromotionSource();
|
return pht(
|
||||||
|
'%s requested review of this revision.',
|
||||||
switch ($source) {
|
$this->renderAuthor());
|
||||||
case self::SOURCE_HARBORMASTER:
|
|
||||||
case self::SOURCE_VIEWER:
|
|
||||||
case self::SOURCE_AUTHOR:
|
|
||||||
return pht(
|
|
||||||
'%s published this revision for review.',
|
|
||||||
$this->renderAuthor());
|
|
||||||
default:
|
|
||||||
return pht(
|
|
||||||
'%s requested review of this revision.',
|
|
||||||
$this->renderAuthor());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitleForFeed() {
|
public function getTitleForFeed() {
|
||||||
$source = $this->getDraftPromotionSource();
|
return pht(
|
||||||
|
'%s requested review of %s.',
|
||||||
switch ($source) {
|
$this->renderAuthor(),
|
||||||
case self::SOURCE_HARBORMASTER:
|
$this->renderObject());
|
||||||
case self::SOURCE_VIEWER:
|
|
||||||
case self::SOURCE_AUTHOR:
|
|
||||||
return pht(
|
|
||||||
'%s published %s for review.',
|
|
||||||
$this->renderAuthor(),
|
|
||||||
$this->renderObject());
|
|
||||||
default:
|
|
||||||
return pht(
|
|
||||||
'%s requested review of %s.',
|
|
||||||
$this->renderAuthor(),
|
|
||||||
$this->renderObject());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTransactionTypeForConduit($xaction) {
|
public function getTransactionTypeForConduit($xaction) {
|
||||||
@@ -161,36 +105,4 @@ final class DifferentialRevisionRequestReviewTransaction
|
|||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getDraftPromotionSource() {
|
|
||||||
return $this->getMetadataValue('promotion.source');
|
|
||||||
}
|
|
||||||
|
|
||||||
private function getActorSourceType(
|
|
||||||
DifferentialRevision $revision,
|
|
||||||
PhabricatorUser $viewer) {
|
|
||||||
|
|
||||||
$is_harbormaster = $viewer->isOmnipotent();
|
|
||||||
$is_author = $this->isViewerRevisionAuthor($revision, $viewer);
|
|
||||||
$is_draft = $revision->isDraft();
|
|
||||||
|
|
||||||
if ($is_harbormaster) {
|
|
||||||
// When revisions automatically promote out of "Draft" after builds
|
|
||||||
// finish, the viewer may be acting as the Harbormaster application.
|
|
||||||
$source = self::SOURCE_HARBORMASTER;
|
|
||||||
} else if ($is_author) {
|
|
||||||
$source = self::SOURCE_AUTHOR;
|
|
||||||
} else if ($is_draft) {
|
|
||||||
// Non-authors are allowed to "Request Review" on draft revisions, to
|
|
||||||
// force them into review immediately.
|
|
||||||
$source = self::SOURCE_VIEWER;
|
|
||||||
} else {
|
|
||||||
throw new Exception(
|
|
||||||
pht(
|
|
||||||
'You can not request review of this revision because you are not '.
|
|
||||||
'the author of the revision and it is not currently a draft.'));
|
|
||||||
}
|
|
||||||
|
|
||||||
return $source;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,15 +6,12 @@ final class DifferentialRevisionResignTransaction
|
|||||||
const TRANSACTIONTYPE = 'differential.revision.resign';
|
const TRANSACTIONTYPE = 'differential.revision.resign';
|
||||||
const ACTIONKEY = 'resign';
|
const ACTIONKEY = 'resign';
|
||||||
|
|
||||||
protected function getRevisionActionLabel(
|
protected function getRevisionActionLabel() {
|
||||||
DifferentialRevision $revision,
|
|
||||||
PhabricatorUser $viewer) {
|
|
||||||
return pht('Resign as Reviewer');
|
return pht('Resign as Reviewer');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getRevisionActionDescription(
|
protected function getRevisionActionDescription(
|
||||||
DifferentialRevision $revision,
|
DifferentialRevision $revision) {
|
||||||
PhabricatorUser $viewer) {
|
|
||||||
return pht('You will resign as a reviewer for this change.');
|
return pht('You will resign as a reviewer for this change.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ final class PhabricatorDiffusionApplication extends PhabricatorApplication {
|
|||||||
'change/(?P<dblob>.*)' => 'DiffusionChangeController',
|
'change/(?P<dblob>.*)' => 'DiffusionChangeController',
|
||||||
'clone/' => 'DiffusionCloneController',
|
'clone/' => 'DiffusionCloneController',
|
||||||
'history/(?P<dblob>.*)' => 'DiffusionHistoryController',
|
'history/(?P<dblob>.*)' => 'DiffusionHistoryController',
|
||||||
|
'graph/(?P<dblob>.*)' => 'DiffusionGraphController',
|
||||||
'browse/(?P<dblob>.*)' => 'DiffusionBrowseController',
|
'browse/(?P<dblob>.*)' => 'DiffusionBrowseController',
|
||||||
'document/(?P<dblob>.*)'
|
'document/(?P<dblob>.*)'
|
||||||
=> 'DiffusionDocumentController',
|
=> 'DiffusionDocumentController',
|
||||||
|
|||||||
@@ -1,58 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
final class DiffusionInternalCommitSearchConduitAPIMethod
|
|
||||||
extends PhabricatorSearchEngineAPIMethod {
|
|
||||||
|
|
||||||
public function getAPIMethodName() {
|
|
||||||
return 'internal.commit.search';
|
|
||||||
}
|
|
||||||
|
|
||||||
public function newSearchEngine() {
|
|
||||||
return new DiffusionInternalCommitSearchEngine();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getMethodSummary() {
|
|
||||||
return pht('Read raw information about commits.');
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function newConduitCallProxyClient(ConduitAPIRequest $request) {
|
|
||||||
$viewer = $request->getViewer();
|
|
||||||
|
|
||||||
$constraints = $request->getValue('constraints');
|
|
||||||
if (is_array($constraints)) {
|
|
||||||
$repository_phids = idx($constraints, 'repositoryPHIDs');
|
|
||||||
} else {
|
|
||||||
$repository_phids = array();
|
|
||||||
}
|
|
||||||
|
|
||||||
$repository_phid = null;
|
|
||||||
if (is_array($repository_phids)) {
|
|
||||||
if (phutil_is_natural_list($repository_phids)) {
|
|
||||||
if (count($repository_phids) === 1) {
|
|
||||||
$value = head($repository_phids);
|
|
||||||
if (is_string($value)) {
|
|
||||||
$repository_phid = $value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($repository_phid === null) {
|
|
||||||
throw new Exception(
|
|
||||||
pht(
|
|
||||||
'This internal method must be invoked with a "repositoryPHIDs" '.
|
|
||||||
'constraint with exactly one value.'));
|
|
||||||
}
|
|
||||||
|
|
||||||
$repository = id(new PhabricatorRepositoryQuery())
|
|
||||||
->setViewer($viewer)
|
|
||||||
->withPHIDs(array($repository_phid))
|
|
||||||
->executeOne();
|
|
||||||
if (!$repository) {
|
|
||||||
return array();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $repository->newConduitClientForRequest($request);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -38,6 +38,7 @@ final class DiffusionQueryCommitsConduitAPIMethod
|
|||||||
|
|
||||||
protected function execute(ConduitAPIRequest $request) {
|
protected function execute(ConduitAPIRequest $request) {
|
||||||
$need_messages = $request->getValue('needMessages');
|
$need_messages = $request->getValue('needMessages');
|
||||||
|
$bypass_cache = $request->getValue('bypassCache');
|
||||||
$viewer = $request->getUser();
|
$viewer = $request->getUser();
|
||||||
|
|
||||||
$query = id(new DiffusionCommitQuery())
|
$query = id(new DiffusionCommitQuery())
|
||||||
@@ -52,6 +53,12 @@ final class DiffusionQueryCommitsConduitAPIMethod
|
|||||||
->executeOne();
|
->executeOne();
|
||||||
if ($repository) {
|
if ($repository) {
|
||||||
$query->withRepository($repository);
|
$query->withRepository($repository);
|
||||||
|
if ($bypass_cache) {
|
||||||
|
id(new DiffusionRepositoryClusterEngine())
|
||||||
|
->setViewer($viewer)
|
||||||
|
->setRepository($repository)
|
||||||
|
->synchronizeWorkingCopyBeforeRead();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,22 +96,48 @@ final class DiffusionQueryCommitsConduitAPIMethod
|
|||||||
'repositoryPHID' => $commit->getRepository()->getPHID(),
|
'repositoryPHID' => $commit->getRepository()->getPHID(),
|
||||||
'identifier' => $commit->getCommitIdentifier(),
|
'identifier' => $commit->getCommitIdentifier(),
|
||||||
'epoch' => $commit->getEpoch(),
|
'epoch' => $commit->getEpoch(),
|
||||||
'authorEpoch' => $commit_data->getAuthorEpoch(),
|
'authorEpoch' => $commit_data->getCommitDetail('authorEpoch'),
|
||||||
'uri' => $uri,
|
'uri' => $uri,
|
||||||
'isImporting' => !$commit->isImported(),
|
'isImporting' => !$commit->isImported(),
|
||||||
'summary' => $commit->getSummary(),
|
'summary' => $commit->getSummary(),
|
||||||
'authorPHID' => $commit->getAuthorPHID(),
|
'authorPHID' => $commit->getAuthorPHID(),
|
||||||
'committerPHID' => $commit_data->getCommitDetail('committerPHID'),
|
'committerPHID' => $commit_data->getCommitDetail('committerPHID'),
|
||||||
'author' => $commit_data->getAuthorString(),
|
'author' => $commit_data->getAuthorName(),
|
||||||
'authorName' => $commit_data->getAuthorDisplayName(),
|
'authorName' => $commit_data->getCommitDetail('authorName'),
|
||||||
'authorEmail' => $commit_data->getAuthorEmail(),
|
'authorEmail' => $commit_data->getCommitDetail('authorEmail'),
|
||||||
'committer' => $commit_data->getCommitterString(),
|
'committer' => $commit_data->getCommitDetail('committer'),
|
||||||
'committerName' => $commit_data->getCommitterDisplayName(),
|
'committerName' => $commit_data->getCommitDetail('committerName'),
|
||||||
'committerEmail' => $commit_data->getCommitterEmail(),
|
'committerEmail' => $commit_data->getCommitDetail('committerEmail'),
|
||||||
'hashes' => array(),
|
'hashes' => array(),
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($need_messages) {
|
if ($bypass_cache) {
|
||||||
|
$lowlevel_commitref = id(new DiffusionLowLevelCommitQuery())
|
||||||
|
->setRepository($commit->getRepository())
|
||||||
|
->withIdentifier($commit->getCommitIdentifier())
|
||||||
|
->execute();
|
||||||
|
|
||||||
|
$dict['authorEpoch'] = $lowlevel_commitref->getAuthorEpoch();
|
||||||
|
$dict['author'] = $lowlevel_commitref->getAuthor();
|
||||||
|
$dict['authorName'] = $lowlevel_commitref->getAuthorName();
|
||||||
|
$dict['authorEmail'] = $lowlevel_commitref->getAuthorEmail();
|
||||||
|
$dict['committer'] = $lowlevel_commitref->getCommitter();
|
||||||
|
$dict['committerName'] = $lowlevel_commitref->getCommitterName();
|
||||||
|
$dict['committerEmail'] = $lowlevel_commitref->getCommitterEmail();
|
||||||
|
|
||||||
|
if ($need_messages) {
|
||||||
|
$dict['message'] = $lowlevel_commitref->getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($lowlevel_commitref->getHashes() as $hash) {
|
||||||
|
$dict['hashes'][] = array(
|
||||||
|
'type' => $hash->getHashType(),
|
||||||
|
'value' => $hash->getHashValue(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($need_messages && !$bypass_cache) {
|
||||||
$dict['message'] = $commit_data->getCommitMessage();
|
$dict['message'] = $commit_data->getCommitMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -85,35 +85,6 @@ abstract class DiffusionQueryConduitAPIMethod
|
|||||||
* should occur after @{method:getResult}, like formatting a timestamp.
|
* should occur after @{method:getResult}, like formatting a timestamp.
|
||||||
*/
|
*/
|
||||||
final protected function execute(ConduitAPIRequest $request) {
|
final protected function execute(ConduitAPIRequest $request) {
|
||||||
$drequest = $this->getDiffusionRequest();
|
|
||||||
|
|
||||||
// We pass this flag on to prevent proxying of any other Conduit calls
|
|
||||||
// which we need to make in order to respond to this one. Although we
|
|
||||||
// could safely proxy them, we take a big performance hit in the common
|
|
||||||
// case, and doing more proxying wouldn't exercise any additional code so
|
|
||||||
// we wouldn't gain a testability/predictability benefit.
|
|
||||||
$is_cluster_request = $request->getIsClusterRequest();
|
|
||||||
$drequest->setIsClusterRequest($is_cluster_request);
|
|
||||||
|
|
||||||
$viewer = $request->getViewer();
|
|
||||||
$repository = $drequest->getRepository();
|
|
||||||
|
|
||||||
// TODO: Allow web UI queries opt out of this if they don't care about
|
|
||||||
// fetching the most up-to-date data? Synchronization can be slow, and a
|
|
||||||
// lot of web reads are probably fine if they're a few seconds out of
|
|
||||||
// date.
|
|
||||||
id(new DiffusionRepositoryClusterEngine())
|
|
||||||
->setViewer($viewer)
|
|
||||||
->setRepository($repository)
|
|
||||||
->synchronizeWorkingCopyBeforeRead();
|
|
||||||
|
|
||||||
return $this->getResult($request);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
protected function newConduitCallProxyClient(ConduitAPIRequest $request) {
|
|
||||||
$viewer = $request->getViewer();
|
|
||||||
|
|
||||||
$identifier = $request->getValue('repository');
|
$identifier = $request->getValue('repository');
|
||||||
if ($identifier === null) {
|
if ($identifier === null) {
|
||||||
$identifier = $request->getValue('callsign');
|
$identifier = $request->getValue('callsign');
|
||||||
@@ -121,7 +92,7 @@ abstract class DiffusionQueryConduitAPIMethod
|
|||||||
|
|
||||||
$drequest = DiffusionRequest::newFromDictionary(
|
$drequest = DiffusionRequest::newFromDictionary(
|
||||||
array(
|
array(
|
||||||
'user' => $viewer,
|
'user' => $request->getUser(),
|
||||||
'repository' => $identifier,
|
'repository' => $identifier,
|
||||||
'branch' => $request->getValue('branch'),
|
'branch' => $request->getValue('branch'),
|
||||||
'path' => $request->getValue('path'),
|
'path' => $request->getValue('path'),
|
||||||
@@ -135,16 +106,46 @@ abstract class DiffusionQueryConduitAPIMethod
|
|||||||
$identifier));
|
$identifier));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Figure out whether we're going to handle this request on this device,
|
||||||
|
// or proxy it to another node in the cluster.
|
||||||
|
|
||||||
|
// If this is a cluster request and we need to proxy, we'll explode here
|
||||||
|
// to prevent infinite recursion.
|
||||||
|
|
||||||
|
$is_cluster_request = $request->getIsClusterRequest();
|
||||||
|
$viewer = $request->getUser();
|
||||||
|
|
||||||
$repository = $drequest->getRepository();
|
$repository = $drequest->getRepository();
|
||||||
|
$client = $repository->newConduitClient(
|
||||||
$client = $repository->newConduitClientForRequest($request);
|
$viewer,
|
||||||
|
$is_cluster_request);
|
||||||
if ($client) {
|
if ($client) {
|
||||||
return $client;
|
// We're proxying, so just make an intracluster call.
|
||||||
|
return $client->callMethodSynchronous(
|
||||||
|
$this->getAPIMethodName(),
|
||||||
|
$request->getAllParameters());
|
||||||
|
} else {
|
||||||
|
|
||||||
|
// We pass this flag on to prevent proxying of any other Conduit calls
|
||||||
|
// which we need to make in order to respond to this one. Although we
|
||||||
|
// could safely proxy them, we take a big performance hit in the common
|
||||||
|
// case, and doing more proxying wouldn't exercise any additional code so
|
||||||
|
// we wouldn't gain a testability/predictability benefit.
|
||||||
|
$drequest->setIsClusterRequest($is_cluster_request);
|
||||||
|
|
||||||
|
$this->setDiffusionRequest($drequest);
|
||||||
|
|
||||||
|
// TODO: Allow web UI queries opt out of this if they don't care about
|
||||||
|
// fetching the most up-to-date data? Synchronization can be slow, and a
|
||||||
|
// lot of web reads are probably fine if they're a few seconds out of
|
||||||
|
// date.
|
||||||
|
id(new DiffusionRepositoryClusterEngine())
|
||||||
|
->setViewer($viewer)
|
||||||
|
->setRepository($repository)
|
||||||
|
->synchronizeWorkingCopyBeforeRead();
|
||||||
|
|
||||||
|
return $this->getResult($request);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->setDiffusionRequest($drequest);
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getResult(ConduitAPIRequest $request) {
|
protected function getResult(ConduitAPIRequest $request) {
|
||||||
|
|||||||
@@ -292,6 +292,7 @@ final class DiffusionBrowseController extends DiffusionController {
|
|||||||
|
|
||||||
$empty_result = null;
|
$empty_result = null;
|
||||||
$browse_panel = null;
|
$browse_panel = null;
|
||||||
|
$branch_panel = null;
|
||||||
if (!$results->isValidResults()) {
|
if (!$results->isValidResults()) {
|
||||||
$empty_result = new DiffusionEmptyResultView();
|
$empty_result = new DiffusionEmptyResultView();
|
||||||
$empty_result->setDiffusionRequest($drequest);
|
$empty_result->setDiffusionRequest($drequest);
|
||||||
@@ -327,6 +328,12 @@ final class DiffusionBrowseController extends DiffusionController {
|
|||||||
->setTable($browse_table)
|
->setTable($browse_table)
|
||||||
->addClass('diffusion-mobile-view')
|
->addClass('diffusion-mobile-view')
|
||||||
->setPager($pager);
|
->setPager($pager);
|
||||||
|
|
||||||
|
$path = $drequest->getPath();
|
||||||
|
$is_branch = (!strlen($path) && $repository->supportsBranchComparison());
|
||||||
|
if ($is_branch) {
|
||||||
|
$branch_panel = $this->buildBranchTable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$open_revisions = $this->buildOpenRevisions();
|
$open_revisions = $this->buildOpenRevisions();
|
||||||
@@ -352,6 +359,7 @@ final class DiffusionBrowseController extends DiffusionController {
|
|||||||
->setFooter(
|
->setFooter(
|
||||||
array(
|
array(
|
||||||
$bar,
|
$bar,
|
||||||
|
$branch_panel,
|
||||||
$empty_result,
|
$empty_result,
|
||||||
$browse_panel,
|
$browse_panel,
|
||||||
$open_revisions,
|
$open_revisions,
|
||||||
@@ -1066,4 +1074,59 @@ final class DiffusionBrowseController extends DiffusionController {
|
|||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function buildBranchTable() {
|
||||||
|
$viewer = $this->getViewer();
|
||||||
|
$drequest = $this->getDiffusionRequest();
|
||||||
|
$repository = $drequest->getRepository();
|
||||||
|
|
||||||
|
$branch = $drequest->getBranch();
|
||||||
|
$default_branch = $repository->getDefaultBranch();
|
||||||
|
|
||||||
|
if ($branch === $default_branch) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$pager = id(new PHUIPagerView())
|
||||||
|
->setPageSize(10);
|
||||||
|
|
||||||
|
try {
|
||||||
|
$results = $this->callConduitWithDiffusionRequest(
|
||||||
|
'diffusion.historyquery',
|
||||||
|
array(
|
||||||
|
'commit' => $branch,
|
||||||
|
'against' => $default_branch,
|
||||||
|
'path' => $drequest->getPath(),
|
||||||
|
'offset' => $pager->getOffset(),
|
||||||
|
'limit' => $pager->getPageSize() + 1,
|
||||||
|
));
|
||||||
|
} catch (Exception $ex) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$history = DiffusionPathChange::newFromConduit($results['pathChanges']);
|
||||||
|
$history = $pager->sliceResults($history);
|
||||||
|
|
||||||
|
if (!$history) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$history_table = id(new DiffusionHistoryTableView())
|
||||||
|
->setViewer($viewer)
|
||||||
|
->setDiffusionRequest($drequest)
|
||||||
|
->setHistory($history)
|
||||||
|
->setParents($results['parents'])
|
||||||
|
->setFilterParents(true)
|
||||||
|
->setIsHead(true)
|
||||||
|
->setIsTail(!$pager->getHasMorePages());
|
||||||
|
|
||||||
|
$header = id(new PHUIHeaderView())
|
||||||
|
->setHeader(pht('%s vs %s', $branch, $default_branch));
|
||||||
|
|
||||||
|
return id(new PHUIObjectBoxView())
|
||||||
|
->setHeader($header)
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
|
->addClass('diffusion-mobile-view')
|
||||||
|
->setTable($history_table);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,9 +90,10 @@ final class DiffusionCommitController extends DiffusionController {
|
|||||||
->setSeverity(PHUIInfoView::SEVERITY_WARNING)
|
->setSeverity(PHUIInfoView::SEVERITY_WARNING)
|
||||||
->appendChild($warning_message);
|
->appendChild($warning_message);
|
||||||
|
|
||||||
$list = id(new DiffusionCommitGraphView())
|
$list = id(new DiffusionCommitListView())
|
||||||
->setViewer($viewer)
|
->setViewer($viewer)
|
||||||
->setCommits($commits);
|
->setCommits($commits)
|
||||||
|
->setNoDataString(pht('No recent commits.'));
|
||||||
|
|
||||||
$crumbs->addTextCrumb(pht('Ambiguous Commit'));
|
$crumbs->addTextCrumb(pht('Ambiguous Commit'));
|
||||||
|
|
||||||
@@ -182,6 +183,7 @@ final class DiffusionCommitController extends DiffusionController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$curtain = $this->buildCurtain($commit, $repository);
|
$curtain = $this->buildCurtain($commit, $repository);
|
||||||
|
$subheader = $this->buildSubheaderView($commit, $commit_data);
|
||||||
$details = $this->buildPropertyListView(
|
$details = $this->buildPropertyListView(
|
||||||
$commit,
|
$commit,
|
||||||
$commit_data,
|
$commit_data,
|
||||||
@@ -481,6 +483,7 @@ final class DiffusionCommitController extends DiffusionController {
|
|||||||
|
|
||||||
$view = id(new PHUITwoColumnView())
|
$view = id(new PHUITwoColumnView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
|
->setSubheader($subheader)
|
||||||
->setCurtain($curtain)
|
->setCurtain($curtain)
|
||||||
->setMainColumn(
|
->setMainColumn(
|
||||||
array(
|
array(
|
||||||
@@ -622,49 +625,32 @@ final class DiffusionCommitController extends DiffusionController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$provenance_list = new PHUIStatusListView();
|
$author_epoch = $data->getCommitDetail('authorEpoch');
|
||||||
|
|
||||||
$author_view = $commit->newCommitAuthorView($viewer);
|
$committed_info = id(new PHUIStatusItemView())
|
||||||
if ($author_view) {
|
->setNote(phabricator_datetime($commit->getEpoch(), $viewer))
|
||||||
$author_date = $data->getAuthorEpoch();
|
->setTarget($commit->renderAnyCommitter($viewer, $handles));
|
||||||
$author_date = phabricator_datetime($author_date, $viewer);
|
|
||||||
|
|
||||||
$provenance_list->addItem(
|
$committed_list = new PHUIStatusListView();
|
||||||
id(new PHUIStatusItemView())
|
$committed_list->addItem($committed_info);
|
||||||
->setTarget($author_view)
|
$view->addProperty(
|
||||||
->setNote(pht('Authored on %s', $author_date)));
|
pht('Committed'),
|
||||||
}
|
$committed_list);
|
||||||
|
|
||||||
if (!$commit->isAuthorSameAsCommitter()) {
|
|
||||||
$committer_view = $commit->newCommitCommitterView($viewer);
|
|
||||||
if ($committer_view) {
|
|
||||||
$committer_date = $commit->getEpoch();
|
|
||||||
$committer_date = phabricator_datetime($committer_date, $viewer);
|
|
||||||
|
|
||||||
$provenance_list->addItem(
|
|
||||||
id(new PHUIStatusItemView())
|
|
||||||
->setTarget($committer_view)
|
|
||||||
->setNote(pht('Committed on %s', $committer_date)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($push_logs) {
|
if ($push_logs) {
|
||||||
$pushed_list = new PHUIStatusListView();
|
$pushed_list = new PHUIStatusListView();
|
||||||
|
|
||||||
foreach ($push_logs as $push_log) {
|
foreach ($push_logs as $push_log) {
|
||||||
$pusher_date = $push_log->getEpoch();
|
$pushed_item = id(new PHUIStatusItemView())
|
||||||
$pusher_date = phabricator_datetime($pusher_date, $viewer);
|
->setTarget($handles[$push_log->getPusherPHID()]->renderLink())
|
||||||
|
->setNote(phabricator_datetime($push_log->getEpoch(), $viewer));
|
||||||
$pusher_view = $handles[$push_log->getPusherPHID()]->renderLink();
|
$pushed_list->addItem($pushed_item);
|
||||||
|
|
||||||
$provenance_list->addItem(
|
|
||||||
id(new PHUIStatusItemView())
|
|
||||||
->setTarget($pusher_view)
|
|
||||||
->setNote(pht('Pushed on %s', $pusher_date)));
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$view->addProperty(pht('Provenance'), $provenance_list);
|
$view->addProperty(
|
||||||
|
pht('Pushed'),
|
||||||
|
$pushed_list);
|
||||||
|
}
|
||||||
|
|
||||||
$reviewer_phid = $data->getCommitDetail('reviewerPHID');
|
$reviewer_phid = $data->getCommitDetail('reviewerPHID');
|
||||||
if ($reviewer_phid) {
|
if ($reviewer_phid) {
|
||||||
@@ -757,6 +743,52 @@ final class DiffusionCommitController extends DiffusionController {
|
|||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function buildSubheaderView(
|
||||||
|
PhabricatorRepositoryCommit $commit,
|
||||||
|
PhabricatorRepositoryCommitData $data) {
|
||||||
|
|
||||||
|
$viewer = $this->getViewer();
|
||||||
|
$drequest = $this->getDiffusionRequest();
|
||||||
|
$repository = $drequest->getRepository();
|
||||||
|
|
||||||
|
if ($repository->isSVN()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$author_phid = $commit->getAuthorDisplayPHID();
|
||||||
|
$author_name = $data->getAuthorName();
|
||||||
|
$author_epoch = $data->getCommitDetail('authorEpoch');
|
||||||
|
$date = null;
|
||||||
|
if ($author_epoch !== null) {
|
||||||
|
$date = phabricator_datetime($author_epoch, $viewer);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($author_phid) {
|
||||||
|
$handles = $viewer->loadHandles(array($author_phid));
|
||||||
|
$image_uri = $handles[$author_phid]->getImageURI();
|
||||||
|
$image_href = $handles[$author_phid]->getURI();
|
||||||
|
$author = $handles[$author_phid]->renderLink();
|
||||||
|
} else if (strlen($author_name)) {
|
||||||
|
$author = $author_name;
|
||||||
|
$image_uri = null;
|
||||||
|
$image_href = null;
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$author = phutil_tag('strong', array(), $author);
|
||||||
|
if ($date) {
|
||||||
|
$content = pht('Authored by %s on %s.', $author, $date);
|
||||||
|
} else {
|
||||||
|
$content = pht('Authored by %s.', $author);
|
||||||
|
}
|
||||||
|
|
||||||
|
return id(new PHUIHeadThingView())
|
||||||
|
->setImage($image_uri)
|
||||||
|
->setImageHref($image_href)
|
||||||
|
->setContent($content);
|
||||||
|
}
|
||||||
|
|
||||||
private function buildComments(PhabricatorRepositoryCommit $commit) {
|
private function buildComments(PhabricatorRepositoryCommit $commit) {
|
||||||
$timeline = $this->buildTransactionTimeline(
|
$timeline = $this->buildTransactionTimeline(
|
||||||
$commit,
|
$commit,
|
||||||
@@ -811,15 +843,15 @@ final class DiffusionCommitController extends DiffusionController {
|
|||||||
new PhutilNumber($limit)));
|
new PhutilNumber($limit)));
|
||||||
}
|
}
|
||||||
|
|
||||||
$commit_list = id(new DiffusionCommitGraphView())
|
$history_table = id(new DiffusionHistoryTableView())
|
||||||
->setViewer($viewer)
|
->setUser($viewer)
|
||||||
->setDiffusionRequest($drequest)
|
->setDiffusionRequest($drequest)
|
||||||
->setHistory($merges);
|
->setHistory($merges);
|
||||||
|
|
||||||
$panel = id(new PHUIObjectBoxView())
|
$panel = id(new PHUIObjectBoxView())
|
||||||
->setHeaderText(pht('Merged Changes'))
|
->setHeaderText(pht('Merged Changes'))
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->setObjectList($commit_list->newObjectItemListView());
|
->setTable($history_table);
|
||||||
if ($caption) {
|
if ($caption) {
|
||||||
$panel->setInfoView($caption);
|
$panel->setInfoView($caption);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -285,6 +285,7 @@ final class DiffusionCompareController extends DiffusionController {
|
|||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
$viewer = $this->getViewer();
|
$viewer = $this->getViewer();
|
||||||
$drequest = $this->getDiffusionRequest();
|
$drequest = $this->getDiffusionRequest();
|
||||||
|
$repository = $drequest->getRepository();
|
||||||
|
|
||||||
if (!$history) {
|
if (!$history) {
|
||||||
return $this->renderStatusMessage(
|
return $this->renderStatusMessage(
|
||||||
@@ -295,8 +296,8 @@ final class DiffusionCompareController extends DiffusionController {
|
|||||||
phutil_tag('strong', array(), $against_ref)));
|
phutil_tag('strong', array(), $against_ref)));
|
||||||
}
|
}
|
||||||
|
|
||||||
$history_view = id(new DiffusionCommitGraphView())
|
$history_table = id(new DiffusionHistoryTableView())
|
||||||
->setViewer($viewer)
|
->setUser($viewer)
|
||||||
->setDiffusionRequest($drequest)
|
->setDiffusionRequest($drequest)
|
||||||
->setHistory($history)
|
->setHistory($history)
|
||||||
->setParents($results['parents'])
|
->setParents($results['parents'])
|
||||||
@@ -304,6 +305,15 @@ final class DiffusionCompareController extends DiffusionController {
|
|||||||
->setIsHead(!$pager->getOffset())
|
->setIsHead(!$pager->getOffset())
|
||||||
->setIsTail(!$pager->getHasMorePages());
|
->setIsTail(!$pager->getHasMorePages());
|
||||||
|
|
||||||
return $history_view;
|
$header = id(new PHUIHeaderView())
|
||||||
|
->setHeader(pht('Commits'));
|
||||||
|
|
||||||
|
return id(new PHUIObjectBoxView())
|
||||||
|
->setHeader($header)
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
|
->setTable($history_table)
|
||||||
|
->addClass('diffusion-mobile-view')
|
||||||
|
->setPager($pager);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -210,6 +210,9 @@ abstract class DiffusionController extends PhabricatorController {
|
|||||||
case 'history':
|
case 'history':
|
||||||
$view_name = pht('History');
|
$view_name = pht('History');
|
||||||
break;
|
break;
|
||||||
|
case 'graph':
|
||||||
|
$view_name = pht('Graph');
|
||||||
|
break;
|
||||||
case 'browse':
|
case 'browse':
|
||||||
$view_name = pht('Browse');
|
$view_name = pht('Browse');
|
||||||
break;
|
break;
|
||||||
@@ -550,6 +553,17 @@ abstract class DiffusionController extends PhabricatorController {
|
|||||||
)))
|
)))
|
||||||
->setSelected($key == 'history'));
|
->setSelected($key == 'history'));
|
||||||
|
|
||||||
|
$view->addMenuItem(
|
||||||
|
id(new PHUIListItemView())
|
||||||
|
->setKey('graph')
|
||||||
|
->setName(pht('Graph'))
|
||||||
|
->setIcon('fa-code-fork')
|
||||||
|
->setHref($drequest->generateURI(
|
||||||
|
array(
|
||||||
|
'action' => 'graph',
|
||||||
|
)))
|
||||||
|
->setSelected($key == 'graph'));
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,110 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
final class DiffusionGraphController extends DiffusionController {
|
||||||
|
|
||||||
|
public function shouldAllowPublic() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function handleRequest(AphrontRequest $request) {
|
||||||
|
$response = $this->loadDiffusionContext();
|
||||||
|
if ($response) {
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
|
require_celerity_resource('diffusion-css');
|
||||||
|
|
||||||
|
$viewer = $this->getViewer();
|
||||||
|
$drequest = $this->getDiffusionRequest();
|
||||||
|
$repository = $drequest->getRepository();
|
||||||
|
|
||||||
|
$pager = id(new PHUIPagerView())
|
||||||
|
->readFromRequest($request);
|
||||||
|
|
||||||
|
$params = array(
|
||||||
|
'commit' => $drequest->getCommit(),
|
||||||
|
'path' => $drequest->getPath(),
|
||||||
|
'offset' => $pager->getOffset(),
|
||||||
|
'limit' => $pager->getPageSize() + 1,
|
||||||
|
);
|
||||||
|
|
||||||
|
$history_results = $this->callConduitWithDiffusionRequest(
|
||||||
|
'diffusion.historyquery',
|
||||||
|
$params);
|
||||||
|
$history = DiffusionPathChange::newFromConduit(
|
||||||
|
$history_results['pathChanges']);
|
||||||
|
|
||||||
|
$history = $pager->sliceResults($history);
|
||||||
|
|
||||||
|
$graph = id(new DiffusionHistoryTableView())
|
||||||
|
->setViewer($viewer)
|
||||||
|
->setDiffusionRequest($drequest)
|
||||||
|
->setHistory($history);
|
||||||
|
|
||||||
|
$show_graph = !strlen($drequest->getPath());
|
||||||
|
if ($show_graph) {
|
||||||
|
$graph->setParents($history_results['parents']);
|
||||||
|
$graph->setIsHead(!$pager->getOffset());
|
||||||
|
$graph->setIsTail(!$pager->getHasMorePages());
|
||||||
|
}
|
||||||
|
|
||||||
|
$header = $this->buildHeader($drequest);
|
||||||
|
|
||||||
|
$crumbs = $this->buildCrumbs(
|
||||||
|
array(
|
||||||
|
'branch' => true,
|
||||||
|
'path' => true,
|
||||||
|
'view' => 'graph',
|
||||||
|
));
|
||||||
|
$crumbs->setBorder(true);
|
||||||
|
|
||||||
|
$title = array(
|
||||||
|
pht('Graph'),
|
||||||
|
$repository->getDisplayName(),
|
||||||
|
);
|
||||||
|
|
||||||
|
$graph_view = id(new PHUIObjectBoxView())
|
||||||
|
->setHeaderText(pht('History Graph'))
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
|
->setTable($graph)
|
||||||
|
->addClass('diffusion-mobile-view')
|
||||||
|
->setPager($pager);
|
||||||
|
|
||||||
|
$tabs = $this->buildTabsView('graph');
|
||||||
|
|
||||||
|
$view = id(new PHUITwoColumnView())
|
||||||
|
->setHeader($header)
|
||||||
|
->setTabs($tabs)
|
||||||
|
->setFooter($graph_view);
|
||||||
|
|
||||||
|
return $this->newPage()
|
||||||
|
->setTitle($title)
|
||||||
|
->setCrumbs($crumbs)
|
||||||
|
->appendChild($view);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function buildHeader(DiffusionRequest $drequest) {
|
||||||
|
$viewer = $this->getViewer();
|
||||||
|
$repository = $drequest->getRepository();
|
||||||
|
|
||||||
|
$no_path = !strlen($drequest->getPath());
|
||||||
|
if ($no_path) {
|
||||||
|
$header_text = pht('Graph');
|
||||||
|
} else {
|
||||||
|
$header_text = $this->renderPathLinks($drequest, $mode = 'history');
|
||||||
|
}
|
||||||
|
|
||||||
|
$header = id(new PHUIHeaderView())
|
||||||
|
->setUser($viewer)
|
||||||
|
->setHeader($header_text)
|
||||||
|
->setHeaderIcon('fa-code-fork');
|
||||||
|
|
||||||
|
if (!$repository->isSVN()) {
|
||||||
|
$branch_tag = $this->renderBranchTag($drequest);
|
||||||
|
$header->addTag($branch_tag);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $header;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -35,29 +35,11 @@ final class DiffusionHistoryController extends DiffusionController {
|
|||||||
|
|
||||||
$history = $pager->sliceResults($history);
|
$history = $pager->sliceResults($history);
|
||||||
|
|
||||||
$history_list = id(new DiffusionCommitGraphView())
|
$history_list = id(new DiffusionHistoryListView())
|
||||||
->setViewer($viewer)
|
->setViewer($viewer)
|
||||||
->setDiffusionRequest($drequest)
|
->setDiffusionRequest($drequest)
|
||||||
->setHistory($history);
|
->setHistory($history);
|
||||||
|
|
||||||
// NOTE: If we have a path (like "src/"), many nodes in the graph are
|
|
||||||
// likely to be missing (since the path wasn't touched by those commits).
|
|
||||||
|
|
||||||
// If we draw the graph, commits will often appear to be unrelated because
|
|
||||||
// intermediate nodes are omitted. Just drop the graph.
|
|
||||||
|
|
||||||
// The ideal behavior would be to load the entire graph and then connect
|
|
||||||
// ancestors appropriately, but this would currrently be prohibitively
|
|
||||||
// expensive in the general case.
|
|
||||||
|
|
||||||
$show_graph = !strlen($drequest->getPath());
|
|
||||||
if ($show_graph) {
|
|
||||||
$history_list
|
|
||||||
->setParents($history_results['parents'])
|
|
||||||
->setIsHead(!$pager->getOffset())
|
|
||||||
->setIsTail(!$pager->getHasMorePages());
|
|
||||||
}
|
|
||||||
|
|
||||||
$header = $this->buildHeader($drequest);
|
$header = $this->buildHeader($drequest);
|
||||||
|
|
||||||
$crumbs = $this->buildCrumbs(
|
$crumbs = $this->buildCrumbs(
|
||||||
|
|||||||
@@ -53,6 +53,14 @@ final class DiffusionLastModifiedController extends DiffusionController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$phids = array();
|
||||||
|
foreach ($commits as $commit) {
|
||||||
|
$phids[] = $commit->getCommitterDisplayPHID();
|
||||||
|
$phids[] = $commit->getAuthorDisplayPHID();
|
||||||
|
}
|
||||||
|
$phids = array_filter($phids);
|
||||||
|
$handles = $this->loadViewerHandles($phids);
|
||||||
|
|
||||||
$branch = $drequest->loadBranch();
|
$branch = $drequest->loadBranch();
|
||||||
if ($branch && $commits) {
|
if ($branch && $commits) {
|
||||||
$lint_query = id(new DiffusionLintCountQuery())
|
$lint_query = id(new DiffusionLintCountQuery())
|
||||||
@@ -75,6 +83,7 @@ final class DiffusionLastModifiedController extends DiffusionController {
|
|||||||
|
|
||||||
$output[$path] = $this->renderColumns(
|
$output[$path] = $this->renderColumns(
|
||||||
$prequest,
|
$prequest,
|
||||||
|
$handles,
|
||||||
$commit,
|
$commit,
|
||||||
idx($lint, $path));
|
idx($lint, $path));
|
||||||
}
|
}
|
||||||
@@ -84,9 +93,11 @@ final class DiffusionLastModifiedController extends DiffusionController {
|
|||||||
|
|
||||||
private function renderColumns(
|
private function renderColumns(
|
||||||
DiffusionRequest $drequest,
|
DiffusionRequest $drequest,
|
||||||
|
array $handles,
|
||||||
PhabricatorRepositoryCommit $commit = null,
|
PhabricatorRepositoryCommit $commit = null,
|
||||||
$lint = null) {
|
$lint = null) {
|
||||||
$viewer = $this->getViewer();
|
assert_instances_of($handles, 'PhabricatorObjectHandle');
|
||||||
|
$viewer = $this->getRequest()->getUser();
|
||||||
|
|
||||||
if ($commit) {
|
if ($commit) {
|
||||||
$epoch = $commit->getEpoch();
|
$epoch = $commit->getEpoch();
|
||||||
@@ -99,6 +110,13 @@ final class DiffusionLastModifiedController extends DiffusionController {
|
|||||||
$date = '';
|
$date = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$author = $commit->renderAuthor($viewer, $handles);
|
||||||
|
$committer = $commit->renderCommitter($viewer, $handles);
|
||||||
|
|
||||||
|
if ($author != $committer) {
|
||||||
|
$author = hsprintf('%s/%s', $author, $committer);
|
||||||
|
}
|
||||||
|
|
||||||
$data = $commit->getCommitData();
|
$data = $commit->getCommitData();
|
||||||
$details = DiffusionView::linkDetail(
|
$details = DiffusionView::linkDetail(
|
||||||
$drequest->getRepository(),
|
$drequest->getRepository(),
|
||||||
@@ -106,9 +124,11 @@ final class DiffusionLastModifiedController extends DiffusionController {
|
|||||||
$data->getSummary());
|
$data->getSummary());
|
||||||
$details = AphrontTableView::renderSingleDisplayLine($details);
|
$details = AphrontTableView::renderSingleDisplayLine($details);
|
||||||
|
|
||||||
|
|
||||||
$return = array(
|
$return = array(
|
||||||
'commit' => $modified,
|
'commit' => $modified,
|
||||||
'date' => $date,
|
'date' => $date,
|
||||||
|
'author' => $author,
|
||||||
'details' => $details,
|
'details' => $details,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -299,10 +299,16 @@ final class DiffusionRepositoryController extends DiffusionController {
|
|||||||
$handles,
|
$handles,
|
||||||
$browse_pager);
|
$browse_pager);
|
||||||
|
|
||||||
|
$content[] = $this->buildHistoryTable(
|
||||||
|
$history_results,
|
||||||
|
$history,
|
||||||
|
$history_exception);
|
||||||
|
|
||||||
if ($readme) {
|
if ($readme) {
|
||||||
$content[] = $readme;
|
$content[] = $readme;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$branch_button = $this->buildBranchList($drequest);
|
$branch_button = $this->buildBranchList($drequest);
|
||||||
$this->branchButton = $branch_button;
|
$this->branchButton = $branch_button;
|
||||||
@@ -422,6 +428,51 @@ final class DiffusionRepositoryController extends DiffusionController {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function buildHistoryTable(
|
||||||
|
$history_results,
|
||||||
|
$history,
|
||||||
|
$history_exception) {
|
||||||
|
|
||||||
|
$request = $this->getRequest();
|
||||||
|
$viewer = $request->getUser();
|
||||||
|
$drequest = $this->getDiffusionRequest();
|
||||||
|
$repository = $drequest->getRepository();
|
||||||
|
|
||||||
|
if ($history_exception) {
|
||||||
|
if ($repository->isImporting()) {
|
||||||
|
return $this->renderStatusMessage(
|
||||||
|
pht('Still Importing...'),
|
||||||
|
pht(
|
||||||
|
'This repository is still importing. History is not yet '.
|
||||||
|
'available.'));
|
||||||
|
} else {
|
||||||
|
return $this->renderStatusMessage(
|
||||||
|
pht('Unable to Retrieve History'),
|
||||||
|
$history_exception->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$history_table = id(new DiffusionHistoryTableView())
|
||||||
|
->setUser($viewer)
|
||||||
|
->setDiffusionRequest($drequest)
|
||||||
|
->setHistory($history)
|
||||||
|
->setIsHead(true);
|
||||||
|
|
||||||
|
if ($history_results) {
|
||||||
|
$history_table->setParents($history_results['parents']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$panel = id(new PHUIObjectBoxView())
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
|
->addClass('diffusion-mobile-view');
|
||||||
|
$header = id(new PHUIHeaderView())
|
||||||
|
->setHeader(pht('Recent Commits'));
|
||||||
|
$panel->setHeader($header);
|
||||||
|
$panel->setTable($history_table);
|
||||||
|
|
||||||
|
return $panel;
|
||||||
|
}
|
||||||
|
|
||||||
private function buildBranchList(DiffusionRequest $drequest) {
|
private function buildBranchList(DiffusionRequest $drequest) {
|
||||||
$viewer = $this->getViewer();
|
$viewer = $this->getViewer();
|
||||||
|
|
||||||
|
|||||||
@@ -922,26 +922,18 @@ final class DiffusionServeController extends DiffusionController {
|
|||||||
// This is a pretty funky fix: it would be nice to more precisely detect
|
// This is a pretty funky fix: it would be nice to more precisely detect
|
||||||
// that a request is a `--depth N` clone request, but we don't have any code
|
// that a request is a `--depth N` clone request, but we don't have any code
|
||||||
// to decode protocol frames yet. Instead, look for reasonable evidence
|
// to decode protocol frames yet. Instead, look for reasonable evidence
|
||||||
// in the output that we're looking at a `--depth` clone.
|
// in the error and output that we're looking at a `--depth` clone.
|
||||||
|
|
||||||
// A valid x-git-upload-pack-result response during packfile negotiation
|
// For evidence this isn't completely crazy, see:
|
||||||
// should end with a flush packet ("0000"). As long as that packet
|
// https://github.com/schacon/grack/pull/7
|
||||||
// terminates the response body in the response, we'll assume the response
|
|
||||||
// is correct and complete.
|
|
||||||
|
|
||||||
// See https://git-scm.com/docs/pack-protocol#_packfile_negotiation
|
|
||||||
|
|
||||||
$stdout_regexp = '(^Content-Type: application/x-git-upload-pack-result)m';
|
$stdout_regexp = '(^Content-Type: application/x-git-upload-pack-result)m';
|
||||||
|
$stderr_regexp = '(The remote end hung up unexpectedly)';
|
||||||
|
|
||||||
$has_pack = preg_match($stdout_regexp, $stdout);
|
$has_pack = preg_match($stdout_regexp, $stdout);
|
||||||
|
$is_hangup = preg_match($stderr_regexp, $stderr);
|
||||||
|
|
||||||
if (strlen($stdout) >= 4) {
|
return $has_pack && $is_hangup;
|
||||||
$has_flush_packet = (substr($stdout, -4) === "0000");
|
|
||||||
} else {
|
|
||||||
$has_flush_packet = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ($has_pack && $has_flush_packet);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getCommonEnvironment(PhabricatorUser $viewer) {
|
private function getCommonEnvironment(PhabricatorUser $viewer) {
|
||||||
|
|||||||
@@ -34,21 +34,4 @@ final class DiffusionCommitHash extends Phobject {
|
|||||||
}
|
}
|
||||||
return $hash_objects;
|
return $hash_objects;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function newFromDictionary(array $map) {
|
|
||||||
$hash_type = idx($map, 'type');
|
|
||||||
$hash_value = idx($map, 'value');
|
|
||||||
|
|
||||||
return id(new self())
|
|
||||||
->setHashType($hash_type)
|
|
||||||
->setHashValue($hash_value);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function newDictionary() {
|
|
||||||
return array(
|
|
||||||
'type' => $this->hashType,
|
|
||||||
'value' => $this->hashValue,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,48 +10,28 @@ final class DiffusionCommitRef extends Phobject {
|
|||||||
private $committerEmail;
|
private $committerEmail;
|
||||||
private $hashes = array();
|
private $hashes = array();
|
||||||
|
|
||||||
public function newDictionary() {
|
public static function newFromConduitResult(array $result) {
|
||||||
$hashes = $this->getHashes();
|
$ref = id(new DiffusionCommitRef())
|
||||||
$hashes = mpull($hashes, 'newDictionary');
|
->setAuthorEpoch(idx($result, 'authorEpoch'))
|
||||||
$hashes = array_values($hashes);
|
->setCommitterEmail(idx($result, 'committerEmail'))
|
||||||
|
->setCommitterName(idx($result, 'committerName'))
|
||||||
|
->setAuthorEmail(idx($result, 'authorEmail'))
|
||||||
|
->setAuthorName(idx($result, 'authorName'))
|
||||||
|
->setMessage(idx($result, 'message'));
|
||||||
|
|
||||||
return array(
|
$hashes = array();
|
||||||
'authorEpoch' => $this->authorEpoch,
|
foreach (idx($result, 'hashes', array()) as $hash_result) {
|
||||||
'authorName' => $this->authorName,
|
$hashes[] = id(new DiffusionCommitHash())
|
||||||
'authorEmail' => $this->authorEmail,
|
->setHashType(idx($hash_result, 'type'))
|
||||||
'committerName' => $this->committerName,
|
->setHashValue(idx($hash_result, 'value'));
|
||||||
'committerEmail' => $this->committerEmail,
|
|
||||||
'message' => $this->message,
|
|
||||||
'hashes' => $hashes,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function newFromDictionary(array $map) {
|
|
||||||
$hashes = idx($map, 'hashes', array());
|
|
||||||
foreach ($hashes as $key => $hash_map) {
|
|
||||||
$hashes[$key] = DiffusionCommitHash::newFromDictionary($hash_map);
|
|
||||||
}
|
}
|
||||||
$hashes = array_values($hashes);
|
|
||||||
|
|
||||||
$author_epoch = idx($map, 'authorEpoch');
|
$ref->setHashes($hashes);
|
||||||
$author_name = idx($map, 'authorName');
|
|
||||||
$author_email = idx($map, 'authorEmail');
|
|
||||||
$committer_name = idx($map, 'committerName');
|
|
||||||
$committer_email = idx($map, 'committerEmail');
|
|
||||||
$message = idx($map, 'message');
|
|
||||||
|
|
||||||
return id(new self())
|
return $ref;
|
||||||
->setAuthorEpoch($author_epoch)
|
|
||||||
->setAuthorName($author_name)
|
|
||||||
->setAuthorEmail($author_email)
|
|
||||||
->setCommitterName($committer_name)
|
|
||||||
->setCommitterEmail($committer_email)
|
|
||||||
->setMessage($message)
|
|
||||||
->setHashes($hashes);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setHashes(array $hashes) {
|
public function setHashes(array $hashes) {
|
||||||
assert_instances_of($hashes, 'DiffusionCommitHash');
|
|
||||||
$this->hashes = $hashes;
|
$this->hashes = $hashes;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ final class DiffusionPathChange extends Phobject {
|
|||||||
|
|
||||||
public function getAuthorName() {
|
public function getAuthorName() {
|
||||||
if ($this->getCommitData()) {
|
if ($this->getCommitData()) {
|
||||||
return $this->getCommitData()->getAuthorString();
|
return $this->getCommitData()->getAuthorName();
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,9 +106,7 @@ final class DiffusionRepositoryPoliciesManagementPanel
|
|||||||
pht('Editable By'),
|
pht('Editable By'),
|
||||||
$descriptions[PhabricatorPolicyCapability::CAN_EDIT]);
|
$descriptions[PhabricatorPolicyCapability::CAN_EDIT]);
|
||||||
|
|
||||||
$pushable = $repository->isHosted()
|
$pushable = $descriptions[DiffusionPushCapability::CAPABILITY];
|
||||||
? $descriptions[DiffusionPushCapability::CAPABILITY]
|
|
||||||
: phutil_tag('em', array(), pht('Not a Hosted Repository'));
|
|
||||||
$view->addProperty(pht('Pushable By'), $pushable);
|
$view->addProperty(pht('Pushable By'), $pushable);
|
||||||
|
|
||||||
return $this->newBox(pht('Policies'), $view);
|
return $this->newBox(pht('Policies'), $view);
|
||||||
|
|||||||
@@ -68,15 +68,10 @@ final class DiffusionMercurialCommandEngine
|
|||||||
// http://selenic.com/pipermail/mercurial-devel/2011-February/028541.html
|
// http://selenic.com/pipermail/mercurial-devel/2011-February/028541.html
|
||||||
//
|
//
|
||||||
// After Jan 2015, it may also fail to write to a revision branch cache.
|
// After Jan 2015, it may also fail to write to a revision branch cache.
|
||||||
//
|
|
||||||
// Separately, it may fail to write to a different branch cache, and may
|
|
||||||
// encounter issues reading the branch cache.
|
|
||||||
|
|
||||||
$ignore = array(
|
$ignore = array(
|
||||||
'ignoring untrusted configuration option',
|
'ignoring untrusted configuration option',
|
||||||
"couldn't write revision branch cache:",
|
"couldn't write revision branch cache:",
|
||||||
"couldn't write branch cache:",
|
|
||||||
'invalid branchheads cache',
|
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach ($ignore as $key => $pattern) {
|
foreach ($ignore as $key => $pattern) {
|
||||||
|
|||||||
@@ -73,11 +73,17 @@ abstract class DiffusionQuery extends PhabricatorQuery {
|
|||||||
|
|
||||||
$params = $params + $core_params;
|
$params = $params + $core_params;
|
||||||
|
|
||||||
$future = $repository->newConduitFuture(
|
$client = $repository->newConduitClient(
|
||||||
$user,
|
$user,
|
||||||
$method,
|
|
||||||
$params,
|
|
||||||
$drequest->getIsClusterRequest());
|
$drequest->getIsClusterRequest());
|
||||||
|
if (!$client) {
|
||||||
|
$result = id(new ConduitCall($method, $params))
|
||||||
|
->setUser($user)
|
||||||
|
->execute();
|
||||||
|
$future = new ImmediateFuture($result);
|
||||||
|
} else {
|
||||||
|
$future = $client->callMethod($method, $params);
|
||||||
|
}
|
||||||
|
|
||||||
if (!$return_future) {
|
if (!$return_future) {
|
||||||
return $future->resolve();
|
return $future->resolve();
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ final class DiffusionBrowseTableView extends DiffusionView {
|
|||||||
$dict = array(
|
$dict = array(
|
||||||
'lint' => celerity_generate_unique_node_id(),
|
'lint' => celerity_generate_unique_node_id(),
|
||||||
'date' => celerity_generate_unique_node_id(),
|
'date' => celerity_generate_unique_node_id(),
|
||||||
|
'author' => celerity_generate_unique_node_id(),
|
||||||
'details' => celerity_generate_unique_node_id(),
|
'details' => celerity_generate_unique_node_id(),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,642 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
final class DiffusionCommitGraphView
|
|
||||||
extends DiffusionView {
|
|
||||||
|
|
||||||
private $history;
|
|
||||||
private $commits;
|
|
||||||
private $isHead;
|
|
||||||
private $isTail;
|
|
||||||
private $parents;
|
|
||||||
private $filterParents;
|
|
||||||
|
|
||||||
private $commitMap;
|
|
||||||
private $buildableMap;
|
|
||||||
private $revisionMap;
|
|
||||||
|
|
||||||
private $showAuditors;
|
|
||||||
|
|
||||||
public function setHistory(array $history) {
|
|
||||||
assert_instances_of($history, 'DiffusionPathChange');
|
|
||||||
$this->history = $history;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getHistory() {
|
|
||||||
return $this->history;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setCommits(array $commits) {
|
|
||||||
assert_instances_of($commits, 'PhabricatorRepositoryCommit');
|
|
||||||
$this->commits = $commits;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getCommits() {
|
|
||||||
return $this->commits;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setShowAuditors($show_auditors) {
|
|
||||||
$this->showAuditors = $show_auditors;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getShowAuditors() {
|
|
||||||
return $this->showAuditors;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setParents(array $parents) {
|
|
||||||
$this->parents = $parents;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getParents() {
|
|
||||||
return $this->parents;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setIsHead($is_head) {
|
|
||||||
$this->isHead = $is_head;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getIsHead() {
|
|
||||||
return $this->isHead;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setIsTail($is_tail) {
|
|
||||||
$this->isTail = $is_tail;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getIsTail() {
|
|
||||||
return $this->isTail;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setFilterParents($filter_parents) {
|
|
||||||
$this->filterParents = $filter_parents;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getFilterParents() {
|
|
||||||
return $this->filterParents;
|
|
||||||
}
|
|
||||||
|
|
||||||
private function getRepository() {
|
|
||||||
$drequest = $this->getDiffusionRequest();
|
|
||||||
|
|
||||||
if (!$drequest) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $drequest->getRepository();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function newObjectItemListView() {
|
|
||||||
$list_view = id(new PHUIObjectItemListView());
|
|
||||||
|
|
||||||
$item_views = $this->newObjectItemViews();
|
|
||||||
foreach ($item_views as $item_view) {
|
|
||||||
$list_view->addItem($item_view);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $list_view;
|
|
||||||
}
|
|
||||||
|
|
||||||
private function newObjectItemViews() {
|
|
||||||
$viewer = $this->getViewer();
|
|
||||||
|
|
||||||
require_celerity_resource('diffusion-css');
|
|
||||||
|
|
||||||
$show_builds = $this->shouldShowBuilds();
|
|
||||||
$show_revisions = $this->shouldShowRevisions();
|
|
||||||
$show_auditors = $this->shouldShowAuditors();
|
|
||||||
|
|
||||||
$phids = array();
|
|
||||||
|
|
||||||
if ($show_revisions) {
|
|
||||||
$revision_map = $this->getRevisionMap();
|
|
||||||
foreach ($revision_map as $revisions) {
|
|
||||||
foreach ($revisions as $revision) {
|
|
||||||
$phids[] = $revision->getPHID();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$commits = $this->getCommitMap();
|
|
||||||
|
|
||||||
foreach ($commits as $commit) {
|
|
||||||
$author_phid = $commit->getAuthorDisplayPHID();
|
|
||||||
if ($author_phid !== null) {
|
|
||||||
$phids[] = $author_phid;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($show_auditors) {
|
|
||||||
foreach ($commits as $commit) {
|
|
||||||
$audits = $commit->getAudits();
|
|
||||||
foreach ($audits as $auditor) {
|
|
||||||
$phids[] = $auditor->getAuditorPHID();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$handles = $viewer->loadHandles($phids);
|
|
||||||
|
|
||||||
$views = array();
|
|
||||||
|
|
||||||
$items = $this->newHistoryItems();
|
|
||||||
foreach ($items as $hash => $item) {
|
|
||||||
$content = array();
|
|
||||||
|
|
||||||
$commit = $item['commit'];
|
|
||||||
|
|
||||||
$commit_description = $this->getCommitDescription($commit);
|
|
||||||
$commit_link = $this->getCommitURI($hash);
|
|
||||||
|
|
||||||
$short_hash = $this->getCommitObjectName($hash);
|
|
||||||
$is_disabled = $this->getCommitIsDisabled($commit);
|
|
||||||
|
|
||||||
$item_view = id(new PHUIObjectItemView())
|
|
||||||
->setViewer($viewer)
|
|
||||||
->setHeader($commit_description)
|
|
||||||
->setObjectName($short_hash)
|
|
||||||
->setHref($commit_link)
|
|
||||||
->setDisabled($is_disabled);
|
|
||||||
|
|
||||||
$this->addBrowseAction($item_view, $hash);
|
|
||||||
|
|
||||||
if ($show_builds) {
|
|
||||||
$this->addBuildAction($item_view, $hash);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->addAuditAction($item_view, $hash);
|
|
||||||
|
|
||||||
if ($show_auditors) {
|
|
||||||
$auditor_list = $item_view->newMapView();
|
|
||||||
if ($commit) {
|
|
||||||
$auditors = $this->newAuditorList($commit, $handles);
|
|
||||||
$auditor_list->newItem()
|
|
||||||
->setName(pht('Auditors'))
|
|
||||||
->setValue($auditors);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$property_list = $item_view->newMapView();
|
|
||||||
|
|
||||||
if ($commit) {
|
|
||||||
$author_view = $this->getCommitAuthorView($commit);
|
|
||||||
if ($author_view) {
|
|
||||||
$property_list->newItem()
|
|
||||||
->setName(pht('Author'))
|
|
||||||
->setValue($author_view);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($show_revisions) {
|
|
||||||
if ($commit) {
|
|
||||||
$revisions = $this->getRevisions($commit);
|
|
||||||
if ($revisions) {
|
|
||||||
$list_view = $handles->newSublist(mpull($revisions, 'getPHID'))
|
|
||||||
->newListView();
|
|
||||||
|
|
||||||
$property_list->newItem()
|
|
||||||
->setName(pht('Revisions'))
|
|
||||||
->setValue($list_view);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$views[$hash] = $item_view;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $views;
|
|
||||||
}
|
|
||||||
|
|
||||||
private function newObjectItemRows() {
|
|
||||||
$viewer = $this->getViewer();
|
|
||||||
|
|
||||||
$items = $this->newHistoryItems();
|
|
||||||
$views = $this->newObjectItemViews();
|
|
||||||
|
|
||||||
$last_date = null;
|
|
||||||
$rows = array();
|
|
||||||
foreach ($items as $hash => $item) {
|
|
||||||
$item_epoch = $item['epoch'];
|
|
||||||
$item_date = phabricator_date($item_epoch, $viewer);
|
|
||||||
if ($item_date !== $last_date) {
|
|
||||||
$last_date = $item_date;
|
|
||||||
$header = $item_date;
|
|
||||||
} else {
|
|
||||||
$header = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$item_view = $views[$hash];
|
|
||||||
|
|
||||||
$list_view = id(new PHUIObjectItemListView())
|
|
||||||
->setViewer($viewer)
|
|
||||||
->setFlush(true)
|
|
||||||
->addItem($item_view);
|
|
||||||
|
|
||||||
if ($header !== null) {
|
|
||||||
$list_view->setHeader($header);
|
|
||||||
}
|
|
||||||
|
|
||||||
$rows[] = $list_view;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $rows;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function render() {
|
|
||||||
$rows = $this->newObjectItemRows();
|
|
||||||
|
|
||||||
$graph = $this->newGraphView();
|
|
||||||
foreach ($rows as $idx => $row) {
|
|
||||||
$cells = array();
|
|
||||||
|
|
||||||
if ($graph) {
|
|
||||||
$cells[] = phutil_tag(
|
|
||||||
'td',
|
|
||||||
array(
|
|
||||||
'class' => 'diffusion-commit-graph-path-cell',
|
|
||||||
),
|
|
||||||
$graph[$idx]);
|
|
||||||
}
|
|
||||||
|
|
||||||
$cells[] = phutil_tag(
|
|
||||||
'td',
|
|
||||||
array(
|
|
||||||
'class' => 'diffusion-commit-graph-content-cell',
|
|
||||||
),
|
|
||||||
$row);
|
|
||||||
|
|
||||||
$rows[$idx] = phutil_tag('tr', array(), $cells);
|
|
||||||
}
|
|
||||||
|
|
||||||
$table = phutil_tag(
|
|
||||||
'table',
|
|
||||||
array(
|
|
||||||
'class' => 'diffusion-commit-graph-table',
|
|
||||||
),
|
|
||||||
$rows);
|
|
||||||
|
|
||||||
return $table;
|
|
||||||
}
|
|
||||||
|
|
||||||
private function newGraphView() {
|
|
||||||
if (!$this->getParents()) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$parents = $this->getParents();
|
|
||||||
|
|
||||||
// If we're filtering parents, remove relationships which point to
|
|
||||||
// commits that are not part of the visible graph. Otherwise, we get
|
|
||||||
// a big tree of nonsense when viewing release branches like "stable"
|
|
||||||
// versus "master".
|
|
||||||
if ($this->getFilterParents()) {
|
|
||||||
foreach ($parents as $key => $nodes) {
|
|
||||||
foreach ($nodes as $nkey => $node) {
|
|
||||||
if (empty($parents[$node])) {
|
|
||||||
unset($parents[$key][$nkey]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return id(new PHUIDiffGraphView())
|
|
||||||
->setIsHead($this->getIsHead())
|
|
||||||
->setIsTail($this->getIsTail())
|
|
||||||
->renderGraph($parents);
|
|
||||||
}
|
|
||||||
|
|
||||||
private function shouldShowBuilds() {
|
|
||||||
$viewer = $this->getViewer();
|
|
||||||
|
|
||||||
$show_builds = PhabricatorApplication::isClassInstalledForViewer(
|
|
||||||
'PhabricatorHarbormasterApplication',
|
|
||||||
$this->getUser());
|
|
||||||
|
|
||||||
return $show_builds;
|
|
||||||
}
|
|
||||||
|
|
||||||
private function shouldShowRevisions() {
|
|
||||||
$viewer = $this->getViewer();
|
|
||||||
|
|
||||||
$show_revisions = PhabricatorApplication::isClassInstalledForViewer(
|
|
||||||
'PhabricatorDifferentialApplication',
|
|
||||||
$viewer);
|
|
||||||
|
|
||||||
return $show_revisions;
|
|
||||||
}
|
|
||||||
|
|
||||||
private function shouldShowAuditors() {
|
|
||||||
return $this->getShowAuditors();
|
|
||||||
}
|
|
||||||
|
|
||||||
private function newHistoryItems() {
|
|
||||||
$items = array();
|
|
||||||
|
|
||||||
$history = $this->getHistory();
|
|
||||||
if ($history !== null) {
|
|
||||||
foreach ($history as $history_item) {
|
|
||||||
$commit_hash = $history_item->getCommitIdentifier();
|
|
||||||
|
|
||||||
$items[$commit_hash] = array(
|
|
||||||
'epoch' => $history_item->getEpoch(),
|
|
||||||
'hash' => $commit_hash,
|
|
||||||
'commit' => $this->getCommit($commit_hash),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$commits = $this->getCommitMap();
|
|
||||||
foreach ($commits as $commit) {
|
|
||||||
$commit_hash = $commit->getCommitIdentifier();
|
|
||||||
|
|
||||||
$items[$commit_hash] = array(
|
|
||||||
'epoch' => $commit->getEpoch(),
|
|
||||||
'hash' => $commit_hash,
|
|
||||||
'commit' => $commit,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $items;
|
|
||||||
}
|
|
||||||
|
|
||||||
private function getCommitDescription($commit) {
|
|
||||||
if (!$commit) {
|
|
||||||
return phutil_tag('em', array(), pht("Discovering\xE2\x80\xA6"));
|
|
||||||
}
|
|
||||||
|
|
||||||
// We can show details once the message and change have been imported.
|
|
||||||
$partial_import = PhabricatorRepositoryCommit::IMPORTED_MESSAGE |
|
|
||||||
PhabricatorRepositoryCommit::IMPORTED_CHANGE;
|
|
||||||
if (!$commit->isPartiallyImported($partial_import)) {
|
|
||||||
return phutil_tag('em', array(), pht("Importing\xE2\x80\xA6"));
|
|
||||||
}
|
|
||||||
|
|
||||||
return $commit->getCommitData()->getSummary();
|
|
||||||
}
|
|
||||||
|
|
||||||
private function getCommitURI($hash) {
|
|
||||||
$repository = $this->getRepository();
|
|
||||||
|
|
||||||
if ($repository) {
|
|
||||||
return $repository->getCommitURI($hash);
|
|
||||||
}
|
|
||||||
|
|
||||||
$commit = $this->getCommit($hash);
|
|
||||||
if ($commit) {
|
|
||||||
return $commit->getURI();
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private function getCommitObjectName($hash) {
|
|
||||||
$repository = $this->getRepository();
|
|
||||||
|
|
||||||
if ($repository) {
|
|
||||||
return $repository->formatCommitName(
|
|
||||||
$hash,
|
|
||||||
$is_local = true);
|
|
||||||
}
|
|
||||||
|
|
||||||
$commit = $this->getCommit($hash);
|
|
||||||
if ($commit) {
|
|
||||||
return $commit->getDisplayName();
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private function getCommitIsDisabled($commit) {
|
|
||||||
if (!$commit) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($commit->isUnreachable()) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private function getCommitAuthorView($commit) {
|
|
||||||
if (!$commit) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$viewer = $this->getViewer();
|
|
||||||
|
|
||||||
$author_phid = $commit->getAuthorDisplayPHID();
|
|
||||||
if ($author_phid) {
|
|
||||||
return $viewer->loadHandles(array($author_phid))
|
|
||||||
->newListView();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $commit->newCommitAuthorView($viewer);
|
|
||||||
}
|
|
||||||
|
|
||||||
private function getCommit($hash) {
|
|
||||||
$commit_map = $this->getCommitMap();
|
|
||||||
return idx($commit_map, $hash);
|
|
||||||
}
|
|
||||||
|
|
||||||
private function getCommitMap() {
|
|
||||||
if ($this->commitMap === null) {
|
|
||||||
$commit_list = $this->newCommitList();
|
|
||||||
$this->commitMap = mpull($commit_list, null, 'getCommitIdentifier');
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->commitMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
private function addBrowseAction(PHUIObjectItemView $item, $hash) {
|
|
||||||
$repository = $this->getRepository();
|
|
||||||
|
|
||||||
if (!$repository) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$drequest = $this->getDiffusionRequest();
|
|
||||||
$path = $drequest->getPath();
|
|
||||||
|
|
||||||
$uri = $drequest->generateURI(
|
|
||||||
array(
|
|
||||||
'action' => 'browse',
|
|
||||||
'path' => $path,
|
|
||||||
'commit' => $hash,
|
|
||||||
));
|
|
||||||
|
|
||||||
$menu_item = $item->newMenuItem()
|
|
||||||
->setName(pht('Browse Repository'))
|
|
||||||
->setURI($uri);
|
|
||||||
|
|
||||||
$menu_item->newIcon()
|
|
||||||
->setIcon('fa-folder-open-o')
|
|
||||||
->setColor('bluegrey');
|
|
||||||
}
|
|
||||||
|
|
||||||
private function addBuildAction(PHUIObjectItemView $item, $hash) {
|
|
||||||
$is_disabled = true;
|
|
||||||
|
|
||||||
$buildable = null;
|
|
||||||
|
|
||||||
$commit = $this->getCommit($hash);
|
|
||||||
if ($commit) {
|
|
||||||
$buildable = $this->getBuildable($commit);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($buildable) {
|
|
||||||
$icon = $buildable->getStatusIcon();
|
|
||||||
$color = $buildable->getStatusColor();
|
|
||||||
$name = $buildable->getStatusDisplayName();
|
|
||||||
$uri = $buildable->getURI();
|
|
||||||
} else {
|
|
||||||
$icon = 'fa-times';
|
|
||||||
$color = 'grey';
|
|
||||||
$name = pht('No Builds');
|
|
||||||
$uri = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$menu_item = $item->newMenuItem()
|
|
||||||
->setName($name)
|
|
||||||
->setURI($uri)
|
|
||||||
->setDisabled(($uri === null));
|
|
||||||
|
|
||||||
$menu_item->newIcon()
|
|
||||||
->setIcon($icon)
|
|
||||||
->setColor($color);
|
|
||||||
}
|
|
||||||
|
|
||||||
private function addAuditAction(PHUIObjectItemView $item_view, $hash) {
|
|
||||||
$commit = $this->getCommit($hash);
|
|
||||||
|
|
||||||
if ($commit) {
|
|
||||||
$status = $commit->getAuditStatusObject();
|
|
||||||
|
|
||||||
$text = $status->getName();
|
|
||||||
$icon = $status->getIcon();
|
|
||||||
|
|
||||||
$is_disabled = $status->isNoAudit();
|
|
||||||
if ($is_disabled) {
|
|
||||||
$uri = null;
|
|
||||||
$color = 'grey';
|
|
||||||
} else {
|
|
||||||
$color = $status->getColor();
|
|
||||||
$uri = $commit->getURI();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$text = pht('No Audit');
|
|
||||||
$color = 'grey';
|
|
||||||
$icon = 'fa-times';
|
|
||||||
$uri = null;
|
|
||||||
|
|
||||||
$is_disabled = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
$menu_item = $item_view->newMenuItem()
|
|
||||||
->setName($text)
|
|
||||||
->setURI($uri)
|
|
||||||
->setBackgroundColor($color)
|
|
||||||
->setDisabled($is_disabled);
|
|
||||||
|
|
||||||
$menu_item->newIcon()
|
|
||||||
->setIcon($icon)
|
|
||||||
->setColor($color);
|
|
||||||
}
|
|
||||||
|
|
||||||
private function getBuildable(PhabricatorRepositoryCommit $commit) {
|
|
||||||
$buildable_map = $this->getBuildableMap();
|
|
||||||
return idx($buildable_map, $commit->getPHID());
|
|
||||||
}
|
|
||||||
|
|
||||||
private function getBuildableMap() {
|
|
||||||
if ($this->buildableMap === null) {
|
|
||||||
$commits = $this->getCommitMap();
|
|
||||||
$buildables = $this->loadBuildables($commits);
|
|
||||||
$this->buildableMap = $buildables;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->buildableMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
private function getRevisions(PhabricatorRepositoryCommit $commit) {
|
|
||||||
$revision_map = $this->getRevisionMap();
|
|
||||||
return idx($revision_map, $commit->getPHID(), array());
|
|
||||||
}
|
|
||||||
|
|
||||||
private function getRevisionMap() {
|
|
||||||
if ($this->revisionMap === null) {
|
|
||||||
$this->revisionMap = $this->newRevisionMap();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->revisionMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
private function newRevisionMap() {
|
|
||||||
$viewer = $this->getViewer();
|
|
||||||
$commits = $this->getCommitMap();
|
|
||||||
|
|
||||||
return DiffusionCommitRevisionQuery::loadRevisionMapForCommits(
|
|
||||||
$viewer,
|
|
||||||
$commits);
|
|
||||||
}
|
|
||||||
|
|
||||||
private function newCommitList() {
|
|
||||||
$commits = $this->getCommits();
|
|
||||||
if ($commits !== null) {
|
|
||||||
return $commits;
|
|
||||||
}
|
|
||||||
|
|
||||||
$repository = $this->getRepository();
|
|
||||||
if (!$repository) {
|
|
||||||
return array();
|
|
||||||
}
|
|
||||||
|
|
||||||
$history = $this->getHistory();
|
|
||||||
if ($history === null) {
|
|
||||||
return array();
|
|
||||||
}
|
|
||||||
|
|
||||||
$identifiers = array();
|
|
||||||
foreach ($history as $item) {
|
|
||||||
$identifiers[] = $item->getCommitIdentifier();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$identifiers) {
|
|
||||||
return array();
|
|
||||||
}
|
|
||||||
|
|
||||||
$viewer = $this->getViewer();
|
|
||||||
|
|
||||||
$commits = id(new DiffusionCommitQuery())
|
|
||||||
->setViewer($viewer)
|
|
||||||
->withRepository($repository)
|
|
||||||
->withIdentifiers($identifiers)
|
|
||||||
->needCommitData(true)
|
|
||||||
->needIdentities(true)
|
|
||||||
->execute();
|
|
||||||
|
|
||||||
return $commits;
|
|
||||||
}
|
|
||||||
|
|
||||||
private function newAuditorList(
|
|
||||||
PhabricatorRepositoryCommit $commit,
|
|
||||||
$handles) {
|
|
||||||
|
|
||||||
$auditors = $commit->getAudits();
|
|
||||||
if (!$auditors) {
|
|
||||||
return phutil_tag('em', array(), pht('None'));
|
|
||||||
}
|
|
||||||
|
|
||||||
$auditor_phids = mpull($auditors, 'getAuditorPHID');
|
|
||||||
$auditor_list = $handles->newSublist($auditor_phids)
|
|
||||||
->newListView();
|
|
||||||
|
|
||||||
return $auditor_list;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
177
src/applications/diffusion/view/DiffusionCommitListView.php
Normal file
@@ -0,0 +1,177 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
final class DiffusionCommitListView extends AphrontView {
|
||||||
|
|
||||||
|
private $commits = array();
|
||||||
|
private $noDataString;
|
||||||
|
|
||||||
|
public function setNoDataString($no_data_string) {
|
||||||
|
$this->noDataString = $no_data_string;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setHeader($header) {
|
||||||
|
$this->header = $header;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setCommits(array $commits) {
|
||||||
|
assert_instances_of($commits, 'PhabricatorRepositoryCommit');
|
||||||
|
$this->commits = mpull($commits, null, 'getPHID');
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getCommits() {
|
||||||
|
return $this->commits;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setHandles(array $handles) {
|
||||||
|
assert_instances_of($handles, 'PhabricatorObjectHandle');
|
||||||
|
$this->handles = $handles;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getRequiredHandlePHIDs() {
|
||||||
|
$phids = array();
|
||||||
|
foreach ($this->history as $item) {
|
||||||
|
$data = $item->getCommitData();
|
||||||
|
if ($data) {
|
||||||
|
if ($data->getCommitDetail('authorPHID')) {
|
||||||
|
$phids[$data->getCommitDetail('authorPHID')] = true;
|
||||||
|
}
|
||||||
|
if ($data->getCommitDetail('committerPHID')) {
|
||||||
|
$phids[$data->getCommitDetail('committerPHID')] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return array_keys($phids);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getCommitDescription($phid) {
|
||||||
|
if ($this->commits === null) {
|
||||||
|
return pht('(Unknown Commit)');
|
||||||
|
}
|
||||||
|
|
||||||
|
$commit = idx($this->commits, $phid);
|
||||||
|
if (!$commit) {
|
||||||
|
return pht('(Unknown Commit)');
|
||||||
|
}
|
||||||
|
|
||||||
|
$summary = $commit->getCommitData()->getSummary();
|
||||||
|
if (strlen($summary)) {
|
||||||
|
return $summary;
|
||||||
|
}
|
||||||
|
|
||||||
|
// No summary, so either this is still importing or just has an empty
|
||||||
|
// commit message.
|
||||||
|
|
||||||
|
if (!$commit->isImported()) {
|
||||||
|
return pht('(Importing Commit...)');
|
||||||
|
} else {
|
||||||
|
return pht('(Untitled Commit)');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function render() {
|
||||||
|
require_celerity_resource('diffusion-css');
|
||||||
|
return $this->buildList();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function buildList() {
|
||||||
|
$viewer = $this->getViewer();
|
||||||
|
$rowc = array();
|
||||||
|
|
||||||
|
$phids = array();
|
||||||
|
foreach ($this->getCommits() as $commit) {
|
||||||
|
$phids[] = $commit->getPHID();
|
||||||
|
|
||||||
|
$author_phid = $commit->getAuthorPHID();
|
||||||
|
if ($author_phid) {
|
||||||
|
$phids[] = $author_phid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$handles = $viewer->loadHandles($phids);
|
||||||
|
|
||||||
|
$cur_date = 0;
|
||||||
|
$view = array();
|
||||||
|
foreach ($this->commits as $commit) {
|
||||||
|
$new_date = phabricator_date($commit->getEpoch(), $viewer);
|
||||||
|
if ($cur_date !== $new_date) {
|
||||||
|
$date = ucfirst(
|
||||||
|
phabricator_relative_date($commit->getEpoch(), $viewer));
|
||||||
|
$header = id(new PHUIHeaderView())
|
||||||
|
->setHeader($date);
|
||||||
|
$list = id(new PHUIObjectItemListView())
|
||||||
|
->setFlush(true)
|
||||||
|
->addClass('diffusion-history-list');
|
||||||
|
|
||||||
|
$view[] = id(new PHUIObjectBoxView())
|
||||||
|
->setHeader($header)
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
|
->setObjectList($list);
|
||||||
|
}
|
||||||
|
|
||||||
|
$commit_phid = $commit->getPHID();
|
||||||
|
$commit_handle = $handles[$commit_phid];
|
||||||
|
$committed = null;
|
||||||
|
|
||||||
|
$commit_name = $commit_handle->getName();
|
||||||
|
$commit_link = $commit_handle->getURI();
|
||||||
|
$commit_desc = $this->getCommitDescription($commit_phid);
|
||||||
|
$committed = phabricator_datetime($commit->getEpoch(), $viewer);
|
||||||
|
|
||||||
|
$engine = PhabricatorMarkupEngine::newDifferentialMarkupEngine();
|
||||||
|
$engine->setConfig('viewer', $viewer);
|
||||||
|
$commit_data = $commit->getCommitData();
|
||||||
|
$message = $commit_data->getCommitMessage();
|
||||||
|
$message = $engine->markupText($message);
|
||||||
|
$message = phutil_tag_div(
|
||||||
|
'diffusion-history-message phabricator-remarkup', $message);
|
||||||
|
|
||||||
|
$author_phid = $commit->getAuthorPHID();
|
||||||
|
if ($author_phid) {
|
||||||
|
$author_name = $handles[$author_phid]->renderLink();
|
||||||
|
$author_image_uri = $handles[$author_phid]->getImageURI();
|
||||||
|
} else {
|
||||||
|
$author_name = $commit->getCommitData()->getAuthorName();
|
||||||
|
$author_image_uri =
|
||||||
|
celerity_get_resource_uri('/rsrc/image/people/user0.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
$commit_tag = id(new PHUITagView())
|
||||||
|
->setName($commit_name)
|
||||||
|
->setType(PHUITagView::TYPE_SHADE)
|
||||||
|
->setColor(PHUITagView::COLOR_INDIGO)
|
||||||
|
->setBorder(PHUITagView::BORDER_NONE)
|
||||||
|
->setSlimShady(true);
|
||||||
|
|
||||||
|
$item = id(new PHUIObjectItemView())
|
||||||
|
->setHeader($commit_desc)
|
||||||
|
->setHref($commit_link)
|
||||||
|
->setDisabled($commit->isUnreachable())
|
||||||
|
->setDescription($message)
|
||||||
|
->setImageURI($author_image_uri)
|
||||||
|
->addByline(pht('Author: %s', $author_name))
|
||||||
|
->addIcon('none', $committed)
|
||||||
|
->addAttribute($commit_tag);
|
||||||
|
|
||||||
|
$list->addItem($item);
|
||||||
|
$cur_date = $new_date;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$view) {
|
||||||
|
$list = id(new PHUIObjectItemListView())
|
||||||
|
->setFlush(true)
|
||||||
|
->setNoDataString($this->noDataString);
|
||||||
|
|
||||||
|
$view = id(new PHUIObjectBoxView())
|
||||||
|
->setHeaderText(pht('Recent Commits'))
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
|
->setObjectList($list);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $view;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
172
src/applications/diffusion/view/DiffusionHistoryListView.php
Normal file
@@ -0,0 +1,172 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
final class DiffusionHistoryListView extends DiffusionHistoryView {
|
||||||
|
|
||||||
|
public function render() {
|
||||||
|
$drequest = $this->getDiffusionRequest();
|
||||||
|
$viewer = $this->getUser();
|
||||||
|
$repository = $drequest->getRepository();
|
||||||
|
|
||||||
|
require_celerity_resource('diffusion-css');
|
||||||
|
Javelin::initBehavior('phabricator-tooltips');
|
||||||
|
|
||||||
|
$buildables = $this->loadBuildables(
|
||||||
|
mpull($this->getHistory(), 'getCommit'));
|
||||||
|
|
||||||
|
$show_revisions = PhabricatorApplication::isClassInstalledForViewer(
|
||||||
|
'PhabricatorDifferentialApplication',
|
||||||
|
$viewer);
|
||||||
|
|
||||||
|
$handles = $viewer->loadHandles($this->getRequiredHandlePHIDs());
|
||||||
|
|
||||||
|
$show_builds = PhabricatorApplication::isClassInstalledForViewer(
|
||||||
|
'PhabricatorHarbormasterApplication',
|
||||||
|
$this->getUser());
|
||||||
|
|
||||||
|
$cur_date = null;
|
||||||
|
$view = array();
|
||||||
|
foreach ($this->getHistory() as $history) {
|
||||||
|
$epoch = $history->getEpoch();
|
||||||
|
$new_date = phabricator_date($history->getEpoch(), $viewer);
|
||||||
|
if ($cur_date !== $new_date) {
|
||||||
|
$date = ucfirst(
|
||||||
|
phabricator_relative_date($history->getEpoch(), $viewer));
|
||||||
|
$header = id(new PHUIHeaderView())
|
||||||
|
->setHeader($date);
|
||||||
|
$list = id(new PHUIObjectItemListView())
|
||||||
|
->setFlush(true)
|
||||||
|
->addClass('diffusion-history-list');
|
||||||
|
|
||||||
|
$view[] = id(new PHUIObjectBoxView())
|
||||||
|
->setHeader($header)
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
|
->addClass('diffusion-mobile-view')
|
||||||
|
->setObjectList($list);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($epoch) {
|
||||||
|
$committed = $viewer->formatShortDateTime($epoch);
|
||||||
|
} else {
|
||||||
|
$committed = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = $history->getCommitData();
|
||||||
|
$author_phid = $committer = $committer_phid = null;
|
||||||
|
if ($data) {
|
||||||
|
$author_phid = $data->getCommitDetail('authorPHID');
|
||||||
|
$committer_phid = $data->getCommitDetail('committerPHID');
|
||||||
|
$committer = $data->getCommitDetail('committer');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($author_phid && isset($handles[$author_phid])) {
|
||||||
|
$author_name = $handles[$author_phid]->renderLink();
|
||||||
|
$author_image = $handles[$author_phid]->getImageURI();
|
||||||
|
} else {
|
||||||
|
$author_name = self::renderName($history->getAuthorName());
|
||||||
|
$author_image =
|
||||||
|
celerity_get_resource_uri('/rsrc/image/people/user0.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
$different_committer = false;
|
||||||
|
if ($committer_phid) {
|
||||||
|
$different_committer = ($committer_phid != $author_phid);
|
||||||
|
} else if ($committer != '') {
|
||||||
|
$different_committer = ($committer != $history->getAuthorName());
|
||||||
|
}
|
||||||
|
if ($different_committer) {
|
||||||
|
if ($committer_phid && isset($handles[$committer_phid])) {
|
||||||
|
$committer = $handles[$committer_phid]->renderLink();
|
||||||
|
} else {
|
||||||
|
$committer = self::renderName($committer);
|
||||||
|
}
|
||||||
|
$author_name = hsprintf('%s / %s', $author_name, $committer);
|
||||||
|
}
|
||||||
|
|
||||||
|
// We can show details once the message and change have been imported.
|
||||||
|
$partial_import = PhabricatorRepositoryCommit::IMPORTED_MESSAGE |
|
||||||
|
PhabricatorRepositoryCommit::IMPORTED_CHANGE;
|
||||||
|
|
||||||
|
$commit = $history->getCommit();
|
||||||
|
if ($commit && $commit->isPartiallyImported($partial_import) && $data) {
|
||||||
|
$commit_desc = $history->getSummary();
|
||||||
|
} else {
|
||||||
|
$commit_desc = phutil_tag('em', array(), pht("Importing\xE2\x80\xA6"));
|
||||||
|
}
|
||||||
|
|
||||||
|
$browse_button = $this->linkBrowse(
|
||||||
|
$history->getPath(),
|
||||||
|
array(
|
||||||
|
'commit' => $history->getCommitIdentifier(),
|
||||||
|
'branch' => $drequest->getBranch(),
|
||||||
|
'type' => $history->getFileType(),
|
||||||
|
),
|
||||||
|
true);
|
||||||
|
|
||||||
|
$diff_tag = null;
|
||||||
|
if ($show_revisions && $commit) {
|
||||||
|
$revisions = $this->getRevisionsForCommit($commit);
|
||||||
|
if ($revisions) {
|
||||||
|
$revision = head($revisions);
|
||||||
|
$diff_tag = id(new PHUITagView())
|
||||||
|
->setName($revision->getMonogram())
|
||||||
|
->setType(PHUITagView::TYPE_SHADE)
|
||||||
|
->setColor(PHUITagView::COLOR_BLUE)
|
||||||
|
->setHref($revision->getURI())
|
||||||
|
->setBorder(PHUITagView::BORDER_NONE)
|
||||||
|
->setSlimShady(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$build_view = null;
|
||||||
|
if ($show_builds) {
|
||||||
|
$buildable = idx($buildables, $commit->getPHID());
|
||||||
|
if ($buildable !== null) {
|
||||||
|
$build_view = $this->renderBuildable($buildable, 'button');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$message = null;
|
||||||
|
$commit_link = $repository->getCommitURI(
|
||||||
|
$history->getCommitIdentifier());
|
||||||
|
|
||||||
|
$commit_name = $repository->formatCommitName(
|
||||||
|
$history->getCommitIdentifier(), $local = true);
|
||||||
|
|
||||||
|
$committed = phabricator_datetime($commit->getEpoch(), $viewer);
|
||||||
|
$author_name = phutil_tag(
|
||||||
|
'strong',
|
||||||
|
array(
|
||||||
|
'class' => 'diffusion-history-author-name',
|
||||||
|
),
|
||||||
|
$author_name);
|
||||||
|
$authored = pht('%s on %s.', $author_name, $committed);
|
||||||
|
|
||||||
|
$commit_tag = id(new PHUITagView())
|
||||||
|
->setName($commit_name)
|
||||||
|
->setType(PHUITagView::TYPE_SHADE)
|
||||||
|
->setColor(PHUITagView::COLOR_INDIGO)
|
||||||
|
->setBorder(PHUITagView::BORDER_NONE)
|
||||||
|
->setSlimShady(true);
|
||||||
|
|
||||||
|
$item = id(new PHUIObjectItemView())
|
||||||
|
->setHeader($commit_desc)
|
||||||
|
->setHref($commit_link)
|
||||||
|
->setDisabled($commit->isUnreachable())
|
||||||
|
->setDescription($message)
|
||||||
|
->setImageURI($author_image)
|
||||||
|
->addAttribute(array($commit_tag, ' ', $diff_tag)) // For Copy Pasta
|
||||||
|
->addAttribute($authored)
|
||||||
|
->setSideColumn(array(
|
||||||
|
$build_view,
|
||||||
|
$browse_button,
|
||||||
|
));
|
||||||
|
|
||||||
|
$list->addItem($item);
|
||||||
|
$cur_date = $new_date;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return $view;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
208
src/applications/diffusion/view/DiffusionHistoryTableView.php
Normal file
@@ -0,0 +1,208 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
final class DiffusionHistoryTableView extends DiffusionHistoryView {
|
||||||
|
|
||||||
|
public function render() {
|
||||||
|
$drequest = $this->getDiffusionRequest();
|
||||||
|
|
||||||
|
$viewer = $this->getUser();
|
||||||
|
|
||||||
|
$buildables = $this->loadBuildables(
|
||||||
|
mpull($this->getHistory(), 'getCommit'));
|
||||||
|
$has_any_build = false;
|
||||||
|
|
||||||
|
$show_revisions = PhabricatorApplication::isClassInstalledForViewer(
|
||||||
|
'PhabricatorDifferentialApplication',
|
||||||
|
$viewer);
|
||||||
|
|
||||||
|
$handles = $viewer->loadHandles($this->getRequiredHandlePHIDs());
|
||||||
|
|
||||||
|
$graph = null;
|
||||||
|
if ($this->getParents()) {
|
||||||
|
$parents = $this->getParents();
|
||||||
|
|
||||||
|
// If we're filtering parents, remove relationships which point to
|
||||||
|
// commits that are not part of the visible graph. Otherwise, we get
|
||||||
|
// a big tree of nonsense when viewing release branches like "stable"
|
||||||
|
// versus "master".
|
||||||
|
if ($this->getFilterParents()) {
|
||||||
|
foreach ($parents as $key => $nodes) {
|
||||||
|
foreach ($nodes as $nkey => $node) {
|
||||||
|
if (empty($parents[$node])) {
|
||||||
|
unset($parents[$key][$nkey]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$graph = id(new PHUIDiffGraphView())
|
||||||
|
->setIsHead($this->getIsHead())
|
||||||
|
->setIsTail($this->getIsTail())
|
||||||
|
->renderGraph($parents);
|
||||||
|
}
|
||||||
|
|
||||||
|
$show_builds = PhabricatorApplication::isClassInstalledForViewer(
|
||||||
|
'PhabricatorHarbormasterApplication',
|
||||||
|
$this->getUser());
|
||||||
|
|
||||||
|
$rows = array();
|
||||||
|
$ii = 0;
|
||||||
|
foreach ($this->getHistory() as $history) {
|
||||||
|
$epoch = $history->getEpoch();
|
||||||
|
|
||||||
|
if ($epoch) {
|
||||||
|
$committed = $viewer->formatShortDateTime($epoch);
|
||||||
|
} else {
|
||||||
|
$committed = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = $history->getCommitData();
|
||||||
|
$author_phid = $committer = $committer_phid = null;
|
||||||
|
if ($data) {
|
||||||
|
$author_phid = $data->getCommitDetail('authorPHID');
|
||||||
|
$committer_phid = $data->getCommitDetail('committerPHID');
|
||||||
|
$committer = $data->getCommitDetail('committer');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($author_phid && isset($handles[$author_phid])) {
|
||||||
|
$author = $handles[$author_phid]->renderLink();
|
||||||
|
} else {
|
||||||
|
$author = self::renderName($history->getAuthorName());
|
||||||
|
}
|
||||||
|
|
||||||
|
$different_committer = false;
|
||||||
|
if ($committer_phid) {
|
||||||
|
$different_committer = ($committer_phid != $author_phid);
|
||||||
|
} else if ($committer != '') {
|
||||||
|
$different_committer = ($committer != $history->getAuthorName());
|
||||||
|
}
|
||||||
|
if ($different_committer) {
|
||||||
|
if ($committer_phid && isset($handles[$committer_phid])) {
|
||||||
|
$committer = $handles[$committer_phid]->renderLink();
|
||||||
|
} else {
|
||||||
|
$committer = self::renderName($committer);
|
||||||
|
}
|
||||||
|
$author = hsprintf('%s/%s', $author, $committer);
|
||||||
|
}
|
||||||
|
|
||||||
|
// We can show details once the message and change have been imported.
|
||||||
|
$partial_import = PhabricatorRepositoryCommit::IMPORTED_MESSAGE |
|
||||||
|
PhabricatorRepositoryCommit::IMPORTED_CHANGE;
|
||||||
|
|
||||||
|
$commit = $history->getCommit();
|
||||||
|
if ($commit && $commit->isPartiallyImported($partial_import) && $data) {
|
||||||
|
$summary = AphrontTableView::renderSingleDisplayLine(
|
||||||
|
$history->getSummary());
|
||||||
|
} else {
|
||||||
|
$summary = phutil_tag('em', array(), pht("Importing\xE2\x80\xA6"));
|
||||||
|
}
|
||||||
|
|
||||||
|
$build = null;
|
||||||
|
if ($show_builds) {
|
||||||
|
$buildable = idx($buildables, $commit->getPHID());
|
||||||
|
if ($buildable !== null) {
|
||||||
|
$build = $this->renderBuildable($buildable);
|
||||||
|
$has_any_build = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$browse = $this->linkBrowse(
|
||||||
|
$history->getPath(),
|
||||||
|
array(
|
||||||
|
'commit' => $history->getCommitIdentifier(),
|
||||||
|
'branch' => $drequest->getBranch(),
|
||||||
|
'type' => $history->getFileType(),
|
||||||
|
));
|
||||||
|
|
||||||
|
$status = $commit->getAuditStatusObject();
|
||||||
|
$icon = $status->getIcon();
|
||||||
|
$color = $status->getColor();
|
||||||
|
$name = $status->getName();
|
||||||
|
|
||||||
|
$audit_view = id(new PHUIIconView())
|
||||||
|
->setIcon($icon, $color)
|
||||||
|
->addSigil('has-tooltip')
|
||||||
|
->setMetadata(
|
||||||
|
array(
|
||||||
|
'tip' => $name,
|
||||||
|
));
|
||||||
|
|
||||||
|
$revision_link = null;
|
||||||
|
if ($commit) {
|
||||||
|
$revisions = $this->getRevisionsForCommit($commit);
|
||||||
|
if ($revisions) {
|
||||||
|
$revision = head($revisions);
|
||||||
|
$revision_link = phutil_tag(
|
||||||
|
'a',
|
||||||
|
array(
|
||||||
|
'href' => $revision->getURI(),
|
||||||
|
),
|
||||||
|
$revision->getMonogram());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$rows[] = array(
|
||||||
|
$graph ? $graph[$ii++] : null,
|
||||||
|
$browse,
|
||||||
|
self::linkCommit(
|
||||||
|
$drequest->getRepository(),
|
||||||
|
$history->getCommitIdentifier()),
|
||||||
|
$build,
|
||||||
|
$audit_view,
|
||||||
|
$revision_link,
|
||||||
|
$author,
|
||||||
|
$summary,
|
||||||
|
$committed,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$view = new AphrontTableView($rows);
|
||||||
|
$view->setHeaders(
|
||||||
|
array(
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
pht('Commit'),
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
pht('Author'),
|
||||||
|
pht('Details'),
|
||||||
|
pht('Committed'),
|
||||||
|
));
|
||||||
|
$view->setColumnClasses(
|
||||||
|
array(
|
||||||
|
'threads',
|
||||||
|
'nudgeright',
|
||||||
|
'',
|
||||||
|
'icon',
|
||||||
|
'icon',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'wide',
|
||||||
|
'right',
|
||||||
|
));
|
||||||
|
$view->setColumnVisibility(
|
||||||
|
array(
|
||||||
|
$graph ? true : false,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
$has_any_build,
|
||||||
|
true,
|
||||||
|
$show_revisions,
|
||||||
|
));
|
||||||
|
$view->setDeviceVisibility(
|
||||||
|
array(
|
||||||
|
$graph ? true : false,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
));
|
||||||
|
return $view->render();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
117
src/applications/diffusion/view/DiffusionHistoryView.php
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
abstract class DiffusionHistoryView extends DiffusionView {
|
||||||
|
|
||||||
|
private $history;
|
||||||
|
private $revisions = array();
|
||||||
|
private $handles = array();
|
||||||
|
private $isHead;
|
||||||
|
private $isTail;
|
||||||
|
private $parents;
|
||||||
|
private $filterParents;
|
||||||
|
private $revisionMap;
|
||||||
|
|
||||||
|
public function setHistory(array $history) {
|
||||||
|
assert_instances_of($history, 'DiffusionPathChange');
|
||||||
|
$this->history = $history;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHistory() {
|
||||||
|
return $this->history;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setHandles(array $handles) {
|
||||||
|
assert_instances_of($handles, 'PhabricatorObjectHandle');
|
||||||
|
$this->handles = $handles;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getRequiredHandlePHIDs() {
|
||||||
|
$phids = array();
|
||||||
|
foreach ($this->history as $item) {
|
||||||
|
$data = $item->getCommitData();
|
||||||
|
if ($data) {
|
||||||
|
if ($data->getCommitDetail('authorPHID')) {
|
||||||
|
$phids[$data->getCommitDetail('authorPHID')] = true;
|
||||||
|
}
|
||||||
|
if ($data->getCommitDetail('committerPHID')) {
|
||||||
|
$phids[$data->getCommitDetail('committerPHID')] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return array_keys($phids);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setParents(array $parents) {
|
||||||
|
$this->parents = $parents;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getParents() {
|
||||||
|
return $this->parents;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setIsHead($is_head) {
|
||||||
|
$this->isHead = $is_head;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getIsHead() {
|
||||||
|
return $this->isHead;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setIsTail($is_tail) {
|
||||||
|
$this->isTail = $is_tail;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getIsTail() {
|
||||||
|
return $this->isTail;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setFilterParents($filter_parents) {
|
||||||
|
$this->filterParents = $filter_parents;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getFilterParents() {
|
||||||
|
return $this->filterParents;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function render() {}
|
||||||
|
|
||||||
|
final protected function getRevisionsForCommit(
|
||||||
|
PhabricatorRepositoryCommit $commit) {
|
||||||
|
|
||||||
|
if ($this->revisionMap === null) {
|
||||||
|
$this->revisionMap = $this->newRevisionMap();
|
||||||
|
}
|
||||||
|
|
||||||
|
return idx($this->revisionMap, $commit->getPHID(), array());
|
||||||
|
}
|
||||||
|
|
||||||
|
private function newRevisionMap() {
|
||||||
|
$history = $this->history;
|
||||||
|
|
||||||
|
$commits = array();
|
||||||
|
foreach ($history as $item) {
|
||||||
|
$commit = $item->getCommit();
|
||||||
|
if ($commit) {
|
||||||
|
|
||||||
|
// NOTE: The "commit" objects in the history list may be undiscovered,
|
||||||
|
// and thus not yet have PHIDs. Only load data for commits with PHIDs.
|
||||||
|
if (!$commit->getPHID()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$commits[] = $commit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return DiffusionCommitRevisionQuery::loadRevisionMapForCommits(
|
||||||
|
$this->getViewer(),
|
||||||
|
$commits);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -150,7 +150,7 @@ final class DiffusionTagListView extends DiffusionView {
|
|||||||
if ($commit->getAuthorPHID()) {
|
if ($commit->getAuthorPHID()) {
|
||||||
$author = $this->handles[$commit->getAuthorPHID()]->renderLink();
|
$author = $this->handles[$commit->getAuthorPHID()]->renderLink();
|
||||||
} else if ($commit->getCommitData()) {
|
} else if ($commit->getCommitData()) {
|
||||||
$author = self::renderName($commit->getCommitData()->getAuthorString());
|
$author = self::renderName($commit->getCommitData()->getAuthorName());
|
||||||
} else {
|
} else {
|
||||||
$author = self::renderName($tag->getAuthor());
|
$author = self::renderName($tag->getAuthor());
|
||||||
}
|
}
|
||||||
|
|||||||
140
src/applications/diffusion/view/DiffusionTagTableView.php
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
final class DiffusionTagTableView extends DiffusionView {
|
||||||
|
|
||||||
|
private $tags;
|
||||||
|
private $commits = array();
|
||||||
|
private $handles = array();
|
||||||
|
|
||||||
|
public function setTags($tags) {
|
||||||
|
$this->tags = $tags;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setCommits(array $commits) {
|
||||||
|
$this->commits = mpull($commits, null, 'getCommitIdentifier');
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setHandles(array $handles) {
|
||||||
|
$this->handles = $handles;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getRequiredHandlePHIDs() {
|
||||||
|
return array_filter(mpull($this->commits, 'getAuthorPHID'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function render() {
|
||||||
|
$drequest = $this->getDiffusionRequest();
|
||||||
|
$repository = $drequest->getRepository();
|
||||||
|
$viewer = $this->getViewer();
|
||||||
|
|
||||||
|
$buildables = $this->loadBuildables($this->commits);
|
||||||
|
$has_builds = false;
|
||||||
|
|
||||||
|
$rows = array();
|
||||||
|
foreach ($this->tags as $tag) {
|
||||||
|
$commit = idx($this->commits, $tag->getCommitIdentifier());
|
||||||
|
|
||||||
|
$tag_link = phutil_tag(
|
||||||
|
'a',
|
||||||
|
array(
|
||||||
|
'href' => $drequest->generateURI(
|
||||||
|
array(
|
||||||
|
'action' => 'browse',
|
||||||
|
'commit' => $tag->getName(),
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
$tag->getName());
|
||||||
|
|
||||||
|
$commit_link = phutil_tag(
|
||||||
|
'a',
|
||||||
|
array(
|
||||||
|
'href' => $drequest->generateURI(
|
||||||
|
array(
|
||||||
|
'action' => 'commit',
|
||||||
|
'commit' => $tag->getCommitIdentifier(),
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
$repository->formatCommitName(
|
||||||
|
$tag->getCommitIdentifier()));
|
||||||
|
|
||||||
|
$author = null;
|
||||||
|
if ($commit && $commit->getAuthorPHID()) {
|
||||||
|
$author = $this->handles[$commit->getAuthorPHID()]->renderLink();
|
||||||
|
} else if ($commit && $commit->getCommitData()) {
|
||||||
|
$author = self::renderName($commit->getCommitData()->getAuthorName());
|
||||||
|
} else {
|
||||||
|
$author = self::renderName($tag->getAuthor());
|
||||||
|
}
|
||||||
|
|
||||||
|
$description = null;
|
||||||
|
if ($tag->getType() == 'git/tag') {
|
||||||
|
// In Git, a tag may be a "real" tag, or just a reference to a commit.
|
||||||
|
// If it's a real tag, use the message on the tag, since this may be
|
||||||
|
// unique data which isn't otherwise available.
|
||||||
|
$description = $tag->getDescription();
|
||||||
|
} else {
|
||||||
|
if ($commit) {
|
||||||
|
$description = $commit->getSummary();
|
||||||
|
} else {
|
||||||
|
$description = $tag->getDescription();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$build = null;
|
||||||
|
if ($commit) {
|
||||||
|
$buildable = idx($buildables, $commit->getPHID());
|
||||||
|
if ($buildable) {
|
||||||
|
$build = $this->renderBuildable($buildable);
|
||||||
|
$has_builds = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$history = $this->linkTagHistory($tag->getName());
|
||||||
|
|
||||||
|
$rows[] = array(
|
||||||
|
$history,
|
||||||
|
$tag_link,
|
||||||
|
$commit_link,
|
||||||
|
$build,
|
||||||
|
$author,
|
||||||
|
$description,
|
||||||
|
$viewer->formatShortDateTime($tag->getEpoch()),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$table = id(new AphrontTableView($rows))
|
||||||
|
->setHeaders(
|
||||||
|
array(
|
||||||
|
null,
|
||||||
|
pht('Tag'),
|
||||||
|
pht('Commit'),
|
||||||
|
null,
|
||||||
|
pht('Author'),
|
||||||
|
pht('Description'),
|
||||||
|
pht('Created'),
|
||||||
|
))
|
||||||
|
->setColumnClasses(
|
||||||
|
array(
|
||||||
|
'nudgeright',
|
||||||
|
'pri',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'wide',
|
||||||
|
'right',
|
||||||
|
))
|
||||||
|
->setColumnVisibility(
|
||||||
|
array(
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
$has_builds,
|
||||||
|
));
|
||||||
|
|
||||||
|
return $table->render();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -55,12 +55,6 @@ final class DrydockRepositoryOperation extends DrydockDAO
|
|||||||
'key_repository' => array(
|
'key_repository' => array(
|
||||||
'columns' => array('repositoryPHID', 'operationState'),
|
'columns' => array('repositoryPHID', 'operationState'),
|
||||||
),
|
),
|
||||||
'key_state' => array(
|
|
||||||
'columns' => array('operationState'),
|
|
||||||
),
|
|
||||||
'key_author' => array(
|
|
||||||
'columns' => array('authorPHID', 'operationState'),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ final class PhabricatorChartFunctionArgumentParser
|
|||||||
pht(
|
pht(
|
||||||
'Chart function "%s" emitted an argument specification ("%s") with '.
|
'Chart function "%s" emitted an argument specification ("%s") with '.
|
||||||
'no type. Each argument specification must have a valid type.',
|
'no type. Each argument specification must have a valid type.',
|
||||||
$this->getFunctionArgumentSignature(),
|
|
||||||
$name));
|
$name));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ final class PhabricatorFactDaemon extends PhabricatorDaemon {
|
|||||||
|
|
||||||
protected function run() {
|
protected function run() {
|
||||||
$this->setEngines(PhabricatorFactEngine::loadAllEngines());
|
$this->setEngines(PhabricatorFactEngine::loadAllEngines());
|
||||||
do {
|
while (!$this->shouldExit()) {
|
||||||
PhabricatorCaches::destroyRequestCache();
|
PhabricatorCaches::destroyRequestCache();
|
||||||
|
|
||||||
$iterators = $this->getAllApplicationIterators();
|
$iterators = $this->getAllApplicationIterators();
|
||||||
@@ -14,14 +14,9 @@ final class PhabricatorFactDaemon extends PhabricatorDaemon {
|
|||||||
$this->processIteratorWithCursor($iterator_name, $iterator);
|
$this->processIteratorWithCursor($iterator_name, $iterator);
|
||||||
}
|
}
|
||||||
|
|
||||||
$sleep_duration = 60;
|
$this->log(pht('Zzz...'));
|
||||||
|
$this->sleep(15);
|
||||||
if ($this->shouldHibernate($sleep_duration)) {
|
}
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->sleep($sleep_duration);
|
|
||||||
} while (!$this->shouldExit());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getAllApplicationIterators() {
|
public static function getAllApplicationIterators() {
|
||||||
|
|||||||
@@ -18,6 +18,10 @@ final class PhabricatorFavoritesMainMenuBarExtension
|
|||||||
public function buildMainMenus() {
|
public function buildMainMenus() {
|
||||||
$viewer = $this->getViewer();
|
$viewer = $this->getViewer();
|
||||||
|
|
||||||
|
if ($viewer->limitNonContributorUI()) {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
$dropdown = $this->newDropdown($viewer);
|
$dropdown = $this->newDropdown($viewer);
|
||||||
if (!$dropdown) {
|
if (!$dropdown) {
|
||||||
return array();
|
return array();
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ final class PhabricatorFileDataController extends PhabricatorFileController {
|
|||||||
private $key;
|
private $key;
|
||||||
private $file;
|
private $file;
|
||||||
|
|
||||||
|
public function shouldAllowPublic() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
public function shouldRequireLogin() {
|
public function shouldRequireLogin() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,8 +85,15 @@ final class PhabricatorJupyterDocumentEngine
|
|||||||
if ($utype === $vtype) {
|
if ($utype === $vtype) {
|
||||||
switch ($utype) {
|
switch ($utype) {
|
||||||
case 'markdown':
|
case 'markdown':
|
||||||
$usource = $this->readString($ucell, 'source');
|
$usource = idx($ucell, 'source');
|
||||||
$vsource = $this->readString($vcell, 'source');
|
if (is_array($usource)) {
|
||||||
|
$usource = implode('', $usource);
|
||||||
|
}
|
||||||
|
|
||||||
|
$vsource = idx($vcell, 'source');
|
||||||
|
if (is_array($vsource)) {
|
||||||
|
$vsource = implode('', $vsource);
|
||||||
|
}
|
||||||
|
|
||||||
$diff = id(new PhutilProseDifferenceEngine())
|
$diff = id(new PhutilProseDifferenceEngine())
|
||||||
->getDiff($usource, $vsource);
|
->getDiff($usource, $vsource);
|
||||||
@@ -110,6 +117,8 @@ final class PhabricatorJupyterDocumentEngine
|
|||||||
$vsource = idx($vcell, 'raw');
|
$vsource = idx($vcell, 'raw');
|
||||||
$udisplay = idx($ucell, 'display');
|
$udisplay = idx($ucell, 'display');
|
||||||
$vdisplay = idx($vcell, 'display');
|
$vdisplay = idx($vcell, 'display');
|
||||||
|
$ulabel = idx($ucell, 'label');
|
||||||
|
$vlabel = idx($vcell, 'label');
|
||||||
|
|
||||||
$intraline_segments = ArcanistDiffUtils::generateIntralineDiff(
|
$intraline_segments = ArcanistDiffUtils::generateIntralineDiff(
|
||||||
$usource,
|
$usource,
|
||||||
@@ -133,15 +142,15 @@ final class PhabricatorJupyterDocumentEngine
|
|||||||
$vdisplay,
|
$vdisplay,
|
||||||
$v_segments);
|
$v_segments);
|
||||||
|
|
||||||
list($u_label, $u_content) = $this->newCodeLineCell($ucell, $usource);
|
$u_content = $this->newCodeLineCell($ucell, $usource);
|
||||||
list($v_label, $v_content) = $this->newCodeLineCell($vcell, $vsource);
|
$v_content = $this->newCodeLineCell($vcell, $vsource);
|
||||||
|
|
||||||
$classes = array(
|
$classes = array(
|
||||||
'jupyter-cell-flush',
|
'jupyter-cell-flush',
|
||||||
);
|
);
|
||||||
|
|
||||||
$u_content = $this->newJupyterCell($u_label, $u_content, $classes);
|
$u_content = $this->newJupyterCell($ulabel, $u_content, $classes);
|
||||||
$v_content = $this->newJupyterCell($v_label, $v_content, $classes);
|
$v_content = $this->newJupyterCell($vlabel, $v_content, $classes);
|
||||||
|
|
||||||
$u_content = $this->newCellContainer($u_content);
|
$u_content = $this->newCellContainer($u_content);
|
||||||
$v_content = $this->newCellContainer($v_content);
|
$v_content = $this->newCellContainer($v_content);
|
||||||
@@ -250,7 +259,10 @@ final class PhabricatorJupyterDocumentEngine
|
|||||||
$hash_input = $cell['raw'];
|
$hash_input = $cell['raw'];
|
||||||
break;
|
break;
|
||||||
case 'markdown':
|
case 'markdown':
|
||||||
$hash_input = $this->readString($cell, 'source');
|
$hash_input = $cell['source'];
|
||||||
|
if (is_array($hash_input)) {
|
||||||
|
$hash_input = implode('', $cell['source']);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$hash_input = serialize($cell);
|
$hash_input = serialize($cell);
|
||||||
@@ -322,6 +334,7 @@ final class PhabricatorJupyterDocumentEngine
|
|||||||
'be rendered as a Jupyter notebook.'));
|
'be rendered as a Jupyter notebook.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$nbformat = idx($data, 'nbformat');
|
$nbformat = idx($data, 'nbformat');
|
||||||
if (!strlen($nbformat)) {
|
if (!strlen($nbformat)) {
|
||||||
throw new Exception(
|
throw new Exception(
|
||||||
@@ -363,7 +376,10 @@ final class PhabricatorJupyterDocumentEngine
|
|||||||
foreach ($cells as $cell) {
|
foreach ($cells as $cell) {
|
||||||
$cell_type = idx($cell, 'cell_type');
|
$cell_type = idx($cell, 'cell_type');
|
||||||
if ($cell_type === 'markdown') {
|
if ($cell_type === 'markdown') {
|
||||||
$source = $this->readString($cell, 'source');
|
$source = $cell['source'];
|
||||||
|
if (is_array($source)) {
|
||||||
|
$source = implode('', $source);
|
||||||
|
}
|
||||||
|
|
||||||
// Attempt to split contiguous blocks of markdown into smaller
|
// Attempt to split contiguous blocks of markdown into smaller
|
||||||
// pieces.
|
// pieces.
|
||||||
@@ -388,7 +404,11 @@ final class PhabricatorJupyterDocumentEngine
|
|||||||
|
|
||||||
$label = $this->newCellLabel($cell);
|
$label = $this->newCellLabel($cell);
|
||||||
|
|
||||||
$lines = $this->readStringList($cell, 'source');
|
$lines = idx($cell, 'source');
|
||||||
|
if (!is_array($lines)) {
|
||||||
|
$lines = array();
|
||||||
|
}
|
||||||
|
|
||||||
$content = $this->highlightLines($lines);
|
$content = $this->highlightLines($lines);
|
||||||
|
|
||||||
$count = count($lines);
|
$count = count($lines);
|
||||||
@@ -506,7 +526,10 @@ final class PhabricatorJupyterDocumentEngine
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function newMarkdownCell(array $cell) {
|
private function newMarkdownCell(array $cell) {
|
||||||
$content = $this->readStringList($cell, 'source');
|
$content = idx($cell, 'source');
|
||||||
|
if (!is_array($content)) {
|
||||||
|
$content = array();
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: This should ideally highlight as Markdown, but the "md"
|
// TODO: This should ideally highlight as Markdown, but the "md"
|
||||||
// highlighter in Pygments is painfully slow and not terribly useful.
|
// highlighter in Pygments is painfully slow and not terribly useful.
|
||||||
@@ -526,7 +549,11 @@ final class PhabricatorJupyterDocumentEngine
|
|||||||
private function newCodeCell(array $cell) {
|
private function newCodeCell(array $cell) {
|
||||||
$label = $this->newCellLabel($cell);
|
$label = $this->newCellLabel($cell);
|
||||||
|
|
||||||
$content = $this->readStringList($cell, 'source');
|
$content = idx($cell, 'source');
|
||||||
|
if (!is_array($content)) {
|
||||||
|
$content = array();
|
||||||
|
}
|
||||||
|
|
||||||
$content = $this->highlightLines($content);
|
$content = $this->highlightLines($content);
|
||||||
|
|
||||||
$outputs = array();
|
$outputs = array();
|
||||||
@@ -633,7 +660,11 @@ final class PhabricatorJupyterDocumentEngine
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$raw_data = $this->readString($data, $image_format);
|
$raw_data = $data[$image_format];
|
||||||
|
if (!is_array($raw_data)) {
|
||||||
|
$raw_data = array($raw_data);
|
||||||
|
}
|
||||||
|
$raw_data = implode('', $raw_data);
|
||||||
|
|
||||||
$content = phutil_tag(
|
$content = phutil_tag(
|
||||||
'img',
|
'img',
|
||||||
@@ -664,7 +695,11 @@ final class PhabricatorJupyterDocumentEngine
|
|||||||
break;
|
break;
|
||||||
case 'stream':
|
case 'stream':
|
||||||
default:
|
default:
|
||||||
$content = $this->readString($output, 'text');
|
$content = idx($output, 'text');
|
||||||
|
if (!is_array($content)) {
|
||||||
|
$content = array();
|
||||||
|
}
|
||||||
|
$content = implode('', $content);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -726,23 +761,4 @@ final class PhabricatorJupyterDocumentEngine
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function readString(array $src, $key) {
|
|
||||||
$list = $this->readStringList($src, $key);
|
|
||||||
return implode('', $list);
|
|
||||||
}
|
|
||||||
|
|
||||||
private function readStringList(array $src, $key) {
|
|
||||||
$list = idx($src, $key);
|
|
||||||
|
|
||||||
if (is_array($list)) {
|
|
||||||
$list = $list;
|
|
||||||
} else if (is_string($list)) {
|
|
||||||
$list = array($list);
|
|
||||||
} else {
|
|
||||||
$list = array();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $list;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,16 +12,4 @@ final class PhabricatorFileHasObjectEdgeType extends PhabricatorEdgeType {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getConduitKey() {
|
|
||||||
return 'file.attached-objects';
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getConduitName() {
|
|
||||||
return pht('File Has Object');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getConduitDescription() {
|
|
||||||
return pht('The source file is attached to the destination object.');
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ final class PhabricatorFile extends PhabricatorFileDAO
|
|||||||
|
|
||||||
protected $ttl;
|
protected $ttl;
|
||||||
protected $isExplicitUpload = 1;
|
protected $isExplicitUpload = 1;
|
||||||
protected $viewPolicy = PhabricatorPolicies::POLICY_USER;
|
protected $viewPolicy = PhabricatorPolicies::POLICY_PUBLIC;
|
||||||
protected $isPartial = 0;
|
protected $isPartial = 0;
|
||||||
protected $isDeleted = 0;
|
protected $isDeleted = 0;
|
||||||
|
|
||||||
@@ -1570,7 +1570,7 @@ final class PhabricatorFile extends PhabricatorFileDAO
|
|||||||
}
|
}
|
||||||
return $this->getViewPolicy();
|
return $this->getViewPolicy();
|
||||||
case PhabricatorPolicyCapability::CAN_EDIT:
|
case PhabricatorPolicyCapability::CAN_EDIT:
|
||||||
return PhabricatorPolicies::POLICY_NOONE;
|
return PhabricatorPolicies::POLICY_ADMIN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
final class HarbormasterBuildStepEditAPIMethod
|
|
||||||
extends PhabricatorEditEngineAPIMethod {
|
|
||||||
|
|
||||||
public function getAPIMethodName() {
|
|
||||||
return 'harbormaster.step.edit';
|
|
||||||
}
|
|
||||||
|
|
||||||
public function newEditEngine() {
|
|
||||||
return new HarbormasterBuildStepEditEngine();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getMethodSummary() {
|
|
||||||
return pht(
|
|
||||||
'Apply transactions to create a new build step or edit an existing '.
|
|
||||||
'one.');
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||