Summary: The .keys() in Python3 returns an iterator, hence '+' doesn't work on these.
Reviewed By: quark-zju
Differential Revision: D20956491
fbshipit-source-id: 15c74bfcfe6d27dff5018fdf71e61bb747daf2d8
Summary:
The iteritems method doesn't exist in Python3, add the items one and remove the
pycompat.itermitems wherever we iterate over the lazyremotenamedict.
Reviewed By: quark-zju
Differential Revision: D20926027
fbshipit-source-id: de9d297126e8190f008cb5d09cc5a128d68c2213
Summary:
We were exluding warmup, which might take a noticeable amount of time. Let's
measure everything
Reviewed By: krallin
Differential Revision: D20920211
fbshipit-source-id: f48b0c2425eb2bae2991fa537dde1bc61b5e44ac
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