]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Use phid instead of guid for image diff
authorJason Ge <jungejason@fb.com>
Sat, 9 Jul 2011 03:46:00 +0000 (20:46 -0700)
committerJason Ge <jungejason@fb.com>
Sat, 9 Jul 2011 05:50:00 +0000 (22:50 -0700)
Summary:
in https://secure.phabricator.com/rARC36de84ee, we changed to
use 'binary-phid' from 'binary-guid'. Several places are still using
'binary-guid'. Fix them.

Test Plan:
run 'arc patch' against a revision which was throwing
exception because of this issue and it worked.

Reviewed By: epriestley
Reviewers: epriestley, sgrimm
CC: aran, epriestley
Differential Revision: 624

src/parser/bundle/ArcanistBundle.php

index 4f2dfad732d137847035af22e0ad9de0b860b2cc..a591ca54dc9902427c3d572b1e304a887b785467 100644 (file)
@@ -97,11 +97,11 @@ class ArcanistBundle {
 
     $blobs = array();
     foreach ($change_list as $change) {
-      if (!empty($change['metadata']['old:binary-guid'])) {
-        $blobs[$change['metadata']['old:binary-guid']] = null;
+      if (!empty($change['metadata']['old:binary-phid'])) {
+        $blobs[$change['metadata']['old:binary-phid']] = null;
       }
-      if (!empty($change['metadata']['new:binary-guid'])) {
-        $blobs[$change['metadata']['new:binary-guid']] = null;
+      if (!empty($change['metadata']['new:binary-phid'])) {
+        $blobs[$change['metadata']['new:binary-phid']] = null;
       }
     }
     foreach ($blobs as $phid => $null) {
@@ -388,8 +388,8 @@ class ArcanistBundle {
   }
 
   private function buildBinaryChange(ArcanistDiffChange $change) {
-    $old_phid = $change->getMetadata('old:binary-guid', null);
-    $new_phid = $change->getMetadata('new:binary-guid', null);
+    $old_phid = $change->getMetadata('old:binary-phid', null);
+    $new_phid = $change->getMetadata('new:binary-phid', null);
 
     $type = $change->getType();
     if ($type == ArcanistDiffChangeType::TYPE_ADD) {