mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-20 05:42:40 +01:00
ChangesetParseCache
This commit is contained in:
parent
a997e77693
commit
2b7b03ad0c
2 changed files with 15 additions and 9 deletions
|
@ -404,12 +404,14 @@ class DifferentialChangesetParser {
|
|||
}
|
||||
|
||||
$data = null;
|
||||
/*
|
||||
|
||||
$changeset = new DifferentialChangeset();
|
||||
$conn_r = $changeset->establishConnection('r');
|
||||
$data = queryfx_one(
|
||||
smc_get_db('cdb.differential', 'r'),
|
||||
'SELECT * FROM changeset_parse_cache WHERE id = %d',
|
||||
$conn_r,
|
||||
'SELECT * FROM %T WHERE id = %d',
|
||||
$changeset->getTableName().'_parse_cache',
|
||||
$this->changesetID);
|
||||
*/
|
||||
|
||||
if (!$data) {
|
||||
return false;
|
||||
|
@ -479,14 +481,15 @@ class DifferentialChangesetParser {
|
|||
$cache = json_encode($cache);
|
||||
|
||||
try {
|
||||
/*
|
||||
$changeset = new DifferentialChangeset();
|
||||
$conn_w = $changeset->establishConnection('w');
|
||||
queryfx(
|
||||
smc_get_db('cdb.differential', 'w'),
|
||||
'INSERT INTO changeset_parse_cache (id, cache) VALUES (%d, %s)
|
||||
$conn_w,
|
||||
'INSERT INTO %T (id, cache) VALUES (%d, %s)
|
||||
ON DUPLICATE KEY UPDATE cache = VALUES(cache)',
|
||||
$changeset->getTableName().'_parse_cache',
|
||||
$this->changesetID,
|
||||
$cache);
|
||||
*/
|
||||
} catch (QueryException $ex) {
|
||||
// TODO: uhoh
|
||||
}
|
||||
|
@ -571,7 +574,7 @@ class DifferentialChangesetParser {
|
|||
$result = $this->highlightEngine->highlightSource(
|
||||
$this->filetype,
|
||||
$corpus);
|
||||
|
||||
|
||||
$result_lines = explode("\n", $result);
|
||||
foreach ($data as $key => $info) {
|
||||
if (!$info) {
|
||||
|
|
|
@ -10,13 +10,16 @@ phutil_require_module('arcanist', 'difference');
|
|||
phutil_require_module('arcanist', 'parser/diff');
|
||||
|
||||
phutil_require_module('phabricator', 'applications/differential/constants/changetype');
|
||||
phutil_require_module('phabricator', 'applications/differential/storage/changeset');
|
||||
phutil_require_module('phabricator', 'applications/differential/storage/diff');
|
||||
phutil_require_module('phabricator', 'applications/files/uri');
|
||||
phutil_require_module('phabricator', 'storage/queryfx');
|
||||
|
||||
phutil_require_module('phutil', 'filesystem');
|
||||
phutil_require_module('phutil', 'filesystem/tempfile');
|
||||
phutil_require_module('phutil', 'future/exec');
|
||||
phutil_require_module('phutil', 'markup');
|
||||
phutil_require_module('phutil', 'markup/syntax/engine/default');
|
||||
phutil_require_module('phutil', 'utils');
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue