1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-01 03:02:43 +01:00
phorge-phorge/src/applications/diffusion/query
epriestley d1fb2f7fb9 Make diffusion.filecontentquery return file PHIDs instead of raw content
Summary:
Fixes T9319. Proxied requests (e.g., in the cluster) for binary files (like images) currently fail because we can not return binary data over Conduit in JSON.

Although Conduit will eventually support binary-safe encodings, a cleaner approach to this is just to return a `filePHID` instead of the raw content. This is generally faster and more flexible, and gives us more opportunities to add caching later.

After making the call, the client pulls the file data separately.

We also no longer need to return a complex data structure because we don't do blame over this call any longer.

Test Plan:
  - Viewed images in Diffusion.
  - Viewed READMEs in Diffusion.
  - Used `bin/differential attach-commit rX Dy` to hit attach pathway.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9319

Differential Revision: https://secure.phabricator.com/D14970
2016-01-08 09:29:16 -08:00
..
blame Use a path digest when building blame cache keys 2016-01-06 19:12:57 -08:00
filecontent Make diffusion.filecontentquery return file PHIDs instead of raw content 2016-01-08 09:29:16 -08:00
lowlevel Conditionally use hg files vs. hg locate depending on version of Mercurial 2015-10-12 17:50:26 -07:00
pathchange Extend from Phobject 2015-06-15 18:02:27 +10:00
pathid Fix a few more undeclared properties 2015-06-15 19:39:04 +10:00
rawdiff Change double quotes to single quotes. 2014-06-09 11:36:50 -07:00
DiffusionCachedResolveRefsQuery.php phtize all the things 2015-05-22 21:16:39 +10:00
DiffusionCommitQuery.php Improve construction of commit queries from blame lookups 2016-01-06 18:43:04 -08:00
DiffusionDiffInlineCommentQuery.php Extend TransactionCommentQuery for Diffusion 2015-03-09 14:11:22 -07:00
DiffusionLintCountQuery.php Use PhutilInvalidStateException 2015-05-14 07:53:52 +10:00
DiffusionPathQuery.php Extend from Phobject 2015-06-15 18:02:27 +10:00
DiffusionQuery.php Move various other callsites away from callsigns 2016-01-04 06:54:42 -08:00
DiffusionRenameHistoryQuery.php Extend from Phobject 2015-06-15 18:02:27 +10:00
DiffusionResolveUserQuery.php Provide a standalone query for resolution of commit author/committer into Phabricator users 2013-12-19 11:05:17 -08:00
DiffusionSymbolQuery.php Only link symbols if there might be any 2015-05-21 08:25:35 -07:00