Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/ssh/DiffusionSSHWorkflow.php
Show First 20 Lines • Show All 155 Lines • ▼ Show 20 Lines | final public function execute(PhutilArgumentParser $args) { | ||||
try { | try { | ||||
return $this->executeRepositoryOperations(); | return $this->executeRepositoryOperations(); | ||||
} catch (Exception $ex) { | } catch (Exception $ex) { | ||||
$this->writeError(get_class($ex).': '.$ex->getMessage()); | $this->writeError(get_class($ex).': '.$ex->getMessage()); | ||||
return 1; | return 1; | ||||
} | } | ||||
} | } | ||||
protected function loadRepositoryWithPath($path) { | protected function loadRepositoryWithPath($path, $vcs) { | ||||
$viewer = $this->getUser(); | $viewer = $this->getUser(); | ||||
$info = PhabricatorRepository::parseRepositoryServicePath($path); | $info = PhabricatorRepository::parseRepositoryServicePath($path, $vcs); | ||||
if ($info === null) { | if ($info === null) { | ||||
throw new Exception( | throw new Exception( | ||||
pht( | pht( | ||||
'Unrecognized repository path "%s". Expected a path like "%s" '. | 'Unrecognized repository path "%s". Expected a path like "%s", '. | ||||
'or "%s".', | '"%s", or "%s".', | ||||
$path, | $path, | ||||
'/diffusion/X/', | '/diffusion/X/', | ||||
'/diffusion/123/')); | '/diffusion/123/', | ||||
'/source/thaumaturgy.git')); | |||||
} | } | ||||
$identifier = $info['identifier']; | $identifier = $info['identifier']; | ||||
$base = $info['base']; | $base = $info['base']; | ||||
$this->baseRequestPath = $base; | $this->baseRequestPath = $base; | ||||
$repository = id(new PhabricatorRepositoryQuery()) | $repository = id(new PhabricatorRepositoryQuery()) | ||||
▲ Show 20 Lines • Show All 90 Lines • Show Last 20 Lines |