stdio = $stdio; $this->revision = $revision; } /** * Render a response object. */ function render($output_body=true) { $this->outputHeaders(); if ($output_body) { $manifest = $this->stdio->exec(array('get_manifest_of', $this->revision)); $stanzas = IDF_Scm_Monotone_BasicIO::parse($manifest); $zip = new ZipStream(); foreach ($stanzas as $stanza) { if ($stanza[0]['key'] != 'file') continue; $content = $this->stdio->exec(array('get_file', $stanza[1]['hash'])); $zip->add_file($stanza[0]['values'][0], $content); } $zip->finish(); } } }