Mercurial > hg
annotate contrib/clang-format-blacklist @ 36671:34e2ff1f9cd8
xdiff: vendor xdiff library from git
Vendor git's xdiff library from git commit
d7c6c2369d7c6c2369ac21141b7c6cceaebc6414ec3da14ad using GPL2+ license.
There is another recent user report that hg diff generates suboptimal
result. It seems the fix to issue4074 isn't good enough. I crafted some
other interesting cases, and hg diff barely has any advantage compared with
gnu diffutils or git diff.
| testcase | gnu diffutils | hg diff | git diff |
| | lines time | lines time | lines time |
| patience | 6 0.00 | 602 0.08 | 6 0.00 |
| random | 91772 0.90 | 109462 0.70 | 91772 0.24 |
| json | 2 0.03 | 1264814 1.81 | 2 0.29 |
"lines" means the size of the output, i.e. the count of "+/-" lines. "time"
means seconds needed to do the calculation. Both are the smaller the better.
"hg diff" counts Python startup overhead.
Git and GNU diffutils generate optimal results. For the "json" case, git can
have an optimization that does a scan for common prefix and suffix first,
and match them if the length is greater than half of the text. See
https://neil.fraser.name/news/2006/03/12/. That would make git the fastest
for all above cases.
About testcases:
patience:
Aiming for the weakness of the greedy "patience diff" algorithm. Using
git's patience diff option would also get suboptimal result. Generated using
the Python script:
```
open('a', 'w').write('\n'.join(list('a' + 'x' * 300 + 'u' + 'x' * 700 + 'a\n')))
open('b', 'w').write('\n'.join(list('b' + 'x' * 700 + 'u' + 'x' * 300 + 'b\n')))
```
random:
Generated using the script in `test-issue4074.t`. It practically makes the
algorithm suffer. Impressively, git wins in both performance and diff
quality.
json:
The recent user reported case. It's a single line movement near the end of a
very large (800K lines) JSON file.
Test Plan:
Code taken as-is.
Differential Revision: https://phab.mercurial-scm.org/D2572
# no-check-commit for vendored code
author | Jun Wu <quark@fb.com> |
---|---|
date | Sat, 03 Mar 2018 10:39:43 -0800 |
parents | 69080ee1fb0e |
children |
rev | line source |
---|---|
34834
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
1 # Files that just need to be migrated to the formatter. |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
2 # Do not add new files here! |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
3 mercurial/cext/dirs.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
4 mercurial/cext/manifest.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
5 mercurial/cext/osutil.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
6 mercurial/cext/revlog.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
7 # Vendored code that we should never format: |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
8 contrib/python-zstandard/c-ext/bufferutil.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
9 contrib/python-zstandard/c-ext/compressiondict.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
10 contrib/python-zstandard/c-ext/compressionparams.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
11 contrib/python-zstandard/c-ext/compressionwriter.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
12 contrib/python-zstandard/c-ext/compressobj.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
13 contrib/python-zstandard/c-ext/compressor.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
14 contrib/python-zstandard/c-ext/compressoriterator.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
15 contrib/python-zstandard/c-ext/constants.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
16 contrib/python-zstandard/c-ext/decompressionwriter.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
17 contrib/python-zstandard/c-ext/decompressobj.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
18 contrib/python-zstandard/c-ext/decompressor.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
19 contrib/python-zstandard/c-ext/decompressoriterator.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
20 contrib/python-zstandard/c-ext/frameparams.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
21 contrib/python-zstandard/c-ext/python-zstandard.h |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
22 contrib/python-zstandard/zstd.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
23 contrib/python-zstandard/zstd/common/bitstream.h |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
24 contrib/python-zstandard/zstd/common/entropy_common.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
25 contrib/python-zstandard/zstd/common/error_private.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
26 contrib/python-zstandard/zstd/common/error_private.h |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
27 contrib/python-zstandard/zstd/common/fse.h |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
28 contrib/python-zstandard/zstd/common/fse_decompress.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
29 contrib/python-zstandard/zstd/common/huf.h |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
30 contrib/python-zstandard/zstd/common/mem.h |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
31 contrib/python-zstandard/zstd/common/pool.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
32 contrib/python-zstandard/zstd/common/pool.h |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
33 contrib/python-zstandard/zstd/common/threading.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
34 contrib/python-zstandard/zstd/common/threading.h |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
35 contrib/python-zstandard/zstd/common/xxhash.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
36 contrib/python-zstandard/zstd/common/xxhash.h |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
37 contrib/python-zstandard/zstd/common/zstd_common.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
38 contrib/python-zstandard/zstd/common/zstd_errors.h |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
39 contrib/python-zstandard/zstd/common/zstd_internal.h |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
40 contrib/python-zstandard/zstd/compress/fse_compress.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
41 contrib/python-zstandard/zstd/compress/huf_compress.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
42 contrib/python-zstandard/zstd/compress/zstd_compress.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
43 contrib/python-zstandard/zstd/compress/zstd_opt.h |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
44 contrib/python-zstandard/zstd/compress/zstdmt_compress.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
45 contrib/python-zstandard/zstd/compress/zstdmt_compress.h |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
46 contrib/python-zstandard/zstd/decompress/huf_decompress.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
47 contrib/python-zstandard/zstd/decompress/zstd_decompress.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
48 contrib/python-zstandard/zstd/dictBuilder/cover.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
49 contrib/python-zstandard/zstd/dictBuilder/divsufsort.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
50 contrib/python-zstandard/zstd/dictBuilder/divsufsort.h |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
51 contrib/python-zstandard/zstd/dictBuilder/zdict.c |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
52 contrib/python-zstandard/zstd/dictBuilder/zdict.h |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
53 contrib/python-zstandard/zstd/zstd.h |
2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
54 hgext/fsmonitor/pywatchman/bser.c |
36671
34e2ff1f9cd8
xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
36227
diff
changeset
|
55 mercurial/thirdparty/xdiff/xdiff.h |
34e2ff1f9cd8
xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
36227
diff
changeset
|
56 mercurial/thirdparty/xdiff/xdiffi.c |
34e2ff1f9cd8
xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
36227
diff
changeset
|
57 mercurial/thirdparty/xdiff/xdiffi.h |
34e2ff1f9cd8
xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
36227
diff
changeset
|
58 mercurial/thirdparty/xdiff/xemit.c |
34e2ff1f9cd8
xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
36227
diff
changeset
|
59 mercurial/thirdparty/xdiff/xemit.h |
34e2ff1f9cd8
xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
36227
diff
changeset
|
60 mercurial/thirdparty/xdiff/xhistogram.c |
34e2ff1f9cd8
xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
36227
diff
changeset
|
61 mercurial/thirdparty/xdiff/xinclude.h |
34e2ff1f9cd8
xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
36227
diff
changeset
|
62 mercurial/thirdparty/xdiff/xmacros.h |
34e2ff1f9cd8
xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
36227
diff
changeset
|
63 mercurial/thirdparty/xdiff/xmerge.c |
34e2ff1f9cd8
xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
36227
diff
changeset
|
64 mercurial/thirdparty/xdiff/xpatience.c |
34e2ff1f9cd8
xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
36227
diff
changeset
|
65 mercurial/thirdparty/xdiff/xprepare.c |
34e2ff1f9cd8
xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
36227
diff
changeset
|
66 mercurial/thirdparty/xdiff/xprepare.h |
34e2ff1f9cd8
xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
36227
diff
changeset
|
67 mercurial/thirdparty/xdiff/xtypes.h |
34e2ff1f9cd8
xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
36227
diff
changeset
|
68 mercurial/thirdparty/xdiff/xutils.c |
34e2ff1f9cd8
xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
36227
diff
changeset
|
69 mercurial/thirdparty/xdiff/xutils.h |