getRequest(); if ($request->getStr('ref')) { $parts = explode(';', $request->getStr('ref')); $data['path'] = idx($parts, 0); $data['commit'] = idx($parts, 1); } $this->diffusionRequest = DiffusionRequest::newFromAphrontRequestDictionary( $data); } public function processRequest() { $drequest = $this->getDiffusionRequest(); $request = $this->getRequest(); $diff_query = DiffusionDiffQuery::newFromDiffusionRequest($drequest); $changeset = $diff_query->loadChangeset(); if (!$changeset) { return new Aphront404Response(); } $parser = new DifferentialChangesetParser(); $parser->setChangeset($changeset); $parser->setRenderingReference($diff_query->getRenderingReference()); $parser->setWhitespaceMode( DifferentialChangesetParser::WHITESPACE_SHOW_ALL); $spec = $request->getStr('range'); list($range_s, $range_e, $mask) = DifferentialChangesetParser::parseRangeSpecification($spec); $output = $parser->render($range_s, $range_e, $mask); return id(new AphrontAjaxResponse()) ->setContent( array( 'changeset' => $output, )); } }