Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/editor/DiffusionRepositoryEditEngine.php
| Show First 20 Lines • Show All 230 Lines • ▼ Show 20 Lines | $staging_instructions = pht( | ||||
| "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**. Phabricator will ignore '. | ||||
| 'commits which do not affect this path.'); | 'commits which do not affect this path.'); | ||||
| $filesize_warning = null; | |||||
| if ($object->isGit()) { | |||||
| $git_binary = PhutilBinaryAnalyzer::getForBinary('git'); | |||||
| $git_version = $git_binary->getBinaryVersion(); | |||||
| $filesize_version = '1.8.4'; | |||||
| if (version_compare($git_version, $filesize_version, '<')) { | |||||
| $filesize_warning = pht( | |||||
| '(WARNING) {icon exclamation-triangle} The version of "git" ("%s") '. | |||||
| 'installed on this server does not support '. | |||||
| '"--batch-check=<format>", a feature required to enforce filesize '. | |||||
| 'limits. Upgrade to "git" %s or newer to use this feature.', | |||||
| $git_version, | |||||
| $filesize_version); | |||||
| } | |||||
| } | |||||
| 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) | ||||
| ->setIsCopyable(true) | ->setIsCopyable(true) | ||||
| ▲ Show 20 Lines • Show All 225 Lines • ▼ Show 20 Lines | return array( | ||||
| id(new PhabricatorTextEditField()) | id(new PhabricatorTextEditField()) | ||||
| ->setKey('filesizeLimit') | ->setKey('filesizeLimit') | ||||
| ->setLabel(pht('Filesize Limit')) | ->setLabel(pht('Filesize Limit')) | ||||
| ->setTransactionType( | ->setTransactionType( | ||||
| PhabricatorRepositoryFilesizeLimitTransaction::TRANSACTIONTYPE) | PhabricatorRepositoryFilesizeLimitTransaction::TRANSACTIONTYPE) | ||||
| ->setDescription(pht('Maximum permitted file size.')) | ->setDescription(pht('Maximum permitted file size.')) | ||||
| ->setConduitDescription(pht('Change the filesize limit.')) | ->setConduitDescription(pht('Change the filesize limit.')) | ||||
| ->setConduitTypeDescription(pht('New repository filesize limit.')) | ->setConduitTypeDescription(pht('New repository filesize limit.')) | ||||
| ->setControlInstructions($filesize_warning) | |||||
| ->setValue($object->getFilesizeLimit()), | ->setValue($object->getFilesizeLimit()), | ||||
| id(new PhabricatorTextEditField()) | id(new PhabricatorTextEditField()) | ||||
| ->setKey('copyTimeLimit') | ->setKey('copyTimeLimit') | ||||
| ->setLabel(pht('Clone/Fetch Timeout')) | ->setLabel(pht('Clone/Fetch Timeout')) | ||||
| ->setTransactionType( | ->setTransactionType( | ||||
| PhabricatorRepositoryCopyTimeLimitTransaction::TRANSACTIONTYPE) | PhabricatorRepositoryCopyTimeLimitTransaction::TRANSACTIONTYPE) | ||||
| ->setDescription( | ->setDescription( | ||||
| pht('Maximum permitted duration of internal clone/fetch.')) | pht('Maximum permitted duration of internal clone/fetch.')) | ||||
| Show All 16 Lines | |||||