Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/editor/DiffusionRepositoryEditEngine.php
Show First 20 Lines • Show All 211 Lines • ▼ Show 20 Lines | $policies = id(new PhabricatorPolicyQuery()) | ||||
->setObject($object) | ->setObject($object) | ||||
->execute(); | ->execute(); | ||||
$fetch_value = $object->getFetchRules(); | $fetch_value = $object->getFetchRules(); | ||||
$track_value = $object->getTrackOnlyRules(); | $track_value = $object->getTrackOnlyRules(); | ||||
$permanent_value = $object->getPermanentRefRules(); | $permanent_value = $object->getPermanentRefRules(); | ||||
$automation_instructions = pht( | $automation_instructions = pht( | ||||
"Configure **Repository Automation** to allow Phabricator to ". | "Configure **Repository Automation** to allow this server to ". | ||||
"write to this repository.". | "write to this repository.". | ||||
"\n\n". | "\n\n". | ||||
"IMPORTANT: This feature is new, experimental, and not supported. ". | "IMPORTANT: This feature is new, experimental, and not supported. ". | ||||
"Use it at your own risk."); | "Use it at your own risk."); | ||||
$staging_instructions = pht( | $staging_instructions = pht( | ||||
"To make it easier to run integration tests and builds on code ". | "To make it easier to run integration tests and builds on code ". | ||||
"under review, you can configure a **Staging Area**. When `arc` ". | "under review, you can configure a **Staging Area**. When `arc` ". | ||||
"creates a diff, it will push a copy of the changes to the ". | "creates a diff, it will push a copy of the changes to the ". | ||||
"configured staging area with a corresponding tag.". | "configured staging area with a corresponding tag.". | ||||
"\n\n". | "\n\n". | ||||
"IMPORTANT: This feature is new, experimental, and not supported. ". | "IMPORTANT: This feature is new, experimental, and not supported. ". | ||||
"Use it at your own risk."); | "Use it at your own risk."); | ||||
$subpath_instructions = pht( | $subpath_instructions = pht( | ||||
'If you want to import only part of a repository, like `trunk/`, '. | 'If you want to import only part of a repository, like `trunk/`, '. | ||||
'you can set a path in **Import Only**. Phabricator will ignore '. | 'you can set a path in **Import Only**. The import process will ignore '. | ||||
'commits which do not affect this path.'); | 'commits which do not affect this path.'); | ||||
$filesize_warning = null; | $filesize_warning = null; | ||||
if ($object->isGit()) { | if ($object->isGit()) { | ||||
$git_binary = PhutilBinaryAnalyzer::getForBinary('git'); | $git_binary = PhutilBinaryAnalyzer::getForBinary('git'); | ||||
$git_version = $git_binary->getBinaryVersion(); | $git_version = $git_binary->getBinaryVersion(); | ||||
$filesize_version = '1.8.4'; | $filesize_version = '1.8.4'; | ||||
if (version_compare($git_version, $filesize_version, '<')) { | if (version_compare($git_version, $filesize_version, '<')) { | ||||
$filesize_warning = pht( | $filesize_warning = pht( | ||||
'(WARNING) {icon exclamation-triangle} The version of "git" ("%s") '. | '(WARNING) {icon exclamation-triangle} The version of "git" ("%s") '. | ||||
'installed on this server does not support '. | 'installed on this server does not support '. | ||||
'"--batch-check=<format>", a feature required to enforce filesize '. | '"--batch-check=<format>", a feature required to enforce filesize '. | ||||
'limits. Upgrade to "git" %s or newer to use this feature.', | 'limits. Upgrade to "git" %s or newer to use this feature.', | ||||
$git_version, | $git_version, | ||||
$filesize_version); | $filesize_version); | ||||
} | } | ||||
} | } | ||||
$track_instructions = pht( | $track_instructions = pht( | ||||
'WARNING: The "Track Only" feature is deprecated. Use "Fetch Refs" '. | 'WARNING: The "Track Only" feature is deprecated. Use "Fetch Refs" '. | ||||
'and "Permanent Refs" instead. This feature will be removed in a '. | 'and "Permanent Refs" instead. This feature will be removed in a '. | ||||
'future version of Phabricator.'); | 'future version of this software.'); | ||||
return array( | return array( | ||||
id(new PhabricatorSelectEditField()) | id(new PhabricatorSelectEditField()) | ||||
->setKey('vcs') | ->setKey('vcs') | ||||
->setLabel(pht('Version Control System')) | ->setLabel(pht('Version Control System')) | ||||
->setTransactionType( | ->setTransactionType( | ||||
PhabricatorRepositoryVCSTransaction::TRANSACTIONTYPE) | PhabricatorRepositoryVCSTransaction::TRANSACTIONTYPE) | ||||
->setIsFormField(false) | ->setIsFormField(false) | ||||
▲ Show 20 Lines • Show All 258 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0