1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-30 10:42:41 +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:
epriestley 2013-09-24 05:44:02 -07:00
parent b9778d89ca
commit c71a5fc0c9

View file

@ -450,11 +450,6 @@ abstract class DiffusionRequest {
"Diffusion URI action '{$action}' requires callsign!"); "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)) { if ($req_commit && !strlen($commit)) {
throw new Exception( throw new Exception(
"Diffusion URI action '{$action}' requires commit!"); "Diffusion URI action '{$action}' requires commit!");
@ -471,7 +466,11 @@ abstract class DiffusionRequest {
$uri = "/diffusion/{$callsign}{$action}/{$path}{$commit}{$line}"; $uri = "/diffusion/{$callsign}{$action}/{$path}{$commit}{$line}";
break; break;
case 'branch': case 'branch':
if (strlen($path)) {
$uri = "/diffusion/{$callsign}repository/{$path}"; $uri = "/diffusion/{$callsign}repository/{$path}";
} else {
$uri = "/diffusion/{$callsign}";
}
break; break;
case 'external': case 'external':
$commit = ltrim($commit, ';'); $commit = ltrim($commit, ';');