Started with a unit test for the monotone interface.
Main test infrastructure is there, still lots of functionality left for testing. Fixed a possible bug in the SCM interface already: Pluf_HTTP_Response_NotFound needs a request instance as ctor argument, which we don't have at this point, therefor we just throw an exception.
This commit is contained in:
@@ -135,13 +135,13 @@ class IDF_Scm_Monotone extends IDF_Scm
|
||||
/**
|
||||
* @see IDF_Scm::getArchiveStream
|
||||
*/
|
||||
public function getArchiveStream($commit, $prefix='repository/')
|
||||
public function getArchiveStream($commit, $prefix = null)
|
||||
{
|
||||
$revs = $this->_resolveSelector($commit);
|
||||
// sanity: this should actually not happen, because the
|
||||
// revision is validated before already
|
||||
if (count($revs) == 0) {
|
||||
return new Pluf_HTTP_Response_NotFound();
|
||||
throw new IDF_Scm_Exception("$commit is not a valid revision");
|
||||
}
|
||||
return new IDF_Scm_Monotone_ZipRender($this->stdio, $revs[0]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user