]> khamidou — GitHub mirrors - arcanist.git/commit
Add very hacky encoding transformation support for arc
authorepriestley <git@epriestley.com>
Mon, 15 Aug 2011 16:10:22 +0000 (09:10 -0700)
committerepriestley <git@epriestley.com>
Fri, 4 Nov 2011 21:07:12 +0000 (14:07 -0700)
commit5150252f9138e9970de5b9fb1ad9d9e000758532
tree375d1a4a3a301a0052d6be7dbfdc535b4940dd76
parent08ce2a2e2cd506f6358e7b0c57568a06c8e7140d
Add very hacky encoding transformation support for arc

Summary:
Adds a secret, undoucmented "encoding" key to ".arcconfig" which makes a very
half-hearted effort to convert encodings. This is probably good enough that
Differential can be used for code review, but there will be issues with 'arc
patch', 'arc export', paste, maybe conduit stuff, Diffusion, and whatever else I
haven't thought of.

This also doesn't store the original encoding so anything converted like this
won't reasonably be able to be made to work with all that stuff in the future.

See T452 for a broader discussion of the issues involved.

Test Plan:
Short circuited the UTF-8 detection to always fail, had my files "converted"
from ISO-8859-1 to UTF-8.

@davidreuss: you can test this by applying this patch to arcanist/, adding
'"encoding" : "ISO-8859-1"' to your .arcconfig, touching some non-ASCII file,
and then running "arc diff".

Reviewers: davidreuss, jungejason, tuomaspelkonen, aran

Reviewed By: davidreuss

CC: aran, davidreuss, epriestley, nshamg123
Differential Revision: 812
src/workflow/diff/ArcanistDiffWorkflow.php
src/workflow/diff/__init__.php