]> khamidou — GitHub mirrors - arcanist.git/commit
Respect custom set encoding in patch/export workflows
authorDavid Reuss <david@upsys.dk>
Wed, 14 Mar 2012 14:08:06 +0000 (07:08 -0700)
committerepriestley <git@epriestley.com>
Wed, 14 Mar 2012 14:08:21 +0000 (07:08 -0700)
commit545f51a4fb62a6ab1274478aab5d325f703a1cde
tree328f4999e0bea09076da7c94e8eec0e43fd12972
parentf673ab10b16c22806666e670e590481795d87284
Respect custom set encoding in patch/export workflows

Summary:
In cases where a codebase is not UTF-8, we will attempt an conversion,
if an alternative encoding is given/configured.

This is now possible in two ways:

  - by configuring one under repository tracking in diffusion
  - by passing an --encoding option to the workflow

If the first is not available we will make a conduit call
to do an extra check and see if an encoding is configured directly with
phabricator.

Test Plan:
Tried various diffs with known encodings (mostly ISO-8859-1), and passed
it in, via stdin, or downloaded a known problematic revision from
phabricator, and they applied where they otherwise failed.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley
Maniphest Tasks: T452

Differential Revision: https://secure.phabricator.com/D1880
src/parser/bundle/ArcanistBundle.php
src/workflow/base/ArcanistBaseWorkflow.php
src/workflow/diff/ArcanistDiffWorkflow.php
src/workflow/export/ArcanistExportWorkflow.php
src/workflow/export/__init__.php
src/workflow/patch/ArcanistPatchWorkflow.php