From: vrana Date: Thu, 21 Jun 2012 18:48:23 +0000 (-0700) Subject: Save files with path to phutil cache X-Git-Tag: conduit-6~233 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=636bcef5ca67a297d456c41a768e46f6827a0c95;p=arcanist.git Save files with path to phutil cache 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 --- diff --git a/scripts/lib/PhutilLibraryMapBuilder.php b/scripts/lib/PhutilLibraryMapBuilder.php index 6b1e0d60..d3db801d 100755 --- a/scripts/lib/PhutilLibraryMapBuilder.php +++ b/scripts/lib/PhutilLibraryMapBuilder.php @@ -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;