Produce a more tailored checkout URI for Subversion
Summary: For imported SVN repositories with an "Import Only" path, we produce a `/path/to/root/` URI, but should produce `/path/to/root/then/to/import/only/`. As it is, the URI instructs the user to check out the whole repository. Also, don't show the "Clone As" fragment in the URI for remote repositories, and prevent it from being edited for nonhosted repositories. This is generally more consistent with user expectation. Test Plan: - Created a remote SVN repository with "Import Only", saw path include it. - Verified no "Clone As" options, no "Clone As" in URI. - Switched it to hosted, saw "Clone As" options appear and work properly. Reviewers: btrahan Reviewed By: btrahan CC: aran, staticshock Differential Revision: https://secure.phabricator.com/D8375
This commit is contained in:
@@ -256,11 +256,13 @@ final class DiffusionRepositoryEditMainController
|
||||
|
||||
$clone_name = $repository->getDetail('clone-name');
|
||||
|
||||
$view->addProperty(
|
||||
pht('Clone/Checkout As'),
|
||||
$clone_name
|
||||
? $clone_name.'/'
|
||||
: phutil_tag('em', array(), $repository->getCloneName().'/'));
|
||||
if ($repository->isHosted()) {
|
||||
$view->addProperty(
|
||||
pht('Clone/Checkout As'),
|
||||
$clone_name
|
||||
? $clone_name.'/'
|
||||
: phutil_tag('em', array(), $repository->getCloneName().'/'));
|
||||
}
|
||||
|
||||
$project_phids = PhabricatorEdgeQuery::loadDestinationPHIDs(
|
||||
$repository->getPHID(),
|
||||
|
||||
Reference in New Issue
Block a user