sapling/mercurial/cext
Jun Wu 2bfb1f6996 xdiff: enable indent heuristic
Summary:
Enable the indent heuristic feature, since it provides nice visual
improvements for a wide range of cases. See the added test, and [1].

The only downside is it can slow things down. In a crafted case, this could
make `--indent-heuristic` several times slower than `--no-indent-heuristic`.

```
open('a', 'w').write(" \n" * 1000000)
open('b', 'w').write(" \n" * 1000001)
```

```
git diff --no-indent-heuristic a b  0.21s user 0.03s system 100% cpu 0.239 total
git diff --indent-heuristic a b     0.77s user 0.02s system 99% cpu 0.785 total
```

[1]: 433860f3d0

Reviewed By: ryanmce

Differential Revision: D7135452

fbshipit-source-id: 019b7e89225f288bba0a1d042591b13b5419ad0e
2018-04-13 21:51:21 -07:00
..
__init__.py policy: add "cext" package which will host CPython extension modules 2016-08-12 11:06:14 +09:00
base85.c cext: move braces for control statements to same line 2017-10-02 19:02:43 +01:00
bdiff.c hg: basic support for building hg using buck 2018-04-13 21:50:58 -07:00
charencode.c hg: basic support for building hg using buck 2018-04-13 21:50:58 -07:00
charencode.h hg: basic support for building hg using buck 2018-04-13 21:50:58 -07:00
diffhelpers.c diffhelpers: switch to policy importer 2016-08-13 12:15:49 +09:00
dirs.c cext: reorder #include 2017-10-02 19:06:00 +01:00
manifest.c lazymanifest: do not read uninitialized memory 2018-04-13 21:51:01 -07:00
mpatch.c hg: basic support for building hg using buck 2018-04-13 21:50:58 -07:00
osutil.c osutil: add a function to unblock signals 2018-01-03 05:35:56 -08:00
parsers.c hg: basic support for building hg using buck 2018-04-13 21:50:58 -07:00
pathencode.c fix invalid-shift-base UBSAN in pathencode.c 2018-04-13 21:51:15 -07:00
README.md READMEs: tweaks based on feedback 2018-01-12 12:35:52 -08:00
revlog.c hg: basic support for building hg using buck 2018-04-13 21:50:58 -07:00
util.h hg: basic support for building hg using buck 2018-04-13 21:50:58 -07:00
xdiff.c xdiff: enable indent heuristic 2018-04-13 21:51:21 -07:00

cext

Native code used by core Mercurial (not extensions), that depends on Python, lives here.

See also hgext/extlib/README.md, lib/README.md.