From 3bfa54819e458abc04d52ffebe221cadc60d0748 Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 30 Jan 2014 11:42:33 -0800 Subject: [PATCH] Use new "%R" escape for csprintf() to produce slightly nicer clone/checkout commands Summary: Fixes T4175. In cases where the arguments have only always-safe characters, we can produce a more human-readable URI. Test Plan: Looked at some repositories. Reviewers: btrahan, chad Reviewed By: chad CC: aran Maniphest Tasks: T4175 Differential Revision: https://secure.phabricator.com/D8100 --- .../diffusion/controller/DiffusionRepositoryController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/applications/diffusion/controller/DiffusionRepositoryController.php b/src/applications/diffusion/controller/DiffusionRepositoryController.php index a8fc14f4d6..95841e54bf 100644 --- a/src/applications/diffusion/controller/DiffusionRepositoryController.php +++ b/src/applications/diffusion/controller/DiffusionRepositoryController.php @@ -551,17 +551,17 @@ final class DiffusionRepositoryController extends DiffusionController { switch ($repository->getVersionControlSystem()) { case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT: $command = csprintf( - 'git clone %s', + 'git clone %R', $uri); break; case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL: $command = csprintf( - 'hg clone %s', + 'hg clone %R', $uri); break; case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN: $command = csprintf( - 'svn checkout %s %s', + 'svn checkout %R %R', $uri, $repository->getCloneName()); break;