1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

Bring old repository instructions and guidance forward to new UI

Summary:
Ref T10923. Fixes T10406. This brings most of the guidance/instructions forward:

  - Some remained as instructions.
  - Some moved to documentation.

Test Plan: Went through all of the sections and hit the help.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10406, T10923

Differential Revision: https://secure.phabricator.com/D15873
This commit is contained in:
epriestley 2016-05-09 16:12:37 -07:00
parent 98b202042e
commit e2bbde9675
5 changed files with 113 additions and 3 deletions

View file

@ -40,7 +40,10 @@ final class DiffusionRepositoryEditActivateController
if ($repository->isTracked()) {
$title = pht('Deactivate Repository');
$body = pht('Deactivate this repository?');
$body = pht(
'If you deactivate this repository, it will no longer be updated. '.
'Observation and mirroring will cease, and pushing and pulling will '.
'be disabled. You can reactivate the repository later.');
$submit = pht('Deactivate Repository');
} else {
$title = pht('Activate Repository');

View file

@ -208,6 +208,22 @@ final class DiffusionRepositoryEditEngine
$autoclose_value = $object->getDetail('close-commits-filter', array());
$autoclose_value = array_keys($autoclose_value);
$automation_instructions = pht(
"Configure **Repository Automation** to allow Phabricator to ".
"write to this repository.".
"\n\n".
"IMPORTANT: This feature is new, experimental, and not supported. ".
"Use it at your own risk.");
$staging_instructions = pht(
"To make it easier to run integration tests and builds on code ".
"under review, you can configure a **Staging Area**. When `arc` ".
"creates a diff, it will push a copy of the changes to the ".
"configured staging area with a corresponding tag.".
"\n\n".
"IMPORTANT: This feature is new, experimental, and not supported. ".
"Use it at your own risk.");
return array(
id(new PhabricatorSelectEditField())
->setKey('vcs')
@ -329,7 +345,8 @@ final class DiffusionRepositoryEditEngine
->setDescription(pht('Staging area URI.'))
->setConduitDescription(pht('Set the staging area URI.'))
->setConduitTypeDescription(pht('New staging area URI.'))
->setValue($object->getStagingURI()),
->setValue($object->getStagingURI())
->setControlInstructions($staging_instructions),
id(new PhabricatorDatasourceEditField())
->setKey('automationBlueprintPHIDs')
->setLabel(pht('Use Blueprints'))
@ -340,7 +357,8 @@ final class DiffusionRepositoryEditEngine
->setDescription(pht('Automation blueprints.'))
->setConduitDescription(pht('Change automation blueprints.'))
->setConduitTypeDescription(pht('New blueprint PHIDs.'))
->setValue($object->getAutomationBlueprintPHIDs()),
->setValue($object->getAutomationBlueprintPHIDs())
->setControlInstructions($automation_instructions),
id(new PhabricatorStringListEditField())
->setKey('symbolLanguages')
->setLabel(pht('Languages'))

View file

@ -105,6 +105,43 @@ final class DiffusionURIEditEngine
} else {
$is_builtin = false;
$uri_value = $object->getURI();
if ($object->getRepositoryPHID()) {
$repository = $object->getRepository();
if ($repository->isGit()) {
$uri_instructions = pht(
"Provide the URI of a Git repository. It should usually look ".
"like one of these examples:\n".
"\n".
"| Example Git URIs\n".
"| -----------------------\n".
"| `git@github.com:example/example.git`\n".
"| `ssh://user@host.com/git/example.git`\n".
"| `https://example.com/repository.git`");
} else if ($repository->isHg()) {
$uri_instructions = pht(
"Provide the URI of a Mercurial repository. It should usually ".
"look like one of these examples:\n".
"\n".
"| Example Mercurial URIs\n".
"|-----------------------\n".
"| `ssh://hg@bitbucket.org/example/repository`\n".
"| `https://bitbucket.org/example/repository`");
} else if ($repository->isSVN()) {
$uri_instructions = pht(
"Provide the **Repository Root** of a Subversion repository. ".
"You can identify this by running `svn info` in a working ".
"copy. It should usually look like one of these examples:\n".
"\n".
"| Example Subversion URIs\n".
"|-----------------------\n".
"| `http://svn.example.org/svnroot/`\n".
"| `svn+ssh://svn.example.com/svnroot/`\n".
"| `svn://svn.example.net/svnroot/`\n\n".
"You **MUST** specify the root of the repository, not a ".
"subdirectory.");
}
}
}
return array(

View file

@ -500,5 +500,14 @@ final class DiffusionRepositoryStatusManagementPanel
return $messages;
}
private function getEnvConfigLink() {
$config_href = '/config/edit/environment.append-paths/';
return phutil_tag(
'a',
array(
'href' => $config_href,
),
'environment.append-paths');
}
}

View file

@ -236,6 +236,49 @@ fetch from, serve from, and push to.
These options are covered in detail in @{article:Diffusion User Guide: URIs}.
Branches
========
The **Branches** panel allows you to configure how Phabricator interacts with
branches.
This panel is not available for Subversion repositories, because Subversion
does not have formal branches.
You can configure **Default Branch**. This controls which branch is shown by
default in the UI. If no branch is provided, Phabricator will use `master` in
Git and `default` in Mercurial.
If you want Diffusion to ignore some branches in the repository, you can
configure **Track Only**. Other branches will be ignored. If you do not specify
any branches, all branches are tracked.
When specifying branches, you should enter one branch name per line. You can
use regular expressions to match branches by wrapping an expression in
`regexp(...)`. For example:
| Example | Effect |
|---------|--------|
| `master` | Track only `master`.
| `regexp(/^release-/)` | Track all branches which start with `release-`.
| `regexp(/^(?!temp-)/)` | Do not track branches which start with `temp-`.
Actions
======
The **Actions** panel can configure notifications and publishing behavior.
Normally, Phabricator publishes notifications when it discovers new commits.
You can disable publishing for a repository by turning off **Publish/Noitfy**.
This will disable notifications, feed, and Herald (including audits and build
plans) for this repository.
When Phabricator discovers a new commit, it can automatically close associated
revisions and tasks. If you don't want Phabricator to close objects when it
discovers new commits, disable **Autoclose** for the repository.
Repository Identifiers and Names
================================