sapling/eden
Jun Wu 49acaf17b3 bindings: implement diffhelpers
Summary:
The diffhelpers.c lacks of type checks and segfaults on Python 3:

  (gdb) r --config patch.eol=auto import -d '0 0' -m 'test patch.eol' --bypass ../test.diff --debug --traceback
  Program received signal SIGSEGV, Segmentation fault.
  0x00007ffff7263016 in __strcmp_sse42 () from /lib64/libc.so.6
  (gdb) bt
  #0  0x00007ffff7263016 in __strcmp_sse42 () from /lib64/libc.so.6
  #1  0x00007fffee5e3d3b in testhunk (self=<optimized out>, args=<optimized out>) at edenscm/mercurial/cext/diffhelpers.c:151

Looking at the diffhelpers usage, it seems to be using the `bytes` type
(bytes on Python 2, str on Python 3). Let's implement it in Rust so `rust-cpython`
will complain if the type is not `bytes`.

Reviewed By: xavierd

Differential Revision: D20935366

fbshipit-source-id: 8b474555b52caeab4175d7dad44c4c4e7097e557
2020-04-09 18:25:53 -07:00
..
benchmarks Migrate from TAsyncSocket 2020-03-31 13:20:02 -07:00
docs add EdenServer recovery step and recover after failed takeover data send handshake 2020-04-07 09:52:21 -07:00
fs remove all CLI code dealing with the old legacy bind-mounts config 2020-04-09 17:31:03 -07:00
integration remove all CLI code dealing with the old legacy bind-mounts config 2020-04-09 17:31:03 -07:00
locale add a copyright header to glibc_en.po 2019-04-26 14:38:27 -07:00
mononoke add getcommitdata to wireproto capabilities 2020-04-09 12:57:07 -07:00
scm bindings: implement diffhelpers 2020-04-09 18:25:53 -07:00
scripts Tidy up license headers 2019-10-11 05:28:23 -07:00
test_support eden: remove hypothesis test bits 2020-01-23 11:37:27 -08:00
test-data enable treemanifest in snapshots 2019-08-28 18:46:03 -07:00
third-party fix some macOS build warnings 2020-01-23 17:37:39 -08:00
win flip EDEN_WIN_NOMONONOKE to EDEN_HAVE_MONONOKE 2019-08-27 17:04:19 -07:00
.gitignore eden: wire up mac contbuild 2019-02-05 21:52:30 -08:00
Eden.project.toml Eden.project.toml file for Nuclide 2018-04-26 11:05:23 -07:00