From 9746d2b2a199985a6b0c75f1f02f84ea479bb72b Mon Sep 17 00:00:00 2001 From: vrana Date: Tue, 29 Jan 2013 15:57:42 -0800 Subject: [PATCH] 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 --- src/workflow/ArcanistBaseWorkflow.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/workflow/ArcanistBaseWorkflow.php b/src/workflow/ArcanistBaseWorkflow.php index 13b0fd0a..457f79a2 100644 --- a/src/workflow/ArcanistBaseWorkflow.php +++ b/src/workflow/ArcanistBaseWorkflow.php @@ -1547,11 +1547,9 @@ abstract class ArcanistBaseWorkflow extends Phobject { protected function getRepositoryVersion() { if (!$this->repositoryVersion) { $api = $this->getRepositoryAPI(); - $versions = array('' => $api->getSourceControlBaseRevision()); - foreach ($api->getUncommittedStatus() as $path => $mask) { - if ($mask & ArcanistRepositoryAPI::FLAG_UNTRACKED) { - continue; - } + $commit = $api->getSourceControlBaseRevision(); + $versions = array('' => $commit); + foreach ($api->getChangedFiles($commit) as $path => $mask) { $versions[$path] = (Filesystem::pathExists($path) ? md5_file($path) : '');