Add basic framework for web based repository access
/p/$project/source/repo/ is assigned to a method that takes care of providing repository access. For now, this results in an exception on all SCMs.
This commit is contained in:
parent
a2c832a130
commit
aa2868eb17
@ -497,5 +497,10 @@ class IDF_Scm
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function repository($request, $match)
|
||||
{
|
||||
throw new Exception('This repository does not support web based repository access');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -132,6 +132,12 @@ class IDF_Views_Source
|
||||
$request);
|
||||
}
|
||||
|
||||
public function repository($request, $match)
|
||||
{
|
||||
$scm = IDF_Scm::get($request->project);
|
||||
return $scm->repository($request, $match);
|
||||
}
|
||||
|
||||
public $treeBase_precond = array('IDF_Precondition::accessSource',
|
||||
'IDF_Views_Source_Precondition::scmAvailable',
|
||||
'IDF_Views_Source_Precondition::revisionValid');
|
||||
|
@ -245,6 +245,11 @@ $ctl[] = array('regex' => '#^/p/([\-\w]+)/source/changesrev/$#',
|
||||
'model' => 'IDF_Views_Source_Svn',
|
||||
'method' => 'changelogRev');
|
||||
|
||||
$ctl[] = array('regex' => '#^/p/([\-\w]+)/source/repo/(.*)$#',
|
||||
'base' => $base,
|
||||
'model' => 'IDF_Views_Source',
|
||||
'method' => 'repository');
|
||||
|
||||
// ---------- WIKI -----------------------------------------
|
||||
|
||||
$ctl[] = array('regex' => '#^/p/([\-\w]+)/doc/$#',
|
||||
|
Loading…
Reference in New Issue
Block a user