]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Save files with path to phutil cache
authorvrana <jakubv@fb.com>
Thu, 21 Jun 2012 18:48:23 +0000 (11:48 -0700)
committervrana <jakubv@fb.com>
Fri, 22 Jun 2012 18:56:54 +0000 (11:56 -0700)
Test Plan:
  $ arc liberate
  $ mv a.php b.php
  $ arc liberate

Previously, it didn't update the map.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D2818

scripts/lib/PhutilLibraryMapBuilder.php

index 6b1e0d60d011e18c217866fc0cabf499f846a9d3..d3db801d083a1d38e3589b5b2dee01cacfb7a6dd 100755 (executable)
@@ -37,7 +37,7 @@ final class PhutilLibraryMapBuilder {
   const LIBRARY_MAP_VERSION       = 2;
 
   const SYMBOL_CACHE_VERSION_KEY  = '__symbol_cache_version__';
-  const SYMBOL_CACHE_VERSION      = 3;
+  const SYMBOL_CACHE_VERSION      = 4;
 
 
 /* -(  Mapping libphutil Libraries  )---------------------------------------- */
@@ -420,7 +420,9 @@ final class PhutilLibraryMapBuilder {
         continue;
       }
 
-      $map[$file] = $hash;
+      // We include also filename in the hash to handle cases when the file is
+      // moved without modifying its content.
+      $map[$file] = md5($hash.$file);
     }
 
     return $map;