Show blame info in diffusion.

Summary:
Show blame info. This is part of the task of "Port Diffusion's
Browse File view to Phabricator". The color for git repository is not
implemented yet.

Test Plan:
it would work for both git and svn.

Reviewed By: epriestley
Reviewers: epriestley
CC: epriestley
Differential Revision: 87
This commit is contained in:
jungejason
2011-03-26 12:42:12 -07:00
parent f249ffc882
commit 51a6ce65aa
7 changed files with 252 additions and 82 deletions

View File

@@ -19,6 +19,7 @@
abstract class DiffusionFileContentQuery {
private $request;
private $needsBlame;
final private function __construct() {
// <private>
@@ -57,4 +58,24 @@ abstract class DiffusionFileContentQuery {
}
abstract protected function executeQuery();
final public function getRawData() {
return $this->loadFileContent()->getCorpus();
}
final public function getTokenizedData() {
return $this->tokenizeData($this->getRawData());
}
abstract protected function tokenizeData($data);
public function setNeedsBlame($needs_blame)
{
$this->needsBlame = $needs_blame;
}
public function getNeedsBlame()
{
return $this->needsBlame;
}
}