1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2025-02-27 14:09:10 +01:00

Use all changed files since base revision in repository cache key

Test Plan: Added debug output for repository version, linted, committed, linted again, saw the same version, changed file, saw different version.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4731
This commit is contained in:
vrana 2013-01-29 15:57:42 -08:00
parent 51f32bdde7
commit 9746d2b2a1

View file

@ -1547,11 +1547,9 @@ abstract class ArcanistBaseWorkflow extends Phobject {
protected function getRepositoryVersion() { protected function getRepositoryVersion() {
if (!$this->repositoryVersion) { if (!$this->repositoryVersion) {
$api = $this->getRepositoryAPI(); $api = $this->getRepositoryAPI();
$versions = array('' => $api->getSourceControlBaseRevision()); $commit = $api->getSourceControlBaseRevision();
foreach ($api->getUncommittedStatus() as $path => $mask) { $versions = array('' => $commit);
if ($mask & ArcanistRepositoryAPI::FLAG_UNTRACKED) { foreach ($api->getChangedFiles($commit) as $path => $mask) {
continue;
}
$versions[$path] = (Filesystem::pathExists($path) $versions[$path] = (Filesystem::pathExists($path)
? md5_file($path) ? md5_file($path)
: ''); : '');