@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.

Teach Commit View about Encoding

Summary:
If the user specifies a text encoding via the "View Options" dropdown, respect this choice.
Ref Q68.

Test Plan: Play with the Encoding button in the view

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tinloaf, speck, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25360

+7 -3
+6 -3
src/applications/diffusion/conduit/DiffusionDiffQueryConduitAPIMethod.php
··· 23 23 return array( 24 24 'path' => 'required string', 25 25 'commit' => 'optional string', 26 + 'encoding' => 'optional string', 26 27 ); 27 28 } 28 29 ··· 212 213 return $this->getEmptyResult(); 213 214 } 214 215 215 - $parser = $this->getDefaultParser(); 216 + $parser = $this->getDefaultParser($request); 216 217 $changes = $parser->parseDiff($raw_diff); 217 218 218 219 return $changes; 219 220 } 220 221 221 - private function getDefaultParser() { 222 + private function getDefaultParser(ConduitAPIRequest $request) { 222 223 $drequest = $this->getDiffusionRequest(); 223 224 $repository = $drequest->getRepository(); 224 225 225 226 $parser = new ArcanistDiffParser(); 226 - $try_encoding = $repository->getDetail('encoding'); 227 + $try_encoding = coalesce( 228 + $request->getValue('encoding'), 229 + $repository->getDetail('encoding')); 227 230 if ($try_encoding) { 228 231 $parser->setTryEncoding($try_encoding); 229 232 }
+1
src/applications/diffusion/controller/DiffusionDiffController.php
··· 48 48 array( 49 49 'commit' => $drequest->getCommit(), 50 50 'path' => $drequest->getPath(), 51 + 'encoding' => $request->getStr('encoding'), 51 52 )); 52 53 $drequest->updateSymbolicCommit($data['effectiveCommit']); 53 54 $raw_changes = ArcanistDiffChange::newFromConduit($data['changes']);