Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14355802
D10746.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D10746.diff
View Options
diff --git a/src/applications/diffusion/data/DiffusionCommitHash.php b/src/applications/diffusion/data/DiffusionCommitHash.php
--- a/src/applications/diffusion/data/DiffusionCommitHash.php
+++ b/src/applications/diffusion/data/DiffusionCommitHash.php
@@ -23,4 +23,15 @@
return $this->hashType;
}
+ public static function convertArrayToObjects(array $hashes) {
+ $hash_objects = array();
+ foreach ($hashes as $hash) {
+ $type = $hash[0];
+ $hash = $hash[1];
+ $hash_objects[] = id(new DiffusionCommitHash())
+ ->setHashType($type)
+ ->setHashValue($hash);
+ }
+ return $hash_objects;
+ }
}
diff --git a/src/applications/diffusion/query/lowlevel/DiffusionLowLevelCommitFieldsQuery.php b/src/applications/diffusion/query/lowlevel/DiffusionLowLevelCommitFieldsQuery.php
--- a/src/applications/diffusion/query/lowlevel/DiffusionLowLevelCommitFieldsQuery.php
+++ b/src/applications/diffusion/query/lowlevel/DiffusionLowLevelCommitFieldsQuery.php
@@ -71,6 +71,8 @@
$revision = $this->pickBestRevision($revisions);
$fields['revisionID'] = $revision->getID();
$revision_hashes = $revision->getHashes();
+ $revision_hashes = DiffusionCommitHash::convertArrayToObjects(
+ $revision_hashes);
$revision_hashes = mpull($revision_hashes, 'getHashType');
// sort the hashes in the order the mighty
// @{class:ArcanstDifferentialRevisionHash} does; probably unnecessary
@@ -79,7 +81,10 @@
$revision_hashes,
ArcanistDifferentialRevisionHash::getTypes());
foreach ($hashes as $hash) {
- $revision_hash = $revision_hashes[$hash->getHashType()];
+ $revision_hash = idx($revision_hashes, $hash->getHashType());
+ if (!$revision_hash) {
+ continue;
+ }
if ($revision_hash->getHashValue() == $hash->getHashValue()) {
$this->setRevisionMatchData(
'matchHashType',
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 20, 6:27 PM (17 h, 2 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6911570
Default Alt Text
D10746.diff (1 KB)
Attached To
Mode
D10746: Diffusion - fix another commit importing case.
Attached
Detach File
Event Timeline
Log In to Comment