@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Render more info for binary files in Differential

Summary:
Ref T10856. The rendering logic was already there, but it was expecting the information under `properties`
field, whereas arc puts it under `metadata`. Not sure if that something that changed a long time ago or if
it was always like this.

Test Plan: {F1252657 size=full}

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T10856

Differential Revision: https://secure.phabricator.com/D15828

authored by

Aviv Eyal and committed by
avivey
e1119b3f b3477bfc

+21
+14
src/applications/differential/render/DifferentialChangesetRenderer.php
··· 626 626 unset($old['unix:filemode']); 627 627 } 628 628 629 + $metadata = $changeset->getMetadata(); 630 + 629 631 if ($this->hasOldFile()) { 630 632 $file = $this->getOldFile(); 631 633 if ($file->getImageWidth()) { ··· 634 636 } 635 637 $old['file:mimetype'] = $file->getMimeType(); 636 638 $old['file:size'] = phutil_format_bytes($file->getByteSize()); 639 + } else { 640 + $old['file:mimetype'] = idx($metadata, 'old:file:mime-type'); 641 + $size = idx($metadata, 'old:file:size'); 642 + if ($size !== null) { 643 + $old['file:size'] = phutil_format_bytes($size); 644 + } 637 645 } 638 646 639 647 if ($this->hasNewFile()) { ··· 644 652 } 645 653 $new['file:mimetype'] = $file->getMimeType(); 646 654 $new['file:size'] = phutil_format_bytes($file->getByteSize()); 655 + } else { 656 + $new['file:mimetype'] = idx($metadata, 'new:file:mime-type'); 657 + $size = idx($metadata, 'new:file:size'); 658 + if ($size !== null) { 659 + $new['file:size'] = phutil_format_bytes($size); 660 + } 647 661 } 648 662 649 663 return array($old, $new);
+7
src/applications/differential/render/DifferentialChangesetTestRenderer.php
··· 32 32 $changeset = $this->getChangeset(); 33 33 list($old, $new) = $this->getChangesetProperties($changeset); 34 34 35 + foreach (array_keys($old) as $key) { 36 + if ($old[$key] === idx($new, $key)) { 37 + unset($old[$key]); 38 + unset($new[$key]); 39 + } 40 + } 41 + 35 42 if (!$old && !$new) { 36 43 return null; 37 44 }