From: vrana Date: Tue, 29 Jan 2013 23:57:42 +0000 (-0800) Subject: Use all changed files since base revision in repository cache key X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=9746d2b2a199985a6b0c75f1f02f84ea479bb72b;p=arcanist.git 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 --- 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) : '');