mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-27 01:02:42 +01:00
Fix generation of "branch" URIs in Subversion repositories
Summary: "Branch" really means "repository main screen, with some branch selected", so a branch isn't actually required since we can just take you to the default. Fixes an issue where new crumbs would throw an exception in SVN repositories. Test Plan: Browed an SVN repo. Reviewers: btrahan, mbishopim3 Reviewed By: mbishopim3 CC: aran Differential Revision: https://secure.phabricator.com/D7099
This commit is contained in:
parent
b9778d89ca
commit
c71a5fc0c9
1 changed files with 5 additions and 6 deletions
|
@ -450,11 +450,6 @@ abstract class DiffusionRequest {
|
|||
"Diffusion URI action '{$action}' requires callsign!");
|
||||
}
|
||||
|
||||
if ($req_branch && !strlen($branch)) {
|
||||
throw new Exception(
|
||||
"Diffusion URI action '{$action}' requires branch!");
|
||||
}
|
||||
|
||||
if ($req_commit && !strlen($commit)) {
|
||||
throw new Exception(
|
||||
"Diffusion URI action '{$action}' requires commit!");
|
||||
|
@ -471,7 +466,11 @@ abstract class DiffusionRequest {
|
|||
$uri = "/diffusion/{$callsign}{$action}/{$path}{$commit}{$line}";
|
||||
break;
|
||||
case 'branch':
|
||||
if (strlen($path)) {
|
||||
$uri = "/diffusion/{$callsign}repository/{$path}";
|
||||
} else {
|
||||
$uri = "/diffusion/{$callsign}";
|
||||
}
|
||||
break;
|
||||
case 'external':
|
||||
$commit = ltrim($commit, ';');
|
||||
|
|
Loading…
Reference in a new issue