Add "Clone As" to repositories and generate full clone commands in UI
Summary: Ref T4175. - Add a configurable name for the clone-as directory, so you can have "Bits & Pieces" clone as "bits~n~pieces/" or simliar. - By default, use "reasonable" heruistics to choose such a name. - Generate a copy/pasteable clone commmand with this directory name. Test Plan: Looked at some repositories. Reviewers: btrahan, chad Reviewed By: chad CC: aran Maniphest Tasks: T4175 Differential Revision: https://secure.phabricator.com/D8097
This commit is contained in:
@@ -253,6 +253,15 @@ final class DiffusionRepositoryEditMainController
|
||||
$view->addProperty(pht('Type'), $type);
|
||||
$view->addProperty(pht('Callsign'), $repository->getCallsign());
|
||||
|
||||
|
||||
$clone_name = $repository->getDetail('clone-name');
|
||||
|
||||
$view->addProperty(
|
||||
pht('Clone/Checkout As'),
|
||||
$clone_name
|
||||
? $clone_name.'/'
|
||||
: phutil_tag('em', array(), $repository->getCloneName().'/'));
|
||||
|
||||
$project_phids = PhabricatorEdgeQuery::loadDestinationPHIDs(
|
||||
$repository->getPHID(),
|
||||
PhabricatorEdgeConfig::TYPE_OBJECT_HAS_PROJECT);
|
||||
|
||||
Reference in New Issue
Block a user