]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Use all changed files since base revision in repository cache key
authorvrana <jakubv@fb.com>
Tue, 29 Jan 2013 23:57:42 +0000 (15:57 -0800)
committervrana <jakubv@fb.com>
Wed, 30 Jan 2013 19:25:16 +0000 (11:25 -0800)
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

index 13b0fd0a9fa4887ed39360998d22b8ff13a306ac..457f79a288e493c955de89197f41a78c4d5a1d5a 100644 (file)
@@ -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)
           : '');