Summary: The test is less relevant as our entry point is now in Rust (and via bindings).
Reviewed By: xavierd
Differential Revision: D20953331
fbshipit-source-id: 0f80befb761d81389924bee23a683d9fb05d13db
Summary:
Drop other diffhelpers implementations.
The Rust implementation does a better job on type checks and won't segfault.
Reviewed By: xavierd
Differential Revision: D20935367
fbshipit-source-id: f59240f3a661efe1ca6e451922bcb3ca6ee6ae22
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
Summary:
The bind-mounts configuration has been ignored by EdenFS since D17236366.
This removes all CLI code for dealing with this config section.
Reviewed By: wez
Differential Revision: D20876460
fbshipit-source-id: 6b3f3552de25ee28fc0418a6aaec14446520203c
Summary:
This diff extracts the fbsource commit hash and the date of that
commit and maintains that in place of just the commit hash that
we were previously extracting.
This data is exported into the environment that we pass on to
builders so that it is available if they choose to use it.
In a follow on diff I'll use this to default a version number
in the watchman project.
Reviewed By: fanzeyi
Differential Revision: D20949666
fbshipit-source-id: dc12bffe5f0efc4297b15ba0140c4c67a23ab0fd
Summary:
This largely reverts the changes in D9443604, to make `hg rage` report the
full configs again.
Our configs vary from tier to tier and repository to repository. The override
settings alone don't seem like enough to try and figure out what the actual
settings are that the user is using.
I retained the behavior of reporting the source file and line number for each
config item, which wasn't present before D9443604. I also still excluded
config values from the "builtin" config source. Currently this only excludes
the handful of merge-tools defined in
`eden/scm/edenscmnative/bindings/modules/pyconfigparser/src/lib.rs`
Reviewed By: quark-zju
Differential Revision: D20927599
fbshipit-source-id: 8b5b5bf8b7871b85bd0fe5cd179f16693e4fbb2a
Summary: This allows the client to do proper feature detection.
Reviewed By: krallin
Differential Revision: D20910379
fbshipit-source-id: c7b9d4073e94518835b39809caf8b068f70cbc2f
Summary:
As discussed in D20629833 metrics for live imports
like those for pending imports can help differentiate
where imports are in the process.
This can help give users more insight into what is
happening inside eden. Meaning that they can see
progress being made, and that eden is not stuck. But
also when eden is stuck these metics can indicate
that it is stuck fetching data from the mercurial servers.
This displays those metrics in `eden top` similar to those
for pending imports
Reviewed By: chadaustin
Differential Revision: D20630826
fbshipit-source-id: ab7368927d2832acbea89a82585fda5195ce03d1
Summary:
Since imports are now queued in `HgQueuedBackingStore`
the metrics for queued imports were broken
the queueing use to happen in `HgBackingStore`, but
now the queue happens before the imports get here,
in `HgQueuedBackingStore`, thus these metrics were
only measuring live imports
=> this moves the metrics for queued imports into
`HgQueuedBackingStore` so that they capture both
live and queued imports
**note**: since prefetching in `HgQueuedBackingStore`
is in progress, these metrics are only set-up for when
prefetching this is finished
Reviewed By: chadaustin
Differential Revision: D20714494
fbshipit-source-id: 392337aaa60b44b75184889e6c92cb5d2c2577cc
Summary:
As mentioned in D20629833, adding metrics for live
imports in `eden top` gives more transparency to the
imports process and makes identifying import related
issues easier. This is set up to expose metrics for live
imports like those for pending imports in `eden top`.
Similar to D20611728 exposing this via these counters
will log this data. Having this data persisted will allow
tracking the performance of imports, and does the set
up for more pro-active fixing of issues. Further we can
look back to see issues that are no longer occurring, but
still of interest.
This also refactors the registration code so that it requires
no copy pasting to add a new counter. Avoiding copy paste
errors when adding more counters and making it easier to
maintain.
Reviewed By: chadaustin
Differential Revision: D20630813
fbshipit-source-id: 8a7a2a0135c7b7a5cde960b84dcb434c6c99eaeb
Summary: Now that fb303's Thrift function histogram support is open sourced, remove the _WIN32 ifdefs.
Reviewed By: simpkins
Differential Revision: D20907360
fbshipit-source-id: bb72dda0c801ca1bba4866d26645148881630596
Summary:
The Mercurial SHA1 is defined as:
sorted([p1, p2]) + content
The client wants to be able to verify the commit hashes returned by
getcommitdata. Therefore, also write the sorted parents so the client can
calculate the SHA1 easily without fetching SHA1s of parents. This is
useful because we also want to make commit SHA1s lazy on client-side.
I also changed the NULL behavior so the server does not return
content for the NULL commit, as it will fail the SHA1 check.
The server will expects the client to already know how to handle
the NULL special case.
Reviewed By: krallin
Differential Revision: D20910380
fbshipit-source-id: 4a9fb8ef705e93c759443b915dfa67d03edaf047
Summary: The binhunk is for binary data, therefore we need to use byte strings.
Reviewed By: xavierd
Differential Revision: D20290069
fbshipit-source-id: 9cd763b76df389a1f7b65aecf0be4aa36a85cf91
Summary:
On python3, no need to replace stdin/stdout with a bytes based one, keep them
as is.
Reviewed By: xavierd
Differential Revision: D20290068
fbshipit-source-id: b10b69185a52c79e7c67f69f6a8a96937c64a550
Summary: The .encode('hex') isn't available in Python3, codecs.encode needs to be used.
Reviewed By: DurhamG
Differential Revision: D20927989
fbshipit-source-id: cd0ecdbcbf0ab6391b37f44e7b38a3ffabf91340
Summary:
Not sure if this is the proper solution, but the template engine refuse to work
with anything but utf8 strings, but the diff operation only work on bytes.
Let's convert the return of diff to utf-8.
Reviewed By: DurhamG
Differential Revision: D20927680
fbshipit-source-id: 25c2947cac417448ca3521c2d5478fa8eebef04f
Summary:
When cloning a Mercurial repository, default to checking out the `master`
bookmark, if it exists. Continue using `.` in case the repository does not
have a `master` bookmark.
Reviewed By: pkaush
Differential Revision: D20876461
fbshipit-source-id: 57fa12e4c713bd50c15f59eb9281e0511c3cfe88
Summary:
The `tm_mon` field returned by `localtime_r()` has a range of 0 to 11.
We want to show human-readable month numbers of 1 to 12 in the fsck directory
name and log timestamps. Fix the formatting by adding 1 to the `tm_mon`
value.
Reviewed By: fanzeyi
Differential Revision: D20909591
fbshipit-source-id: 8625d09306b625e4e71dab9e0679fed3abc7bcf6
Summary:
In Python3, the error returned from binascii.unhexlify changed, from a generic
TypeError to a binascii.Error. Therefore, wrap the binascii function and catch
the binascii.Error before raising a TypeError.
Reviewed By: DurhamG
Differential Revision: D20924129
fbshipit-source-id: 33f852ea97396af715ef73630e0dd1b4324eb707
Summary:
I can't say that I understand `mdiff.splitnewlines`. In my test it does not
behave the way it reads and I don't know why. The stripping that it's supposed
to do doesn't happen for some reason. It behaves like splitlines.
I believe that rcutil used '\n' for line termination because it was relying on
Python to do the conversion to system line end. I updated to use os.linesep
now that we encode the contents.
Reviewed By: quark-zju
Differential Revision: D20935377
fbshipit-source-id: 0958fdff03950ab0a4b2da02e4333b5438ac5c70
Summary:
Do not put a `README_EDEN.txt` file in the checkout root on Windows. On Linux
& Mac the EdenFS mount hides this directory, so the README file is not visible
while the checkout is mounted and running normally. However on Windows
anything present in this directory is visible to the user, so this results in
`README_EDEN.txt` incorrectly showing up in the checkout root.
Reviewed By: genevievehelsel
Differential Revision: D20929408
fbshipit-source-id: 9994524041f22fd8922c531f0185186b04c54821
Summary:
In the Windows main.cpp file, print an exception if one is thrown while
running EdenFS. This doesn't report any backtrace information, but at least
prints the exception message itself.
Previously if an exception was thrown EdenFS would exit with a non-zero status
code but the actual exception message wasn't printed anywhere.
Reviewed By: fanzeyi
Differential Revision: D20928827
fbshipit-source-id: f9397f9688ef25b38f23421213058c417ddefaf9
Summary:
Bytes and Str usages mostly. __iter__ seems to have been incorrectly
converted to python 3 previously.
Reviewed By: xavierd
Differential Revision: D20933166
fbshipit-source-id: 10e63e90bd83c70a51dd808e9b5073ab8d766e71
Summary: We should read/write to it via as utf8.
Reviewed By: DurhamG
Differential Revision: D20923404
fbshipit-source-id: 86cdc329395d60c88637f24d3c7c5caedcc7111a