1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-10-24 01:28:51 +02:00
phorge-arcanist/src
epriestley 1fcf7bac4e Compute UTF8 string differences correctly, accounting for combining characters
Summary:
@Afaque_Hussain has done a bunch of utf8 work here; combined with PhutilEditDistanceMatrix we can now do utf8 diffs correctly, in a general way, without a significant performance impact.

Use PhutilEditDistanceMatrix and `phutil_utf8v_combined()` to compute accurate diffs for all (or, at least, most) UTF8 text.

The only thing this doesn't handle completely correctly is lines beginning with combining characters. This is messy/expensive to handle and will probably never actually happen, so I'm punting for now. Nothing should actually break.

The utf8 stuff will be slow, but we only pay for it when we need it.

Test Plan:
Ran unit tests. I changed a few unit tests to use a non-combining character (snowman) for clarity, and some results are different now (since we get combining characters right).

{F44064}

Reviewers: btrahan, Afaque_Hussain

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2379

Differential Revision: https://secure.phabricator.com/D6019
2013-05-23 14:38:09 -07:00
..
configuration Disable lint cache by default 2013-04-23 11:26:28 -07:00
difference Compute UTF8 string differences correctly, accounting for combining characters 2013-05-23 14:38:09 -07:00
differential Delete license headers from files 2012-11-05 11:16:24 -08:00
docs Make the "this is technical documentation" message of "Arcanist Overview" more clear 2012-08-10 11:37:30 -07:00
events/constant Dispatch an event in arc land right before pushing a revision 2013-03-08 18:32:36 -08:00
exception Delete license headers from files 2012-11-05 11:16:24 -08:00
extensions Changes to Arcanist for libphutil "extensions/" 2013-04-22 14:38:49 -07:00
hgdaemon Fix dynamic string usage as safe input 2013-02-02 16:28:15 -08:00
infrastructure/testing Delete license headers from files 2012-11-05 11:16:24 -08:00
lint Update PHP compat info 2013-05-22 11:36:41 -07:00
parser Arcanist changes related to T2784 2013-05-14 15:24:20 -07:00
repository Remove "--allow-empty-message" 2013-05-14 13:35:42 -07:00
unit Use PhutilEditDistanceMatrix in ArcanistDiffUtils 2013-05-23 14:36:42 -07:00
workflow Allow an unassigned flag to be passed to arc tasks 2013-05-23 10:36:40 -07:00
workingcopyidentity Add hook for runtime config settings. 2013-04-01 11:26:17 -07:00
__phutil_library_init__.php Delete license headers from files 2012-11-05 11:16:24 -08:00
__phutil_library_map__.php Adding arc revert command[] 2013-05-14 11:00:56 -07:00