2011-02-12 18:26:15 -08:00
|
|
|
<?php
|
|
|
|
|
|
2012-03-09 15:46:25 -08:00
|
|
|
final class PhabricatorRepositoryEditController
|
2011-03-10 16:59:03 -08:00
|
|
|
extends PhabricatorRepositoryController {
|
2011-02-12 18:26:15 -08:00
|
|
|
|
|
|
|
|
private $id;
|
2011-03-06 22:29:22 -08:00
|
|
|
private $view;
|
|
|
|
|
private $repository;
|
|
|
|
|
private $sideNav;
|
2011-02-12 18:26:15 -08:00
|
|
|
|
|
|
|
|
public function willProcessRequest(array $data) {
|
2011-03-06 22:29:22 -08:00
|
|
|
$this->id = $data['id'];
|
|
|
|
|
$this->view = idx($data, 'view');
|
2011-02-12 18:26:15 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function processRequest() {
|
|
|
|
|
|
|
|
|
|
$request = $this->getRequest();
|
|
|
|
|
|
|
|
|
|
$repository = id(new PhabricatorRepository())->load($this->id);
|
|
|
|
|
if (!$repository) {
|
|
|
|
|
return new Aphront404Response();
|
|
|
|
|
}
|
|
|
|
|
|
2011-03-06 22:29:22 -08:00
|
|
|
$views = array(
|
|
|
|
|
'basic' => 'Basics',
|
|
|
|
|
'tracking' => 'Tracking',
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$this->repository = $repository;
|
|
|
|
|
|
|
|
|
|
if (!isset($views[$this->view])) {
|
Use head_key() and last_key() to explicitly communicate intent
Summary:
PHP arrays have an internal "current position" marker. (I think because foreach() wasn't introduced until PHP 4 and there was no way to get rid of it by then?)
A few functions affect the position of the marker, like reset(), end(), each(), next(), and prev(). A few functions read the position of the marker, like each(), next(), prev(), current() and key().
For the most part, no one uses any of this because foreach() is vastly easier and more natural. However, we sometimes want to select the first or last key from an array. Since key() returns the key //at the current position//, and you can't guarantee that no one will introduce some next() calls somewhere, the right way to do this is reset() + key(). This is cumbesome, so we introduced head_key() and last_key() (like head() and last()) in D2161.
Switch all the reset()/end() + key() (or omitted reset() since I was feeling like taking risks + key()) calls to head_key() or last_key().
Test Plan: Verified most of these by visiting the affected pages.
Reviewers: btrahan, vrana, jungejason, Koolvin
Reviewed By: jungejason
CC: aran
Differential Revision: https://secure.phabricator.com/D2169
2012-04-09 11:08:59 -07:00
|
|
|
$this->view = head_key($views);
|
2011-03-06 22:29:22 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$nav = new AphrontSideNavView();
|
|
|
|
|
foreach ($views as $view => $name) {
|
|
|
|
|
$nav->addNavItem(
|
|
|
|
|
phutil_render_tag(
|
|
|
|
|
'a',
|
|
|
|
|
array(
|
|
|
|
|
'class' => ($view == $this->view
|
|
|
|
|
? 'aphront-side-nav-selected'
|
|
|
|
|
: null),
|
|
|
|
|
'href' => '/repository/edit/'.$repository->getID().'/'.$view.'/',
|
|
|
|
|
),
|
|
|
|
|
phutil_escape_html($name)));
|
|
|
|
|
}
|
|
|
|
|
|
Use one daemon to discover commits in all repositories, not one per repository
Summary:
See D2418. This merges the commit discovery daemon into the same single daemon, and applies all the same rules to it.
There are relatively few implementation changes, but a few things did change:
- I simplified/improved Mercurial importing, by finding full branch tip hashes with "--debug branches" and using "parents --template {node}" so we don't need to do separate "--debug id" calls.
- Added a new "--not" flag to exclude repositories, since I switched to real arg parsing anyway.
- I removed a web UI notification that you need to restart the daemons, this is no longer true.
- I added a web UI notification that no pull daemon is running on the machine.
NOTE: @makinde, this doesn't change anything from your perspective, but it something breaks this is the likely cause.
This implicitly resolves T792, because discovery no longer runs before pulling.
Test Plan:
- Swapped databases to a fresh install.
- Ran "pulllocal" in debug mode. Verified it correctly does nothing (fixed a minor issue with min() on empty array).
- Added an SVN repository. Verified it cloned and discovered correctly.
- Added a Mercurial repository. Verified it cloned and discovered correctly.
- Added a Git repository. Verified it cloned and discovered correctly.
- Ran with arguments to verify behaviors: "--not MTEST --not STEST", "P --no-discovery", "P".
Reviewers: btrahan, csilvers, Makinde
Reviewed By: btrahan
CC: aran
Maniphest Tasks: T792
Differential Revision: https://secure.phabricator.com/D2430
2012-05-08 12:53:41 -07:00
|
|
|
$nav->appendChild($this->renderDaemonNotice());
|
|
|
|
|
|
2011-03-06 22:29:22 -08:00
|
|
|
$this->sideNav = $nav;
|
|
|
|
|
|
|
|
|
|
switch ($this->view) {
|
|
|
|
|
case 'basic':
|
|
|
|
|
return $this->processBasicRequest();
|
|
|
|
|
case 'tracking':
|
|
|
|
|
return $this->processTrackingRequest();
|
|
|
|
|
default:
|
|
|
|
|
throw new Exception("Unknown view.");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected function processBasicRequest() {
|
|
|
|
|
$request = $this->getRequest();
|
|
|
|
|
$user = $request->getUser();
|
|
|
|
|
$repository = $this->repository;
|
|
|
|
|
$repository_id = $repository->getID();
|
2011-02-12 18:26:15 -08:00
|
|
|
|
|
|
|
|
$errors = array();
|
|
|
|
|
|
2011-03-06 22:29:22 -08:00
|
|
|
$e_name = true;
|
|
|
|
|
|
2011-02-12 18:26:15 -08:00
|
|
|
if ($request->isFormPost()) {
|
|
|
|
|
$repository->setName($request->getStr('name'));
|
|
|
|
|
|
|
|
|
|
if (!strlen($repository->getName())) {
|
|
|
|
|
$e_name = 'Required';
|
|
|
|
|
$errors[] = 'Repository name is required.';
|
|
|
|
|
} else {
|
|
|
|
|
$e_name = null;
|
|
|
|
|
}
|
|
|
|
|
|
2011-04-01 17:11:05 -07:00
|
|
|
$repository->setDetail('description', $request->getStr('description'));
|
2011-10-28 08:04:57 -07:00
|
|
|
$repository->setDetail('encoding', $request->getStr('encoding'));
|
2011-04-01 17:11:05 -07:00
|
|
|
|
2011-02-12 18:26:15 -08:00
|
|
|
if (!$errors) {
|
|
|
|
|
$repository->save();
|
|
|
|
|
return id(new AphrontRedirectResponse())
|
2011-03-06 22:29:22 -08:00
|
|
|
->setURI('/repository/edit/'.$repository_id.'/basic/?saved=true');
|
2011-02-12 18:26:15 -08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$error_view = null;
|
|
|
|
|
if ($errors) {
|
|
|
|
|
$error_view = new AphrontErrorView();
|
|
|
|
|
$error_view->setErrors($errors);
|
|
|
|
|
$error_view->setTitle('Form Errors');
|
2011-03-06 22:29:22 -08:00
|
|
|
} else if ($request->getStr('saved')) {
|
|
|
|
|
$error_view = new AphrontErrorView();
|
|
|
|
|
$error_view->setSeverity(AphrontErrorView::SEVERITY_NOTICE);
|
|
|
|
|
$error_view->setTitle('Changes Saved');
|
|
|
|
|
$error_view->appendChild(
|
|
|
|
|
'Repository changes were saved.');
|
2011-02-12 18:26:15 -08:00
|
|
|
}
|
|
|
|
|
|
2011-10-28 08:04:57 -07:00
|
|
|
$encoding_doc_link = PhabricatorEnv::getDoclink(
|
2012-04-10 10:15:40 -07:00
|
|
|
'article/User_Guide_UTF-8_and_Character_Encoding.html');
|
2011-10-28 08:04:57 -07:00
|
|
|
|
2011-02-12 18:26:15 -08:00
|
|
|
$form = new AphrontFormView();
|
|
|
|
|
$form
|
|
|
|
|
->setUser($user)
|
|
|
|
|
->setAction('/repository/edit/'.$repository->getID().'/')
|
|
|
|
|
->appendChild(
|
|
|
|
|
id(new AphrontFormTextControl())
|
|
|
|
|
->setLabel('Name')
|
|
|
|
|
->setName('name')
|
|
|
|
|
->setValue($repository->getName())
|
|
|
|
|
->setError($e_name)
|
|
|
|
|
->setCaption('Human-readable repository name.'))
|
2011-04-01 17:11:05 -07:00
|
|
|
->appendChild(
|
|
|
|
|
id(new AphrontFormTextAreaControl())
|
|
|
|
|
->setLabel('Description')
|
|
|
|
|
->setName('description')
|
|
|
|
|
->setHeight(AphrontFormTextAreaControl::HEIGHT_VERY_SHORT)
|
|
|
|
|
->setValue($repository->getDetail('description')))
|
2011-02-12 18:26:15 -08:00
|
|
|
->appendChild(
|
|
|
|
|
id(new AphrontFormStaticControl())
|
|
|
|
|
->setLabel('Callsign')
|
|
|
|
|
->setName('callsign')
|
|
|
|
|
->setValue($repository->getCallsign()))
|
2011-10-28 08:04:57 -07:00
|
|
|
->appendChild('
|
|
|
|
|
<p class="aphront-form-instructions">'.
|
|
|
|
|
'If source code in this repository uses a character '.
|
|
|
|
|
'encoding other than UTF-8 (for example, ISO-8859-1), '.
|
|
|
|
|
'specify it here. You can usually leave this field blank. '.
|
|
|
|
|
'See User Guide: '.
|
|
|
|
|
'<a href="'.$encoding_doc_link.'">'.
|
|
|
|
|
'UTF-8 and Character Encoding'.
|
|
|
|
|
'</a> for more information.'.
|
|
|
|
|
'</p>')
|
|
|
|
|
->appendChild(
|
|
|
|
|
id(new AphrontFormTextControl())
|
|
|
|
|
->setLabel('Encoding')
|
|
|
|
|
->setName('encoding')
|
|
|
|
|
->setValue($repository->getDetail('encoding')))
|
2011-02-12 18:26:15 -08:00
|
|
|
->appendChild(
|
|
|
|
|
id(new AphrontFormStaticControl())
|
|
|
|
|
->setLabel('Type')
|
|
|
|
|
->setName('type')
|
2011-03-06 22:29:22 -08:00
|
|
|
->setValue($repository->getVersionControlSystem()))
|
2011-04-01 17:11:05 -07:00
|
|
|
->appendChild(
|
|
|
|
|
id(new AphrontFormStaticControl())
|
|
|
|
|
->setLabel('ID')
|
|
|
|
|
->setValue($repository->getID()))
|
2011-03-06 22:29:22 -08:00
|
|
|
->appendChild(
|
|
|
|
|
id(new AphrontFormStaticControl())
|
|
|
|
|
->setLabel('PHID')
|
|
|
|
|
->setValue($repository->getPHID()))
|
|
|
|
|
->appendChild(
|
|
|
|
|
id(new AphrontFormSubmitControl())
|
|
|
|
|
->setValue('Save'));
|
|
|
|
|
|
|
|
|
|
$panel = new AphrontPanelView();
|
|
|
|
|
$panel->setHeader('Edit Repository');
|
|
|
|
|
$panel->appendChild($form);
|
|
|
|
|
$panel->setWidth(AphrontPanelView::WIDTH_FORM);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$nav = $this->sideNav;
|
|
|
|
|
|
|
|
|
|
$nav->appendChild($error_view);
|
|
|
|
|
$nav->appendChild($panel);
|
|
|
|
|
|
|
|
|
|
return $this->buildStandardPageResponse(
|
|
|
|
|
$nav,
|
|
|
|
|
array(
|
|
|
|
|
'title' => 'Edit Repository',
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private function processTrackingRequest() {
|
|
|
|
|
$request = $this->getRequest();
|
|
|
|
|
$user = $request->getUser();
|
|
|
|
|
$repository = $this->repository;
|
|
|
|
|
$repository_id = $repository->getID();
|
|
|
|
|
|
|
|
|
|
$errors = array();
|
|
|
|
|
|
|
|
|
|
$e_uri = null;
|
|
|
|
|
$e_path = null;
|
|
|
|
|
|
2011-04-01 17:11:05 -07:00
|
|
|
$is_git = false;
|
|
|
|
|
$is_svn = false;
|
2011-08-09 12:47:46 -07:00
|
|
|
$is_mercurial = false;
|
2011-04-01 17:11:05 -07:00
|
|
|
|
2011-09-06 09:37:35 -07:00
|
|
|
$e_ssh_key = null;
|
|
|
|
|
$e_ssh_keyfile = null;
|
2011-12-22 12:24:12 -08:00
|
|
|
$e_branch = null;
|
2011-09-06 09:37:35 -07:00
|
|
|
|
2011-04-01 17:11:05 -07:00
|
|
|
switch ($repository->getVersionControlSystem()) {
|
|
|
|
|
case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT:
|
|
|
|
|
$is_git = true;
|
|
|
|
|
break;
|
|
|
|
|
case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN:
|
|
|
|
|
$is_svn = true;
|
|
|
|
|
break;
|
2011-08-09 12:47:46 -07:00
|
|
|
case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL:
|
|
|
|
|
$is_mercurial = true;
|
|
|
|
|
break;
|
2011-04-01 17:11:05 -07:00
|
|
|
default:
|
|
|
|
|
throw new Exception("Unsupported VCS!");
|
|
|
|
|
}
|
|
|
|
|
|
2011-08-09 12:47:46 -07:00
|
|
|
$has_branches = ($is_git || $is_mercurial);
|
|
|
|
|
$has_local = ($is_git || $is_mercurial);
|
Allow Git repositories to track only some branches
Summary:
Some installs use Git as the backbone of a CI framework or use a Git remote to
share patches. The tracker scripts currently recognize associated revisions as
"Committed" when they appear in any branch, even if that branch is
"alincoln-personal-development_test_hack" or whatever.
To address the broadest need here, allow Git repositories to be configured to
track only certain branches instead of all branches.
This doesn't allow you to import a branch into Diffusion but ignore it in
Differential. Supporting that is somewhat technically complicated because the
parser currently goes like this:
- Look at HEAD of all branches.
- For any commits we haven't seen before, follow them back to something we
have seen (or the root).
- "Discover" everything new.
Since this doesn't track <branch, commit> pairs, we currently don't have enough
information to tell when a commit appears in a branch for the first time, so we
don't have anywhere we can put a test for whether that branch is tracked and do
the Differential hook only if it is.
However, I think this cruder patch satisfies most of the need and is simple and
obvious in its implementation.
See also D1263.
Test Plan:
- Updated a Git repository with various filters: "", "master, remote", "derp",
" ,,, master ,,,,,"
- Edited SVN and Mercurial repositories to verify they didn't get caught in
the crossfire.
- Ran daemon in debug mode on libphutil with filter "derp", got exception
about no tracked branches. Ran with filter "master", got tracking. Ran with no
filter, got tracking.
- Looked at Diffusion with "derp" and "master", saw no branches and "master"
respectively.
- Added unit tests to cover filtering logic.
Reviewers: btrahan, jungejason, nh, fratrik
Reviewed By: fratrik
CC: aran, fratrik, epriestley
Maniphest Tasks: T270
Differential Revision: https://secure.phabricator.com/D1290
2011-12-29 09:14:55 -08:00
|
|
|
$has_branch_filter = ($is_git);
|
2012-05-23 12:37:43 -07:00
|
|
|
$has_auth_support = $is_svn;
|
2011-08-09 12:47:46 -07:00
|
|
|
|
2011-03-06 22:29:22 -08:00
|
|
|
if ($request->isFormPost()) {
|
|
|
|
|
$tracking = ($request->getStr('tracking') == 'enabled' ? true : false);
|
|
|
|
|
$repository->setDetail('tracking-enabled', $tracking);
|
|
|
|
|
$repository->setDetail('remote-uri', $request->getStr('uri'));
|
2011-08-09 12:47:46 -07:00
|
|
|
if ($has_local) {
|
Allow SVN repositories to import subdirectories instead of the entire repository
Summary:
See T325. While this is a touch hacky it ends up being fairly clean, and we can
now do initial imports much more quickly and this actually cleaned up some of
the code. I also made the repository edit interface a little less foreboding.
@tuomaspelkonen, did you get anywhere with that bug you were chasing down a
couple days ago? We can hold this if it throws a wrench into stuff you're
working on.
Test Plan:
- Imported a subdirectory of a midsized SVN project (jQuery UI).
- Commit discovery for ~3500/4500 commits took just a few seconds.
- Commit discovery correctly ignored commits which didn't affect this
directory.
- Commit discovery correctly stopped at commit 13.
- Browse interface shows an incomplete listing, but that's fine, and
everything is otherwise functionally correct. We can add a note or something
later ("this is a view of commits affecting a subdirectory, some paths aren't
available"), but this behavior probably won't be too startling to users.
- Edited Git and SVN repositories to test form logic.
Reviewed By: jungejason
Reviewers: tuomaspelkonen, jungejason, aran, Girish
Commenters: tuomaspelkonen
CC: jcleveley, aran, jungejason, tuomaspelkonen
Differential Revision: 696
2011-07-20 07:11:03 -07:00
|
|
|
$repository->setDetail('local-path', $request->getStr('path'));
|
|
|
|
|
}
|
Allow Git repositories to track only some branches
Summary:
Some installs use Git as the backbone of a CI framework or use a Git remote to
share patches. The tracker scripts currently recognize associated revisions as
"Committed" when they appear in any branch, even if that branch is
"alincoln-personal-development_test_hack" or whatever.
To address the broadest need here, allow Git repositories to be configured to
track only certain branches instead of all branches.
This doesn't allow you to import a branch into Diffusion but ignore it in
Differential. Supporting that is somewhat technically complicated because the
parser currently goes like this:
- Look at HEAD of all branches.
- For any commits we haven't seen before, follow them back to something we
have seen (or the root).
- "Discover" everything new.
Since this doesn't track <branch, commit> pairs, we currently don't have enough
information to tell when a commit appears in a branch for the first time, so we
don't have anywhere we can put a test for whether that branch is tracked and do
the Differential hook only if it is.
However, I think this cruder patch satisfies most of the need and is simple and
obvious in its implementation.
See also D1263.
Test Plan:
- Updated a Git repository with various filters: "", "master, remote", "derp",
" ,,, master ,,,,,"
- Edited SVN and Mercurial repositories to verify they didn't get caught in
the crossfire.
- Ran daemon in debug mode on libphutil with filter "derp", got exception
about no tracked branches. Ran with filter "master", got tracking. Ran with no
filter, got tracking.
- Looked at Diffusion with "derp" and "master", saw no branches and "master"
respectively.
- Added unit tests to cover filtering logic.
Reviewers: btrahan, jungejason, nh, fratrik
Reviewed By: fratrik
CC: aran, fratrik, epriestley
Maniphest Tasks: T270
Differential Revision: https://secure.phabricator.com/D1290
2011-12-29 09:14:55 -08:00
|
|
|
|
|
|
|
|
if ($has_branch_filter) {
|
|
|
|
|
$branch_filter = $request->getStrList('branch-filter');
|
|
|
|
|
$branch_filter = array_fill_keys($branch_filter, true);
|
|
|
|
|
|
|
|
|
|
$repository->setDetail('branch-filter', $branch_filter);
|
2012-06-14 12:32:22 -07:00
|
|
|
|
|
|
|
|
$close_commits_filter = $request->getStrList('close-commits-filter');
|
|
|
|
|
$close_commits_filter = array_fill_keys($close_commits_filter, true);
|
|
|
|
|
|
|
|
|
|
$repository->setDetail('close-commits-filter', $close_commits_filter);
|
Allow Git repositories to track only some branches
Summary:
Some installs use Git as the backbone of a CI framework or use a Git remote to
share patches. The tracker scripts currently recognize associated revisions as
"Committed" when they appear in any branch, even if that branch is
"alincoln-personal-development_test_hack" or whatever.
To address the broadest need here, allow Git repositories to be configured to
track only certain branches instead of all branches.
This doesn't allow you to import a branch into Diffusion but ignore it in
Differential. Supporting that is somewhat technically complicated because the
parser currently goes like this:
- Look at HEAD of all branches.
- For any commits we haven't seen before, follow them back to something we
have seen (or the root).
- "Discover" everything new.
Since this doesn't track <branch, commit> pairs, we currently don't have enough
information to tell when a commit appears in a branch for the first time, so we
don't have anywhere we can put a test for whether that branch is tracked and do
the Differential hook only if it is.
However, I think this cruder patch satisfies most of the need and is simple and
obvious in its implementation.
See also D1263.
Test Plan:
- Updated a Git repository with various filters: "", "master, remote", "derp",
" ,,, master ,,,,,"
- Edited SVN and Mercurial repositories to verify they didn't get caught in
the crossfire.
- Ran daemon in debug mode on libphutil with filter "derp", got exception
about no tracked branches. Ran with filter "master", got tracking. Ran with no
filter, got tracking.
- Looked at Diffusion with "derp" and "master", saw no branches and "master"
respectively.
- Added unit tests to cover filtering logic.
Reviewers: btrahan, jungejason, nh, fratrik
Reviewed By: fratrik
CC: aran, fratrik, epriestley
Maniphest Tasks: T270
Differential Revision: https://secure.phabricator.com/D1290
2011-12-29 09:14:55 -08:00
|
|
|
}
|
|
|
|
|
|
2012-05-10 14:18:56 -07:00
|
|
|
$repository->setDetail(
|
|
|
|
|
'disable-autoclose',
|
|
|
|
|
$request->getStr('autoclose') == 'disabled' ? true : false);
|
|
|
|
|
|
2011-03-06 22:29:22 -08:00
|
|
|
$repository->setDetail(
|
|
|
|
|
'pull-frequency',
|
|
|
|
|
max(1, $request->getInt('frequency')));
|
|
|
|
|
|
2011-08-09 12:47:46 -07:00
|
|
|
if ($has_branches) {
|
2011-04-01 17:11:05 -07:00
|
|
|
$repository->setDetail(
|
|
|
|
|
'default-branch',
|
|
|
|
|
$request->getStr('default-branch'));
|
2011-12-22 12:24:12 -08:00
|
|
|
if ($is_git) {
|
|
|
|
|
$branch_name = $repository->getDetail('default-branch');
|
|
|
|
|
if (strpos($branch_name, '/') !== false) {
|
|
|
|
|
$e_branch = 'Invalid';
|
|
|
|
|
$errors[] = "Your branch name should not specify an explicit ".
|
|
|
|
|
"remote. For instance, use 'master', not ".
|
|
|
|
|
"'origin/master'.";
|
|
|
|
|
}
|
|
|
|
|
}
|
2011-04-01 17:11:05 -07:00
|
|
|
}
|
|
|
|
|
|
2011-04-03 19:20:47 -07:00
|
|
|
$repository->setDetail(
|
|
|
|
|
'default-owners-path',
|
|
|
|
|
$request->getStr(
|
|
|
|
|
'default-owners-path',
|
|
|
|
|
'/'));
|
|
|
|
|
|
2011-09-02 17:20:14 -07:00
|
|
|
$repository->setDetail('ssh-login', $request->getStr('ssh-login'));
|
|
|
|
|
$repository->setDetail('ssh-key', $request->getStr('ssh-key'));
|
2011-09-06 09:37:35 -07:00
|
|
|
$repository->setDetail('ssh-keyfile', $request->getStr('ssh-keyfile'));
|
|
|
|
|
|
|
|
|
|
$repository->setDetail('http-login', $request->getStr('http-login'));
|
|
|
|
|
$repository->setDetail('http-pass', $request->getStr('http-pass'));
|
|
|
|
|
|
|
|
|
|
if ($repository->getDetail('ssh-key') &&
|
|
|
|
|
$repository->getDetail('ssh-keyfile')) {
|
|
|
|
|
$errors[] =
|
|
|
|
|
"Specify only one of 'SSH Private Key' and 'SSH Private Key File', ".
|
|
|
|
|
"not both.";
|
|
|
|
|
$e_ssh_key = 'Choose Only One';
|
|
|
|
|
$e_ssh_keyfile = 'Choose Only One';
|
|
|
|
|
}
|
2011-09-02 17:20:14 -07:00
|
|
|
|
2011-04-06 16:27:57 -07:00
|
|
|
$repository->setDetail(
|
|
|
|
|
'herald-disabled',
|
|
|
|
|
$request->getInt('herald-disabled', 0));
|
|
|
|
|
|
|
|
|
|
if ($is_svn) {
|
|
|
|
|
$repository->setUUID($request->getStr('uuid'));
|
Allow SVN repositories to import subdirectories instead of the entire repository
Summary:
See T325. While this is a touch hacky it ends up being fairly clean, and we can
now do initial imports much more quickly and this actually cleaned up some of
the code. I also made the repository edit interface a little less foreboding.
@tuomaspelkonen, did you get anywhere with that bug you were chasing down a
couple days ago? We can hold this if it throws a wrench into stuff you're
working on.
Test Plan:
- Imported a subdirectory of a midsized SVN project (jQuery UI).
- Commit discovery for ~3500/4500 commits took just a few seconds.
- Commit discovery correctly ignored commits which didn't affect this
directory.
- Commit discovery correctly stopped at commit 13.
- Browse interface shows an incomplete listing, but that's fine, and
everything is otherwise functionally correct. We can add a note or something
later ("this is a view of commits affecting a subdirectory, some paths aren't
available"), but this behavior probably won't be too startling to users.
- Edited Git and SVN repositories to test form logic.
Reviewed By: jungejason
Reviewers: tuomaspelkonen, jungejason, aran, Girish
Commenters: tuomaspelkonen
CC: jcleveley, aran, jungejason, tuomaspelkonen
Differential Revision: 696
2011-07-20 07:11:03 -07:00
|
|
|
$subpath = ltrim($request->getStr('svn-subpath'), '/');
|
|
|
|
|
if ($subpath) {
|
|
|
|
|
$subpath = rtrim($subpath, '/').'/';
|
|
|
|
|
}
|
|
|
|
|
$repository->setDetail('svn-subpath', $subpath);
|
2011-04-06 16:27:57 -07:00
|
|
|
}
|
|
|
|
|
|
2011-03-06 22:29:22 -08:00
|
|
|
if ($tracking) {
|
|
|
|
|
if (!$repository->getDetail('remote-uri')) {
|
|
|
|
|
$e_uri = 'Required';
|
|
|
|
|
$errors[] = "Repository URI is required.";
|
2011-05-18 10:06:35 -07:00
|
|
|
} else if ($is_svn &&
|
|
|
|
|
!preg_match('@/$@', $repository->getDetail('remote-uri'))) {
|
|
|
|
|
|
|
|
|
|
$e_uri = 'Invalid';
|
Allow SVN repositories to import subdirectories instead of the entire repository
Summary:
See T325. While this is a touch hacky it ends up being fairly clean, and we can
now do initial imports much more quickly and this actually cleaned up some of
the code. I also made the repository edit interface a little less foreboding.
@tuomaspelkonen, did you get anywhere with that bug you were chasing down a
couple days ago? We can hold this if it throws a wrench into stuff you're
working on.
Test Plan:
- Imported a subdirectory of a midsized SVN project (jQuery UI).
- Commit discovery for ~3500/4500 commits took just a few seconds.
- Commit discovery correctly ignored commits which didn't affect this
directory.
- Commit discovery correctly stopped at commit 13.
- Browse interface shows an incomplete listing, but that's fine, and
everything is otherwise functionally correct. We can add a note or something
later ("this is a view of commits affecting a subdirectory, some paths aren't
available"), but this behavior probably won't be too startling to users.
- Edited Git and SVN repositories to test form logic.
Reviewed By: jungejason
Reviewers: tuomaspelkonen, jungejason, aran, Girish
Commenters: tuomaspelkonen
CC: jcleveley, aran, jungejason, tuomaspelkonen
Differential Revision: 696
2011-07-20 07:11:03 -07:00
|
|
|
$errors[] = 'Subversion Repository Root must end in a slash ("/").';
|
2011-05-18 10:06:35 -07:00
|
|
|
} else {
|
|
|
|
|
$e_uri = null;
|
2011-03-06 22:29:22 -08:00
|
|
|
}
|
2011-05-18 10:06:35 -07:00
|
|
|
|
2011-08-09 12:47:46 -07:00
|
|
|
if ($has_local) {
|
Allow SVN repositories to import subdirectories instead of the entire repository
Summary:
See T325. While this is a touch hacky it ends up being fairly clean, and we can
now do initial imports much more quickly and this actually cleaned up some of
the code. I also made the repository edit interface a little less foreboding.
@tuomaspelkonen, did you get anywhere with that bug you were chasing down a
couple days ago? We can hold this if it throws a wrench into stuff you're
working on.
Test Plan:
- Imported a subdirectory of a midsized SVN project (jQuery UI).
- Commit discovery for ~3500/4500 commits took just a few seconds.
- Commit discovery correctly ignored commits which didn't affect this
directory.
- Commit discovery correctly stopped at commit 13.
- Browse interface shows an incomplete listing, but that's fine, and
everything is otherwise functionally correct. We can add a note or something
later ("this is a view of commits affecting a subdirectory, some paths aren't
available"), but this behavior probably won't be too startling to users.
- Edited Git and SVN repositories to test form logic.
Reviewed By: jungejason
Reviewers: tuomaspelkonen, jungejason, aran, Girish
Commenters: tuomaspelkonen
CC: jcleveley, aran, jungejason, tuomaspelkonen
Differential Revision: 696
2011-07-20 07:11:03 -07:00
|
|
|
if (!$repository->getDetail('local-path')) {
|
|
|
|
|
$e_path = 'Required';
|
|
|
|
|
$errors[] = "Local path is required.";
|
|
|
|
|
} else {
|
|
|
|
|
$e_path = null;
|
|
|
|
|
}
|
2011-03-06 22:29:22 -08:00
|
|
|
}
|
|
|
|
|
}
|
2011-02-12 18:26:15 -08:00
|
|
|
|
2011-03-06 22:29:22 -08:00
|
|
|
if (!$errors) {
|
|
|
|
|
$repository->save();
|
|
|
|
|
return id(new AphrontRedirectResponse())
|
|
|
|
|
->setURI('/repository/edit/'.$repository_id.'/tracking/?saved=true');
|
|
|
|
|
}
|
|
|
|
|
}
|
2011-02-12 18:26:15 -08:00
|
|
|
|
2011-03-06 22:29:22 -08:00
|
|
|
$error_view = null;
|
|
|
|
|
if ($errors) {
|
|
|
|
|
$error_view = new AphrontErrorView();
|
|
|
|
|
$error_view->setErrors($errors);
|
|
|
|
|
$error_view->setTitle('Form Errors');
|
|
|
|
|
} else if ($request->getStr('saved')) {
|
|
|
|
|
$error_view = new AphrontErrorView();
|
|
|
|
|
$error_view->setSeverity(AphrontErrorView::SEVERITY_NOTICE);
|
|
|
|
|
$error_view->setTitle('Changes Saved');
|
Use one daemon to discover commits in all repositories, not one per repository
Summary:
See D2418. This merges the commit discovery daemon into the same single daemon, and applies all the same rules to it.
There are relatively few implementation changes, but a few things did change:
- I simplified/improved Mercurial importing, by finding full branch tip hashes with "--debug branches" and using "parents --template {node}" so we don't need to do separate "--debug id" calls.
- Added a new "--not" flag to exclude repositories, since I switched to real arg parsing anyway.
- I removed a web UI notification that you need to restart the daemons, this is no longer true.
- I added a web UI notification that no pull daemon is running on the machine.
NOTE: @makinde, this doesn't change anything from your perspective, but it something breaks this is the likely cause.
This implicitly resolves T792, because discovery no longer runs before pulling.
Test Plan:
- Swapped databases to a fresh install.
- Ran "pulllocal" in debug mode. Verified it correctly does nothing (fixed a minor issue with min() on empty array).
- Added an SVN repository. Verified it cloned and discovered correctly.
- Added a Mercurial repository. Verified it cloned and discovered correctly.
- Added a Git repository. Verified it cloned and discovered correctly.
- Ran with arguments to verify behaviors: "--not MTEST --not STEST", "P --no-discovery", "P".
Reviewers: btrahan, csilvers, Makinde
Reviewed By: btrahan
CC: aran
Maniphest Tasks: T792
Differential Revision: https://secure.phabricator.com/D2430
2012-05-08 12:53:41 -07:00
|
|
|
$error_view->appendChild('Tracking changes were saved.');
|
2011-09-16 11:42:45 -07:00
|
|
|
} else if (!$repository->isTracked()) {
|
2011-08-09 12:47:46 -07:00
|
|
|
$error_view = new AphrontErrorView();
|
|
|
|
|
$error_view->setSeverity(AphrontErrorView::SEVERITY_WARNING);
|
|
|
|
|
$error_view->setTitle('Repository Not Tracked');
|
|
|
|
|
$error_view->appendChild(
|
|
|
|
|
'Tracking is currently "Disabled" for this repository, so it will '.
|
|
|
|
|
'not be imported into Phabricator. You can enable it below.');
|
2011-03-06 22:29:22 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch ($repository->getVersionControlSystem()) {
|
2011-04-01 17:11:05 -07:00
|
|
|
case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT:
|
|
|
|
|
$is_git = true;
|
2011-03-06 22:29:22 -08:00
|
|
|
break;
|
2011-04-01 17:11:05 -07:00
|
|
|
case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN:
|
|
|
|
|
$is_svn = true;
|
2011-03-06 22:29:22 -08:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
Allow SVN repositories to import subdirectories instead of the entire repository
Summary:
See T325. While this is a touch hacky it ends up being fairly clean, and we can
now do initial imports much more quickly and this actually cleaned up some of
the code. I also made the repository edit interface a little less foreboding.
@tuomaspelkonen, did you get anywhere with that bug you were chasing down a
couple days ago? We can hold this if it throws a wrench into stuff you're
working on.
Test Plan:
- Imported a subdirectory of a midsized SVN project (jQuery UI).
- Commit discovery for ~3500/4500 commits took just a few seconds.
- Commit discovery correctly ignored commits which didn't affect this
directory.
- Commit discovery correctly stopped at commit 13.
- Browse interface shows an incomplete listing, but that's fine, and
everything is otherwise functionally correct. We can add a note or something
later ("this is a view of commits affecting a subdirectory, some paths aren't
available"), but this behavior probably won't be too startling to users.
- Edited Git and SVN repositories to test form logic.
Reviewed By: jungejason
Reviewers: tuomaspelkonen, jungejason, aran, Girish
Commenters: tuomaspelkonen
CC: jcleveley, aran, jungejason, tuomaspelkonen
Differential Revision: 696
2011-07-20 07:11:03 -07:00
|
|
|
$doc_href = PhabricatorEnv::getDoclink('article/Diffusion_User_Guide.html');
|
|
|
|
|
$user_guide_link = phutil_render_tag(
|
|
|
|
|
'a',
|
|
|
|
|
array(
|
|
|
|
|
'href' => $doc_href,
|
|
|
|
|
),
|
|
|
|
|
'Diffusion User Guide');
|
|
|
|
|
|
2011-03-06 22:29:22 -08:00
|
|
|
$form = new AphrontFormView();
|
2011-02-12 18:26:15 -08:00
|
|
|
$form
|
2011-03-06 22:29:22 -08:00
|
|
|
->setUser($user)
|
|
|
|
|
->setAction('/repository/edit/'.$repository->getID().'/tracking/')
|
|
|
|
|
->appendChild(
|
|
|
|
|
'<p class="aphront-form-instructions">Phabricator can track '.
|
|
|
|
|
'repositories, importing commits as they happen and notifying '.
|
|
|
|
|
'Differential, Diffusion, Herald, and other services. To enable '.
|
|
|
|
|
'tracking for a repository, configure it here and then start (or '.
|
Allow SVN repositories to import subdirectories instead of the entire repository
Summary:
See T325. While this is a touch hacky it ends up being fairly clean, and we can
now do initial imports much more quickly and this actually cleaned up some of
the code. I also made the repository edit interface a little less foreboding.
@tuomaspelkonen, did you get anywhere with that bug you were chasing down a
couple days ago? We can hold this if it throws a wrench into stuff you're
working on.
Test Plan:
- Imported a subdirectory of a midsized SVN project (jQuery UI).
- Commit discovery for ~3500/4500 commits took just a few seconds.
- Commit discovery correctly ignored commits which didn't affect this
directory.
- Commit discovery correctly stopped at commit 13.
- Browse interface shows an incomplete listing, but that's fine, and
everything is otherwise functionally correct. We can add a note or something
later ("this is a view of commits affecting a subdirectory, some paths aren't
available"), but this behavior probably won't be too startling to users.
- Edited Git and SVN repositories to test form logic.
Reviewed By: jungejason
Reviewers: tuomaspelkonen, jungejason, aran, Girish
Commenters: tuomaspelkonen
CC: jcleveley, aran, jungejason, tuomaspelkonen
Differential Revision: 696
2011-07-20 07:11:03 -07:00
|
|
|
'restart) the daemons. More information is available in the '.
|
2011-09-02 17:20:14 -07:00
|
|
|
'<strong>'.$user_guide_link.'</strong>.</p>');
|
|
|
|
|
|
|
|
|
|
$form
|
|
|
|
|
->appendChild(
|
2012-03-15 17:10:19 -07:00
|
|
|
id(new AphrontFormInsetView())
|
|
|
|
|
->setTitle('Basics')
|
|
|
|
|
->appendChild(id(new AphrontFormStaticControl())
|
|
|
|
|
->setLabel('Repository Name')
|
|
|
|
|
->setValue($repository->getName()))
|
|
|
|
|
->appendChild(id(new AphrontFormSelectControl())
|
|
|
|
|
->setName('tracking')
|
|
|
|
|
->setLabel('Tracking')
|
|
|
|
|
->setOptions(array(
|
|
|
|
|
'disabled' => 'Disabled',
|
|
|
|
|
'enabled' => 'Enabled',
|
|
|
|
|
))
|
|
|
|
|
->setValue(
|
|
|
|
|
$repository->isTracked()
|
2011-03-06 22:29:22 -08:00
|
|
|
? 'enabled'
|
2012-03-15 17:10:19 -07:00
|
|
|
: 'disabled')));
|
2011-09-02 17:20:14 -07:00
|
|
|
|
2012-03-15 17:10:19 -07:00
|
|
|
$inset = new AphrontFormInsetView();
|
|
|
|
|
$inset->setTitle('Remote URI');
|
Allow SVN repositories to import subdirectories instead of the entire repository
Summary:
See T325. While this is a touch hacky it ends up being fairly clean, and we can
now do initial imports much more quickly and this actually cleaned up some of
the code. I also made the repository edit interface a little less foreboding.
@tuomaspelkonen, did you get anywhere with that bug you were chasing down a
couple days ago? We can hold this if it throws a wrench into stuff you're
working on.
Test Plan:
- Imported a subdirectory of a midsized SVN project (jQuery UI).
- Commit discovery for ~3500/4500 commits took just a few seconds.
- Commit discovery correctly ignored commits which didn't affect this
directory.
- Commit discovery correctly stopped at commit 13.
- Browse interface shows an incomplete listing, but that's fine, and
everything is otherwise functionally correct. We can add a note or something
later ("this is a view of commits affecting a subdirectory, some paths aren't
available"), but this behavior probably won't be too startling to users.
- Edited Git and SVN repositories to test form logic.
Reviewed By: jungejason
Reviewers: tuomaspelkonen, jungejason, aran, Girish
Commenters: tuomaspelkonen
CC: jcleveley, aran, jungejason, tuomaspelkonen
Differential Revision: 696
2011-07-20 07:11:03 -07:00
|
|
|
|
2011-08-09 12:47:46 -07:00
|
|
|
$clone_command = null;
|
|
|
|
|
$fetch_command = null;
|
Allow SVN repositories to import subdirectories instead of the entire repository
Summary:
See T325. While this is a touch hacky it ends up being fairly clean, and we can
now do initial imports much more quickly and this actually cleaned up some of
the code. I also made the repository edit interface a little less foreboding.
@tuomaspelkonen, did you get anywhere with that bug you were chasing down a
couple days ago? We can hold this if it throws a wrench into stuff you're
working on.
Test Plan:
- Imported a subdirectory of a midsized SVN project (jQuery UI).
- Commit discovery for ~3500/4500 commits took just a few seconds.
- Commit discovery correctly ignored commits which didn't affect this
directory.
- Commit discovery correctly stopped at commit 13.
- Browse interface shows an incomplete listing, but that's fine, and
everything is otherwise functionally correct. We can add a note or something
later ("this is a view of commits affecting a subdirectory, some paths aren't
available"), but this behavior probably won't be too startling to users.
- Edited Git and SVN repositories to test form logic.
Reviewed By: jungejason
Reviewers: tuomaspelkonen, jungejason, aran, Girish
Commenters: tuomaspelkonen
CC: jcleveley, aran, jungejason, tuomaspelkonen
Differential Revision: 696
2011-07-20 07:11:03 -07:00
|
|
|
if ($is_git) {
|
2011-08-09 12:47:46 -07:00
|
|
|
$clone_command = 'git clone';
|
|
|
|
|
$fetch_command = 'git fetch';
|
|
|
|
|
} else if ($is_mercurial) {
|
|
|
|
|
$clone_command = 'hg clone';
|
|
|
|
|
$fetch_command = 'hg pull';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$uri_label = 'Repository URI';
|
|
|
|
|
if ($has_local) {
|
|
|
|
|
if ($is_git) {
|
|
|
|
|
$instructions =
|
|
|
|
|
'Enter the URI to clone this repository from. It should look like '.
|
2011-10-12 11:36:43 -07:00
|
|
|
'<tt>git@github.com:example/example.git</tt>, '.
|
|
|
|
|
'<tt>ssh://user@host.com/git/example.git</tt>, or '.
|
|
|
|
|
'<tt>file:///local/path/to/repo</tt>';
|
2011-08-09 12:47:46 -07:00
|
|
|
} else if ($is_mercurial) {
|
|
|
|
|
$instructions =
|
|
|
|
|
'Enter the URI to clone this repository from. It should look '.
|
|
|
|
|
'something like <tt>ssh://user@host.com/hg/example</tt>';
|
|
|
|
|
}
|
2012-03-15 17:10:19 -07:00
|
|
|
$inset->appendChild(
|
Allow SVN repositories to import subdirectories instead of the entire repository
Summary:
See T325. While this is a touch hacky it ends up being fairly clean, and we can
now do initial imports much more quickly and this actually cleaned up some of
the code. I also made the repository edit interface a little less foreboding.
@tuomaspelkonen, did you get anywhere with that bug you were chasing down a
couple days ago? We can hold this if it throws a wrench into stuff you're
working on.
Test Plan:
- Imported a subdirectory of a midsized SVN project (jQuery UI).
- Commit discovery for ~3500/4500 commits took just a few seconds.
- Commit discovery correctly ignored commits which didn't affect this
directory.
- Commit discovery correctly stopped at commit 13.
- Browse interface shows an incomplete listing, but that's fine, and
everything is otherwise functionally correct. We can add a note or something
later ("this is a view of commits affecting a subdirectory, some paths aren't
available"), but this behavior probably won't be too startling to users.
- Edited Git and SVN repositories to test form logic.
Reviewed By: jungejason
Reviewers: tuomaspelkonen, jungejason, aran, Girish
Commenters: tuomaspelkonen
CC: jcleveley, aran, jungejason, tuomaspelkonen
Differential Revision: 696
2011-07-20 07:11:03 -07:00
|
|
|
'<p class="aphront-form-instructions">'.$instructions.'</p>');
|
|
|
|
|
} else if ($is_svn) {
|
|
|
|
|
$instructions =
|
|
|
|
|
'Enter the <strong>Repository Root</strong> for this SVN repository. '.
|
|
|
|
|
'You can figure this out by running <tt>svn info</tt> and looking at '.
|
|
|
|
|
'the value in the <tt>Repository Root</tt> field. It should be a URI '.
|
2012-05-23 12:37:43 -07:00
|
|
|
'and look like <tt>http://svn.example.org/svn/</tt>, '.
|
|
|
|
|
'<tt>svn+ssh://svn.example.com/svnroot/</tt>, or '.
|
|
|
|
|
'<tt>svn://svn.example.net/svn/</tt>';
|
2012-03-15 17:10:19 -07:00
|
|
|
$inset->appendChild(
|
Allow SVN repositories to import subdirectories instead of the entire repository
Summary:
See T325. While this is a touch hacky it ends up being fairly clean, and we can
now do initial imports much more quickly and this actually cleaned up some of
the code. I also made the repository edit interface a little less foreboding.
@tuomaspelkonen, did you get anywhere with that bug you were chasing down a
couple days ago? We can hold this if it throws a wrench into stuff you're
working on.
Test Plan:
- Imported a subdirectory of a midsized SVN project (jQuery UI).
- Commit discovery for ~3500/4500 commits took just a few seconds.
- Commit discovery correctly ignored commits which didn't affect this
directory.
- Commit discovery correctly stopped at commit 13.
- Browse interface shows an incomplete listing, but that's fine, and
everything is otherwise functionally correct. We can add a note or something
later ("this is a view of commits affecting a subdirectory, some paths aren't
available"), but this behavior probably won't be too startling to users.
- Edited Git and SVN repositories to test form logic.
Reviewed By: jungejason
Reviewers: tuomaspelkonen, jungejason, aran, Girish
Commenters: tuomaspelkonen
CC: jcleveley, aran, jungejason, tuomaspelkonen
Differential Revision: 696
2011-07-20 07:11:03 -07:00
|
|
|
'<p class="aphront-form-instructions">'.$instructions.'</p>');
|
|
|
|
|
$uri_label = 'Repository Root';
|
|
|
|
|
}
|
|
|
|
|
|
2012-03-15 17:10:19 -07:00
|
|
|
$inset
|
2011-03-06 22:29:22 -08:00
|
|
|
->appendChild(
|
|
|
|
|
id(new AphrontFormTextControl())
|
|
|
|
|
->setName('uri')
|
Allow SVN repositories to import subdirectories instead of the entire repository
Summary:
See T325. While this is a touch hacky it ends up being fairly clean, and we can
now do initial imports much more quickly and this actually cleaned up some of
the code. I also made the repository edit interface a little less foreboding.
@tuomaspelkonen, did you get anywhere with that bug you were chasing down a
couple days ago? We can hold this if it throws a wrench into stuff you're
working on.
Test Plan:
- Imported a subdirectory of a midsized SVN project (jQuery UI).
- Commit discovery for ~3500/4500 commits took just a few seconds.
- Commit discovery correctly ignored commits which didn't affect this
directory.
- Commit discovery correctly stopped at commit 13.
- Browse interface shows an incomplete listing, but that's fine, and
everything is otherwise functionally correct. We can add a note or something
later ("this is a view of commits affecting a subdirectory, some paths aren't
available"), but this behavior probably won't be too startling to users.
- Edited Git and SVN repositories to test form logic.
Reviewed By: jungejason
Reviewers: tuomaspelkonen, jungejason, aran, Girish
Commenters: tuomaspelkonen
CC: jcleveley, aran, jungejason, tuomaspelkonen
Differential Revision: 696
2011-07-20 07:11:03 -07:00
|
|
|
->setLabel($uri_label)
|
2011-09-02 17:20:14 -07:00
|
|
|
->setID('remote-uri')
|
2011-03-06 22:29:22 -08:00
|
|
|
->setValue($repository->getDetail('remote-uri'))
|
Allow SVN repositories to import subdirectories instead of the entire repository
Summary:
See T325. While this is a touch hacky it ends up being fairly clean, and we can
now do initial imports much more quickly and this actually cleaned up some of
the code. I also made the repository edit interface a little less foreboding.
@tuomaspelkonen, did you get anywhere with that bug you were chasing down a
couple days ago? We can hold this if it throws a wrench into stuff you're
working on.
Test Plan:
- Imported a subdirectory of a midsized SVN project (jQuery UI).
- Commit discovery for ~3500/4500 commits took just a few seconds.
- Commit discovery correctly ignored commits which didn't affect this
directory.
- Commit discovery correctly stopped at commit 13.
- Browse interface shows an incomplete listing, but that's fine, and
everything is otherwise functionally correct. We can add a note or something
later ("this is a view of commits affecting a subdirectory, some paths aren't
available"), but this behavior probably won't be too startling to users.
- Edited Git and SVN repositories to test form logic.
Reviewed By: jungejason
Reviewers: tuomaspelkonen, jungejason, aran, Girish
Commenters: tuomaspelkonen
CC: jcleveley, aran, jungejason, tuomaspelkonen
Differential Revision: 696
2011-07-20 07:11:03 -07:00
|
|
|
->setError($e_uri));
|
|
|
|
|
|
2012-03-15 17:10:19 -07:00
|
|
|
$inset->appendChild(
|
2011-09-02 17:20:14 -07:00
|
|
|
'<div class="aphront-form-instructions">'.
|
|
|
|
|
'If you want to connect to this repository over SSH, enter the '.
|
|
|
|
|
'username and private key to use. You can leave these fields blank if '.
|
2011-09-06 09:37:35 -07:00
|
|
|
'the repository does not use SSH.'.
|
2011-09-02 17:20:14 -07:00
|
|
|
'</div>');
|
|
|
|
|
|
2012-03-15 17:10:19 -07:00
|
|
|
$inset
|
2011-09-02 17:20:14 -07:00
|
|
|
->appendChild(
|
|
|
|
|
id(new AphrontFormTextControl())
|
|
|
|
|
->setName('ssh-login')
|
|
|
|
|
->setLabel('SSH User')
|
|
|
|
|
->setValue($repository->getDetail('ssh-login')))
|
|
|
|
|
->appendChild(
|
|
|
|
|
id(new AphrontFormTextAreaControl())
|
|
|
|
|
->setName('ssh-key')
|
|
|
|
|
->setLabel('SSH Private Key')
|
|
|
|
|
->setHeight(AphrontFormTextAreaControl::HEIGHT_VERY_SHORT)
|
2011-09-06 09:37:35 -07:00
|
|
|
->setValue($repository->getDetail('ssh-key'))
|
|
|
|
|
->setError($e_ssh_key)
|
|
|
|
|
->setCaption('Specify the entire private key, <em>or</em>...'))
|
2011-09-02 17:20:14 -07:00
|
|
|
->appendChild(
|
2011-09-06 09:37:35 -07:00
|
|
|
id(new AphrontFormTextControl())
|
|
|
|
|
->setName('ssh-keyfile')
|
|
|
|
|
->setLabel('SSH Private Key File')
|
|
|
|
|
->setValue($repository->getDetail('ssh-keyfile'))
|
|
|
|
|
->setError($e_ssh_keyfile)
|
|
|
|
|
->setCaption(
|
|
|
|
|
'...specify a path on disk where the daemon should '.
|
|
|
|
|
'look for a private key.'));
|
|
|
|
|
|
2012-05-23 12:37:43 -07:00
|
|
|
if ($has_auth_support) {
|
2012-03-15 17:10:19 -07:00
|
|
|
$inset
|
2011-09-06 09:37:35 -07:00
|
|
|
->appendChild(
|
|
|
|
|
'<div class="aphront-form-instructions">'.
|
2012-05-23 12:37:43 -07:00
|
|
|
'If you want to connect to this repository with a username and '.
|
|
|
|
|
'password, such as over HTTP Basic Auth or SVN with SASL, '.
|
2011-09-06 09:37:35 -07:00
|
|
|
'enter the username and password to use. You can leave these '.
|
2012-05-23 12:37:43 -07:00
|
|
|
'fields blank if the repository does not use a username and '.
|
|
|
|
|
'password for authentication.'.
|
2011-09-06 09:37:35 -07:00
|
|
|
'</div>')
|
|
|
|
|
->appendChild(
|
|
|
|
|
id(new AphrontFormTextControl())
|
|
|
|
|
->setName('http-login')
|
2012-05-23 12:37:43 -07:00
|
|
|
->setLabel('Username')
|
2011-09-06 09:37:35 -07:00
|
|
|
->setValue($repository->getDetail('http-login')))
|
|
|
|
|
->appendChild(
|
2011-09-08 14:34:16 -07:00
|
|
|
id(new AphrontFormPasswordControl())
|
2011-09-06 09:37:35 -07:00
|
|
|
->setName('http-pass')
|
2012-05-23 12:37:43 -07:00
|
|
|
->setLabel('Password')
|
2011-09-06 09:37:35 -07:00
|
|
|
->setValue($repository->getDetail('http-pass')));
|
|
|
|
|
}
|
|
|
|
|
|
2012-03-15 17:10:19 -07:00
|
|
|
$inset
|
2011-09-06 09:37:35 -07:00
|
|
|
->appendChild(
|
|
|
|
|
'<div class="aphront-form-important">'.
|
|
|
|
|
'To test your authentication configuration, <strong>save this '.
|
|
|
|
|
'form</strong> and then run this script:'.
|
|
|
|
|
'<code>'.
|
|
|
|
|
'phabricator/ $ ./scripts/repository/test_connection.php '.
|
|
|
|
|
phutil_escape_html($repository->getCallsign()).
|
|
|
|
|
'</code>'.
|
|
|
|
|
'This will verify that your configuration is correct and the '.
|
|
|
|
|
'daemons can connect to the remote repository and pull changes '.
|
|
|
|
|
'from it.'.
|
|
|
|
|
'</div>');
|
2011-09-02 17:20:14 -07:00
|
|
|
|
2012-03-15 17:10:19 -07:00
|
|
|
$form->appendChild($inset);
|
2011-09-02 17:20:14 -07:00
|
|
|
|
2012-03-15 17:10:19 -07:00
|
|
|
$inset = new AphrontFormInsetView();
|
|
|
|
|
$inset->setTitle('Repository Information');
|
2011-09-02 17:20:14 -07:00
|
|
|
|
2011-08-09 12:47:46 -07:00
|
|
|
if ($has_local) {
|
2012-03-15 17:10:19 -07:00
|
|
|
$inset->appendChild(
|
Allow SVN repositories to import subdirectories instead of the entire repository
Summary:
See T325. While this is a touch hacky it ends up being fairly clean, and we can
now do initial imports much more quickly and this actually cleaned up some of
the code. I also made the repository edit interface a little less foreboding.
@tuomaspelkonen, did you get anywhere with that bug you were chasing down a
couple days ago? We can hold this if it throws a wrench into stuff you're
working on.
Test Plan:
- Imported a subdirectory of a midsized SVN project (jQuery UI).
- Commit discovery for ~3500/4500 commits took just a few seconds.
- Commit discovery correctly ignored commits which didn't affect this
directory.
- Commit discovery correctly stopped at commit 13.
- Browse interface shows an incomplete listing, but that's fine, and
everything is otherwise functionally correct. We can add a note or something
later ("this is a view of commits affecting a subdirectory, some paths aren't
available"), but this behavior probably won't be too startling to users.
- Edited Git and SVN repositories to test form logic.
Reviewed By: jungejason
Reviewers: tuomaspelkonen, jungejason, aran, Girish
Commenters: tuomaspelkonen
CC: jcleveley, aran, jungejason, tuomaspelkonen
Differential Revision: 696
2011-07-20 07:11:03 -07:00
|
|
|
'<p class="aphront-form-instructions">Select a path on local disk '.
|
2011-08-09 12:47:46 -07:00
|
|
|
'which the daemons should <tt>'.$clone_command.'</tt> the repository '.
|
|
|
|
|
'into. This must be readable and writable by the daemons, and '.
|
|
|
|
|
'readable by the webserver. The daemons will <tt>'.$fetch_command.
|
|
|
|
|
'</tt> and keep this repository up to date.</p>');
|
2012-03-15 17:10:19 -07:00
|
|
|
$inset->appendChild(
|
2011-03-06 22:29:22 -08:00
|
|
|
id(new AphrontFormTextControl())
|
|
|
|
|
->setName('path')
|
|
|
|
|
->setLabel('Local Path')
|
|
|
|
|
->setValue($repository->getDetail('local-path'))
|
Allow SVN repositories to import subdirectories instead of the entire repository
Summary:
See T325. While this is a touch hacky it ends up being fairly clean, and we can
now do initial imports much more quickly and this actually cleaned up some of
the code. I also made the repository edit interface a little less foreboding.
@tuomaspelkonen, did you get anywhere with that bug you were chasing down a
couple days ago? We can hold this if it throws a wrench into stuff you're
working on.
Test Plan:
- Imported a subdirectory of a midsized SVN project (jQuery UI).
- Commit discovery for ~3500/4500 commits took just a few seconds.
- Commit discovery correctly ignored commits which didn't affect this
directory.
- Commit discovery correctly stopped at commit 13.
- Browse interface shows an incomplete listing, but that's fine, and
everything is otherwise functionally correct. We can add a note or something
later ("this is a view of commits affecting a subdirectory, some paths aren't
available"), but this behavior probably won't be too startling to users.
- Edited Git and SVN repositories to test form logic.
Reviewed By: jungejason
Reviewers: tuomaspelkonen, jungejason, aran, Girish
Commenters: tuomaspelkonen
CC: jcleveley, aran, jungejason, tuomaspelkonen
Differential Revision: 696
2011-07-20 07:11:03 -07:00
|
|
|
->setError($e_path));
|
|
|
|
|
} else if ($is_svn) {
|
2012-03-15 17:10:19 -07:00
|
|
|
$inset->appendChild(
|
Allow SVN repositories to import subdirectories instead of the entire repository
Summary:
See T325. While this is a touch hacky it ends up being fairly clean, and we can
now do initial imports much more quickly and this actually cleaned up some of
the code. I also made the repository edit interface a little less foreboding.
@tuomaspelkonen, did you get anywhere with that bug you were chasing down a
couple days ago? We can hold this if it throws a wrench into stuff you're
working on.
Test Plan:
- Imported a subdirectory of a midsized SVN project (jQuery UI).
- Commit discovery for ~3500/4500 commits took just a few seconds.
- Commit discovery correctly ignored commits which didn't affect this
directory.
- Commit discovery correctly stopped at commit 13.
- Browse interface shows an incomplete listing, but that's fine, and
everything is otherwise functionally correct. We can add a note or something
later ("this is a view of commits affecting a subdirectory, some paths aren't
available"), but this behavior probably won't be too startling to users.
- Edited Git and SVN repositories to test form logic.
Reviewed By: jungejason
Reviewers: tuomaspelkonen, jungejason, aran, Girish
Commenters: tuomaspelkonen
CC: jcleveley, aran, jungejason, tuomaspelkonen
Differential Revision: 696
2011-07-20 07:11:03 -07:00
|
|
|
'<p class="aphront-form-instructions">If you only want to parse one '.
|
|
|
|
|
'subpath of the repository, specify it here, relative to the '.
|
|
|
|
|
'repository root (e.g., <tt>trunk/</tt> or <tt>projects/wheel/</tt>). '.
|
|
|
|
|
'If you want to parse multiple subdirectories, create a separate '.
|
|
|
|
|
'Phabricator repository for each one.</p>');
|
2012-03-15 17:10:19 -07:00
|
|
|
$inset->appendChild(
|
Allow SVN repositories to import subdirectories instead of the entire repository
Summary:
See T325. While this is a touch hacky it ends up being fairly clean, and we can
now do initial imports much more quickly and this actually cleaned up some of
the code. I also made the repository edit interface a little less foreboding.
@tuomaspelkonen, did you get anywhere with that bug you were chasing down a
couple days ago? We can hold this if it throws a wrench into stuff you're
working on.
Test Plan:
- Imported a subdirectory of a midsized SVN project (jQuery UI).
- Commit discovery for ~3500/4500 commits took just a few seconds.
- Commit discovery correctly ignored commits which didn't affect this
directory.
- Commit discovery correctly stopped at commit 13.
- Browse interface shows an incomplete listing, but that's fine, and
everything is otherwise functionally correct. We can add a note or something
later ("this is a view of commits affecting a subdirectory, some paths aren't
available"), but this behavior probably won't be too startling to users.
- Edited Git and SVN repositories to test form logic.
Reviewed By: jungejason
Reviewers: tuomaspelkonen, jungejason, aran, Girish
Commenters: tuomaspelkonen
CC: jcleveley, aran, jungejason, tuomaspelkonen
Differential Revision: 696
2011-07-20 07:11:03 -07:00
|
|
|
id(new AphrontFormTextControl())
|
|
|
|
|
->setName('svn-subpath')
|
|
|
|
|
->setLabel('Subpath')
|
|
|
|
|
->setValue($repository->getDetail('svn-subpath'))
|
|
|
|
|
->setError($e_path));
|
|
|
|
|
}
|
|
|
|
|
|
Allow Git repositories to track only some branches
Summary:
Some installs use Git as the backbone of a CI framework or use a Git remote to
share patches. The tracker scripts currently recognize associated revisions as
"Committed" when they appear in any branch, even if that branch is
"alincoln-personal-development_test_hack" or whatever.
To address the broadest need here, allow Git repositories to be configured to
track only certain branches instead of all branches.
This doesn't allow you to import a branch into Diffusion but ignore it in
Differential. Supporting that is somewhat technically complicated because the
parser currently goes like this:
- Look at HEAD of all branches.
- For any commits we haven't seen before, follow them back to something we
have seen (or the root).
- "Discover" everything new.
Since this doesn't track <branch, commit> pairs, we currently don't have enough
information to tell when a commit appears in a branch for the first time, so we
don't have anywhere we can put a test for whether that branch is tracked and do
the Differential hook only if it is.
However, I think this cruder patch satisfies most of the need and is simple and
obvious in its implementation.
See also D1263.
Test Plan:
- Updated a Git repository with various filters: "", "master, remote", "derp",
" ,,, master ,,,,,"
- Edited SVN and Mercurial repositories to verify they didn't get caught in
the crossfire.
- Ran daemon in debug mode on libphutil with filter "derp", got exception
about no tracked branches. Ran with filter "master", got tracking. Ran with no
filter, got tracking.
- Looked at Diffusion with "derp" and "master", saw no branches and "master"
respectively.
- Added unit tests to cover filtering logic.
Reviewers: btrahan, jungejason, nh, fratrik
Reviewed By: fratrik
CC: aran, fratrik, epriestley
Maniphest Tasks: T270
Differential Revision: https://secure.phabricator.com/D1290
2011-12-29 09:14:55 -08:00
|
|
|
if ($has_branch_filter) {
|
|
|
|
|
$branch_filter_str = implode(
|
|
|
|
|
', ',
|
|
|
|
|
array_keys($repository->getDetail('branch-filter', array())));
|
2012-03-15 17:10:19 -07:00
|
|
|
$inset
|
Allow Git repositories to track only some branches
Summary:
Some installs use Git as the backbone of a CI framework or use a Git remote to
share patches. The tracker scripts currently recognize associated revisions as
"Committed" when they appear in any branch, even if that branch is
"alincoln-personal-development_test_hack" or whatever.
To address the broadest need here, allow Git repositories to be configured to
track only certain branches instead of all branches.
This doesn't allow you to import a branch into Diffusion but ignore it in
Differential. Supporting that is somewhat technically complicated because the
parser currently goes like this:
- Look at HEAD of all branches.
- For any commits we haven't seen before, follow them back to something we
have seen (or the root).
- "Discover" everything new.
Since this doesn't track <branch, commit> pairs, we currently don't have enough
information to tell when a commit appears in a branch for the first time, so we
don't have anywhere we can put a test for whether that branch is tracked and do
the Differential hook only if it is.
However, I think this cruder patch satisfies most of the need and is simple and
obvious in its implementation.
See also D1263.
Test Plan:
- Updated a Git repository with various filters: "", "master, remote", "derp",
" ,,, master ,,,,,"
- Edited SVN and Mercurial repositories to verify they didn't get caught in
the crossfire.
- Ran daemon in debug mode on libphutil with filter "derp", got exception
about no tracked branches. Ran with filter "master", got tracking. Ran with no
filter, got tracking.
- Looked at Diffusion with "derp" and "master", saw no branches and "master"
respectively.
- Added unit tests to cover filtering logic.
Reviewers: btrahan, jungejason, nh, fratrik
Reviewed By: fratrik
CC: aran, fratrik, epriestley
Maniphest Tasks: T270
Differential Revision: https://secure.phabricator.com/D1290
2011-12-29 09:14:55 -08:00
|
|
|
->appendChild(
|
|
|
|
|
id(new AphrontFormTextControl())
|
|
|
|
|
->setName('branch-filter')
|
|
|
|
|
->setLabel('Track Only')
|
|
|
|
|
->setValue($branch_filter_str)
|
|
|
|
|
->setCaption(
|
|
|
|
|
'Optional list of branches to track. Other branches will be '.
|
|
|
|
|
'completely ignored. If left empty, all branches are tracked. '.
|
|
|
|
|
'Example: <tt>master, release</tt>'));
|
|
|
|
|
}
|
|
|
|
|
|
2012-03-15 17:10:19 -07:00
|
|
|
$inset
|
2011-03-06 22:29:22 -08:00
|
|
|
->appendChild(
|
|
|
|
|
id(new AphrontFormTextControl())
|
|
|
|
|
->setName('frequency')
|
|
|
|
|
->setLabel('Pull Frequency')
|
|
|
|
|
->setValue($repository->getDetail('pull-frequency', 15))
|
|
|
|
|
->setCaption(
|
|
|
|
|
'Number of seconds daemon should sleep between requests. Larger '.
|
2011-04-01 17:11:05 -07:00
|
|
|
'numbers reduce load but also decrease responsiveness.'));
|
|
|
|
|
|
2012-03-15 17:10:19 -07:00
|
|
|
$form->appendChild($inset);
|
2011-09-02 17:20:14 -07:00
|
|
|
|
2012-03-15 17:10:19 -07:00
|
|
|
$inset = new AphrontFormInsetView();
|
|
|
|
|
$inset->setTitle('Application Configuration');
|
2011-09-02 17:20:14 -07:00
|
|
|
|
2011-08-09 12:47:46 -07:00
|
|
|
if ($has_branches) {
|
2012-03-15 17:10:19 -07:00
|
|
|
$inset
|
2011-04-01 17:11:05 -07:00
|
|
|
->appendChild(
|
|
|
|
|
id(new AphrontFormTextControl())
|
|
|
|
|
->setName('default-branch')
|
|
|
|
|
->setLabel('Default Branch')
|
2012-05-20 14:50:43 -07:00
|
|
|
->setValue($repository->getDefaultBranch())
|
2011-12-22 12:24:12 -08:00
|
|
|
->setError($e_branch)
|
2011-04-01 17:11:05 -07:00
|
|
|
->setCaption(
|
Allow Git repositories to track only some branches
Summary:
Some installs use Git as the backbone of a CI framework or use a Git remote to
share patches. The tracker scripts currently recognize associated revisions as
"Committed" when they appear in any branch, even if that branch is
"alincoln-personal-development_test_hack" or whatever.
To address the broadest need here, allow Git repositories to be configured to
track only certain branches instead of all branches.
This doesn't allow you to import a branch into Diffusion but ignore it in
Differential. Supporting that is somewhat technically complicated because the
parser currently goes like this:
- Look at HEAD of all branches.
- For any commits we haven't seen before, follow them back to something we
have seen (or the root).
- "Discover" everything new.
Since this doesn't track <branch, commit> pairs, we currently don't have enough
information to tell when a commit appears in a branch for the first time, so we
don't have anywhere we can put a test for whether that branch is tracked and do
the Differential hook only if it is.
However, I think this cruder patch satisfies most of the need and is simple and
obvious in its implementation.
See also D1263.
Test Plan:
- Updated a Git repository with various filters: "", "master, remote", "derp",
" ,,, master ,,,,,"
- Edited SVN and Mercurial repositories to verify they didn't get caught in
the crossfire.
- Ran daemon in debug mode on libphutil with filter "derp", got exception
about no tracked branches. Ran with filter "master", got tracking. Ran with no
filter, got tracking.
- Looked at Diffusion with "derp" and "master", saw no branches and "master"
respectively.
- Added unit tests to cover filtering logic.
Reviewers: btrahan, jungejason, nh, fratrik
Reviewed By: fratrik
CC: aran, fratrik, epriestley
Maniphest Tasks: T270
Differential Revision: https://secure.phabricator.com/D1290
2011-12-29 09:14:55 -08:00
|
|
|
'Default branch to show in Diffusion.'));
|
2011-04-01 17:11:05 -07:00
|
|
|
}
|
|
|
|
|
|
2012-05-10 14:18:56 -07:00
|
|
|
$inset
|
|
|
|
|
->appendChild(id(new AphrontFormSelectControl())
|
|
|
|
|
->setName('autoclose')
|
|
|
|
|
->setLabel('Autoclose')
|
|
|
|
|
->setOptions(array(
|
|
|
|
|
'enabled' => 'Enabled: Automatically Close Pushed Revisions',
|
|
|
|
|
'disabled' => 'Disabled: Ignore Pushed Revisions',
|
|
|
|
|
))
|
|
|
|
|
->setCaption(
|
2012-06-14 12:32:22 -07:00
|
|
|
"Automatically close Differential revisions when associated commits ".
|
|
|
|
|
"are pushed to this repository.")
|
2012-05-10 14:18:56 -07:00
|
|
|
->setValue(
|
|
|
|
|
$repository->getDetail('disable-autoclose', false)
|
|
|
|
|
? 'disabled'
|
|
|
|
|
: 'enabled'));
|
|
|
|
|
|
2012-06-14 12:32:22 -07:00
|
|
|
if ($has_branch_filter) {
|
|
|
|
|
$close_commits_filter_str = implode(
|
|
|
|
|
', ',
|
|
|
|
|
array_keys($repository->getDetail('close-commits-filter', array())));
|
|
|
|
|
$inset
|
|
|
|
|
->appendChild(
|
|
|
|
|
id(new AphrontFormTextControl())
|
|
|
|
|
->setName('close-commits-filter')
|
|
|
|
|
->setLabel('Autoclose Branches')
|
|
|
|
|
->setValue($close_commits_filter_str)
|
|
|
|
|
->setCaption(
|
|
|
|
|
'Optional list of branches which can trigger autoclose. '.
|
|
|
|
|
'If left empty, all branches trigger autoclose.'));
|
|
|
|
|
}
|
|
|
|
|
|
2012-03-15 17:10:19 -07:00
|
|
|
$inset
|
2011-04-03 19:20:47 -07:00
|
|
|
->appendChild(
|
|
|
|
|
id(new AphrontFormTextControl())
|
|
|
|
|
->setName('default-owners-path')
|
|
|
|
|
->setLabel('Default Owners Path')
|
|
|
|
|
->setValue(
|
|
|
|
|
$repository->getDetail(
|
|
|
|
|
'default-owners-path',
|
|
|
|
|
'/'))
|
|
|
|
|
->setCaption('Default path in Owners tool.'));
|
|
|
|
|
|
2012-03-15 17:10:19 -07:00
|
|
|
$inset
|
2011-04-06 16:27:57 -07:00
|
|
|
->appendChild(
|
|
|
|
|
id(new AphrontFormSelectControl())
|
|
|
|
|
->setName('herald-disabled')
|
2012-06-20 06:03:44 -07:00
|
|
|
->setLabel('Herald/Feed Enabled')
|
2011-04-06 16:27:57 -07:00
|
|
|
->setValue($repository->getDetail('herald-disabled', 0))
|
|
|
|
|
->setOptions(
|
|
|
|
|
array(
|
2012-06-20 06:03:44 -07:00
|
|
|
0 => 'Enabled - Send Email and Publish Stories',
|
|
|
|
|
1 => 'Disabled - Do Not Send Email or Publish Stories',
|
2011-04-06 16:27:57 -07:00
|
|
|
))
|
|
|
|
|
->setCaption(
|
2012-06-20 06:03:44 -07:00
|
|
|
'You can disable Herald commit notifications and feed stories '.
|
|
|
|
|
'for this repository. This can be useful when initially importing '.
|
|
|
|
|
'a repository. Feed stories are never published about commits '.
|
|
|
|
|
'that are more than 24 hours old.'));
|
2011-04-06 16:27:57 -07:00
|
|
|
|
|
|
|
|
if ($is_svn) {
|
2012-03-15 17:10:19 -07:00
|
|
|
$inset
|
2011-04-06 16:27:57 -07:00
|
|
|
->appendChild(
|
|
|
|
|
id(new AphrontFormTextControl())
|
|
|
|
|
->setName('uuid')
|
|
|
|
|
->setLabel('UUID')
|
|
|
|
|
->setValue($repository->getUUID())
|
|
|
|
|
->setCaption('Repository UUID from <tt>svn info</tt>.'));
|
|
|
|
|
}
|
|
|
|
|
|
2012-03-15 17:10:19 -07:00
|
|
|
$form->appendChild($inset);
|
2011-09-02 17:20:14 -07:00
|
|
|
|
2011-04-06 16:27:57 -07:00
|
|
|
$form
|
2011-02-12 18:26:15 -08:00
|
|
|
->appendChild(
|
|
|
|
|
id(new AphrontFormSubmitControl())
|
2011-09-02 17:20:14 -07:00
|
|
|
->setValue('Save Configuration'));
|
2011-02-12 18:26:15 -08:00
|
|
|
|
|
|
|
|
$panel = new AphrontPanelView();
|
2011-03-06 22:29:22 -08:00
|
|
|
$panel->setHeader('Repository Tracking');
|
2011-02-12 18:26:15 -08:00
|
|
|
$panel->appendChild($form);
|
2011-04-01 17:11:05 -07:00
|
|
|
$panel->setWidth(AphrontPanelView::WIDTH_WIDE);
|
2011-02-12 18:26:15 -08:00
|
|
|
|
2011-03-06 22:29:22 -08:00
|
|
|
$nav = $this->sideNav;
|
|
|
|
|
$nav->appendChild($error_view);
|
|
|
|
|
$nav->appendChild($panel);
|
|
|
|
|
|
|
|
|
|
return $this->buildStandardPageResponse(
|
|
|
|
|
$nav,
|
|
|
|
|
array(
|
|
|
|
|
'title' => 'Edit Repository Tracking',
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
|
2011-02-12 18:26:15 -08:00
|
|
|
}
|