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:
@@ -560,10 +560,16 @@ final class DiffusionRepositoryController extends DiffusionController {
|
||||
$uri);
|
||||
break;
|
||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN:
|
||||
$command = csprintf(
|
||||
'svn checkout %R %R',
|
||||
$uri,
|
||||
$repository->getCloneName());
|
||||
if ($repository->isHosted()) {
|
||||
$command = csprintf(
|
||||
'svn checkout %R %R',
|
||||
$uri,
|
||||
$repository->getCloneName());
|
||||
} else {
|
||||
$command = csprintf(
|
||||
'svn checkout %R',
|
||||
$uri);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user