Commit Graph

4597 Commits

Author SHA1 Message Date
Xavier Deguillard
6939c33e06 tests: fix test-revlog-mmapindex.t for python3
Reviewed By: sfilipco

Differential Revision: D20965267

fbshipit-source-id: c75601f0cddec0a8388adca3d522d668b7b2a787
2020-04-13 08:53:50 -07:00
Xavier Deguillard
56c0cdb002 histgrep: fix for python3
Summary:
In order to grep, the body of the file is decoded to utf8 with the error
handling "replace". This is probably OK as I would expect histgrep to be used
on text files, not random binary ones where grepping would probably not make a
lot of sense.

Reviewed By: sfilipco

Differential Revision: D20965178

fbshipit-source-id: 9ba234f33e801a78537c22b61dee434625449c01
2020-04-13 08:53:49 -07:00
Xavier Deguillard
ed8875ce70 tests: fix test-obsmarker-template-t.py for python3
Reviewed By: sfilipco

Differential Revision: D20964714

fbshipit-source-id: c92708336a6d75a645bd7725bf3dcca9abbe7029
2020-04-13 08:53:49 -07:00
Xavier Deguillard
e6f3aca0b0 cleanobsstore: write to the file with bytes
Reviewed By: sfilipco

Differential Revision: D20964696

fbshipit-source-id: 3dc81cfaa2172b494e89503e50b3c2d69ef153b4
2020-04-13 08:53:49 -07:00
Xavier Deguillard
a800e3e4ce tests: enable bunch of tests
Summary: These appear to pass now.

Reviewed By: quark-zju

Differential Revision: D20954747

fbshipit-source-id: ffd4dd4dc4832ed7cf84815ff1af9dad4361b26a
2020-04-13 08:53:48 -07:00
Xavier Deguillard
d17f3e417c morestatus: read from updateargs as utf8
Summary: The file is already written with writeutf8, read should use readutf8 too.

Reviewed By: sfilipco

Differential Revision: D20949694

fbshipit-source-id: cb00f45313ba8f78197d2344db7adc787b13ee4d
2020-04-13 08:53:48 -07:00
Xavier Deguillard
fee55b5c0d commands: read/write the graftstate as utf8
Reviewed By: sfilipco

Differential Revision: D20949689

fbshipit-source-id: 8541e9869dc0f4f9e595e011a3109d1cfb539a1a
2020-04-13 08:53:48 -07:00
Xavier Deguillard
e61591decc hggit: bunch of fixes for python3
Summary:
Dulwich expects pretty much everything to be bytes, thus we have to convert a
lot of stuff to bytes from unicode. This only fixes one test, but makes
progress on all of them.

Reviewed By: sfilipco

Differential Revision: D20949172

fbshipit-source-id: 44cd0c5136b3d224f7eb81e48ec98fed60c8b390
2020-04-13 08:53:47 -07:00
Simon Farnsworth
e58925a771 Make clippy happier with vec initialization in blobstore benchmark
Summary: It says I was doing it the slow way. Do it the fast way

Reviewed By: krallin

Differential Revision: D20926911

fbshipit-source-id: 65790d510d626e70a402c22a2df5d7606427aa7f
2020-04-13 08:37:59 -07:00
Simon Farnsworth
10a1fc24b7 Use the standard caching options to enable caching-assisted blobstore benchmarking
Summary: In production, we'll never look at blobstores on their own. Use the standard cachelib and memcache layers in benchmarks to test with caching.

Reviewed By: krallin

Differential Revision: D20926910

fbshipit-source-id: 030dcf7ced76293eda269a31adc153eb6d51b48a
2020-04-13 08:37:59 -07:00
Simon Farnsworth
d11ae2dcc8 Add read benchmarks to the blobstore benchmark set
Summary: This lets us look at a blobstore's behaviour for repeated single reads, parallel same-blob reads, and parallel reads to multiple blobs.

Reviewed By: krallin

Differential Revision: D20920206

fbshipit-source-id: 24d9a58024318ff3454fbbf44d6f461355191c55
2020-04-13 08:37:59 -07:00
Simon Farnsworth
f8cc1c6e97 Delete HgChangeset hook handling completely
Summary: Not in use any more - all hooks are now Bonsai form - so remove it.

Reviewed By: krallin

Differential Revision: D20891164

fbshipit-source-id: b92f169a0ec3a4832f8e9ec8dc9696ce81f7edb3
2020-04-11 04:26:37 -07:00
Simon Farnsworth
25b29257a3 Port hooks which now run on modified, not just added files
Summary: These hooks now run on modified files, not just added files, after porting to Bonsai form.

Reviewed By: krallin

Differential Revision: D20891166

fbshipit-source-id: 93a142f91c0bea7f5fe5e541530c644d215dce3a
2020-04-11 04:26:37 -07:00
Jun Wu
7a6b2864b5 tests: fix test-absorb-t.py on Windows
Reviewed By: xavierd

Differential Revision: D20973246

fbshipit-source-id: de6048829626f415df8ddcc2e16471cb2c0414a4
2020-04-10 22:48:04 -07:00
Xavier Deguillard
cb97048edf tests: update output of test-convert-git.t
Summary: The output was added in a recent git release, update the test to reflect that.

Reviewed By: DurhamG

Differential Revision: D20968427

fbshipit-source-id: 7fed6232723151adefe8329d8a98a314f04f222e
2020-04-10 19:35:38 -07:00
Adam Simpkins
c5e6e40888 remove support for repo configs from edenfsctl clone
Summary:
Update the `edenfsctl clone` command to require that an explicit repository
path be passed in.  Using the name of a repository listed in an EdenFS config
file is no longer supported.

Reviewed By: wez

Differential Revision: D20876459

fbshipit-source-id: 5e9fef11a2afa4cc48cb8a9bb5b874d2e7923f25
2020-04-10 13:57:52 -07:00
Adam Simpkins
ef8c3435c4 remove the "edenfsctl repository" subcommand
Summary:
We no longer use repository configs, so remove the `repository` subcommand
that supported adding and listing these configurations.

The main information that used to be included in the repository configuration
was the bind mount settings.  This has since been replaced with the
`.eden-redirections` file that is placed directly in each repository.

Reviewed By: wez

Differential Revision: D20876462

fbshipit-source-id: cc7d8e6f0a6a2e04fbf3159417af41a44908b3a8
2020-04-10 13:57:52 -07:00
Adam Simpkins
4910c924a8 fix some failures in the systemd integration tests on devservers
Summary:
When running the systemd integration tests on devservers, the edenfs process
will be started as root, but the test will be running as non-root.  Therefore
the test will not have permission to send SIGINT to the edenfs process to stop
it.  Update the tests to call `edenfsctl stop` instead of directly trying to
send `SIGINT` to the edenfs process.

Reviewed By: genevievehelsel

Differential Revision: D20939015

fbshipit-source-id: 5bcf0e58fdf532084fa1273254b3d81fd20de23e
2020-04-10 13:48:11 -07:00
Adam Simpkins
baeac18ef3 add a --current-edenfs-only flag to edenfsctl doctor
Summary:
Add a command line argument to `edenfsctl doctor` to cause it to only report
problems with the current EdenFS instance, and to skip checks for system-wide
problems or other running EdenFS processes.

This does refactor a fair amount of the top-level doctor logic to encapsulate
most of the state into an `EdenDoctor` class.

This also updates the integration tests to use this flag when invoking
`edenfsctl doctor`.  Previously the integration tests could spuriously fail
due to other pre-existing problems on the system, or due to other EdenFS
instances that are currently being started or shut down by other tests running
in parallel.

Reviewed By: wez

Differential Revision: D20357521

fbshipit-source-id: 36640cc21e7bd79fbd300c4d2c7dbba127ec9170
2020-04-10 13:48:11 -07:00
Xavier Deguillard
dd81246300 tests: enable more python3 tests
Reviewed By: DurhamG

Differential Revision: D20931013

fbshipit-source-id: 018a5268ad9fd59030c06217e7f7e6eee000ece6
2020-04-10 11:22:59 -07:00
Zeyi (Rice) Fan
412131346e disable reading blob from union store
Summary:
This code isn't really working and is giving out corrupted file content. Let's remove it for reading blobs.

We still cannot remove the C++ mercurial code entirely as we rely on it to import manifests. I tested on switching to the Rust manifest implementation but it wasn't working due to new pack file scanning.

Reviewed By: chadaustin

Differential Revision: D20938001

fbshipit-source-id: 9cc7b1ed9cd8228afd6fc5374cda001d1309a379
2020-04-10 11:19:27 -07:00
Durham Goode
59eb475f74 py3: enable more tests that are now passing
Summary: Not sure what fixed them, but now they pass.

Reviewed By: xavierd

Differential Revision: D20933992

fbshipit-source-id: ece47486df17fd5d9303a98bc3b63a429972e73f
2020-04-10 11:04:39 -07:00
Durham Goode
f5c2b60756 treemanifest: delete upstream treemanifest implementation
Summary:
These classes were used for upstream's treemanifest implementation. At
one point we partially used it for our server side tree logic, but these days we
don't use any of it except for the revlog layer. Let's delete the context and
treemanifest layers and tests.

Reviewed By: sfilipco

Differential Revision: D20953163

fbshipit-source-id: 952063e4e0cf74e2da740bf91a70e1714a9ad9b5
2020-04-10 10:59:51 -07:00
Durham Goode
6678f088c8 hgweb: disable hgweb
Summary:
Disables 'hg serve' being able to start a web server. This can be
worked around temporarily by setting web.allowhgweb=True, but we should remove
that workaround soon so we can deleted all the code.

Reviewed By: xavierd

Differential Revision: D20951800

fbshipit-source-id: e0d5017647a073b5ede3b0bbc4dd745fabeac816
2020-04-10 10:59:51 -07:00
Durham Goode
cf4a93bfa0 py3: fix test-wireproto.py
Summary: Makes it pass

Reviewed By: xavierd

Differential Revision: D20933051

fbshipit-source-id: e32ff04597a86fb9674b5a734acc856456f48033
2020-04-10 10:59:50 -07:00
Durham Goode
b2c2642e82 py3: fix pushrebase tests
Summary: Makes more pushrebase tests pass in Python 3

Reviewed By: xavierd

Differential Revision: D20930691

fbshipit-source-id: 1190ebdb77ef06066d6d07441584bb6fb1c1375e
2020-04-10 10:59:50 -07:00
Durham Goode
8ff3a8cbd5 py3: fix commit cloud tests
Summary: Makes all the commit cloud tests pass

Reviewed By: quark-zju

Differential Revision: D20927720

fbshipit-source-id: a863dc1b06258ac8d0ee907f51948c012a23dddc
2020-04-10 10:59:50 -07:00
Xavier Deguillard
4e561ade89 manifest: fix test-treemanifest.t
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
2020-04-10 10:10:17 -07:00
Xavier Deguillard
a50dae72b7 linkrevcache: fix debugverifylinkrevcache in Python3
Summary: Paths are unicode, not bytes.

Reviewed By: quark-zju

Differential Revision: D20955487

fbshipit-source-id: b3e20f238bfc2a444553ba5786fbfa90006f3567
2020-04-10 10:06:33 -07:00
Xavier Deguillard
48234d3be3 copytrace: use mercurial.json instead of json
Summary: Also, use codecs instead of .decode("base64").

Reviewed By: quark-zju

Differential Revision: D20953704

fbshipit-source-id: c5931ba0653acea2fa1de40abfb897437a773f09
2020-04-10 10:01:49 -07:00
Xavier Deguillard
c552dd8af8 bookmarks: add the items method to lazyremotenamedict
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
2020-04-10 09:55:57 -07:00
Jeremy Fitzhardinge
28830035dd rust: regenerate autocargo for tokio rollback
Reviewed By: dtolnay

Differential Revision: D20956714

fbshipit-source-id: f13256350cc7082543c7b69231a783b262f8a4d8
2020-04-10 01:12:57 -07:00
Stanislau Hlebik
8ffb6af331 mononoke: measure the whole duration of deriving chunks
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
2020-04-09 23:40:30 -07:00
Jun Wu
d588fe8a35 py3: enable test-import-unknown-t.py
Reviewed By: xavierd

Differential Revision: D20952869

fbshipit-source-id: 10cbe7fc1e7cc18270c7b320156325cc48dc58f3
2020-04-09 18:44:07 -07:00
Jun Wu
63a594cee3 py3: fix test-import-merge.t
Reviewed By: xavierd

Differential Revision: D20952871

fbshipit-source-id: 52c299fbdfc3fda8f0b5b2704e7e6bc6eb90342d
2020-04-09 18:44:06 -07:00
Jun Wu
fe3be0bddd py3: fix test-import-t.py
Reviewed By: xavierd

Differential Revision: D20952872

fbshipit-source-id: bea03953576a76f6f65f908f4ce12f3082d02871
2020-04-09 18:44:06 -07:00
Jun Wu
05cd3783ba py3: fix test-import-git.t
Reviewed By: xavierd

Differential Revision: D20952870

fbshipit-source-id: a5b58195b7efa924f1e8806f920671dbaab1e724
2020-04-09 18:44:06 -07:00
Jun Wu
1fbbf9488e py3: fix test-import-context.t
Reviewed By: xavierd

Differential Revision: D20952874

fbshipit-source-id: 18e2db7a35612f9f33fbc49f0703b20abb880938
2020-04-09 18:44:05 -07:00
Jun Wu
4841a5c8cc py3: fix test-import-eol.t
Reviewed By: xavierd

Differential Revision: D20952875

fbshipit-source-id: ad85c492929b39757e255c1aedcb2bbaa582fce2
2020-04-09 18:44:05 -07:00
Jun Wu
470dfdc8f5 py3: fix test-import-bypass.t
Reviewed By: DurhamG

Differential Revision: D20952873

fbshipit-source-id: 3282c757830460b3e683958f09fe6e6870b4fb9a
2020-04-09 18:44:05 -07:00
Jun Wu
73f93a438b py3: fix test-help.t
Reviewed By: xavierd

Differential Revision: D20953745

fbshipit-source-id: 7d6dd303e5789ae8c0a6a32ed40d884aa1f24803
2020-04-09 18:25:54 -07:00
Jun Wu
3e38bb9b6a py3: remove test-dispatch.py
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
2020-04-09 18:25:54 -07:00
Jun Wu
2517a36153 py3: fix test-zstdelta.py
Reviewed By: xavierd

Differential Revision: D20952953

fbshipit-source-id: 6bc01485b830189423c68f4b8edffcf915ab7e02
2020-04-09 18:25:54 -07:00
Jun Wu
514f0141f8 patch: use diffhelpers from Rust bindings
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
2020-04-09 18:25:53 -07:00
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
Jun Wu
ccb8237545 py3: fix updatestate for eden update
Summary:
Solves the following issue.

  Traceback (most recent call last):
    File "eden_update.py", line 93, in update
      vfs.write("updatestate", destctx.hex())
      # destctx = <changectx 1364fe9f6141>
    File "vfs.py", line 142, in write
      return fp.write(data)
      # data = '1364fe9f61411a001b78bd2bb4bf556e0fdfb4d6'
  TypeError: a bytes-like object is required, not 'str'

Reviewed By: simpkins

Differential Revision: D20957027

fbshipit-source-id: f9d55b005c1686064278d22634f0b6ca9d8d8f86
2020-04-09 18:12:45 -07:00
Adam Simpkins
34275429fe remove all CLI code dealing with the old legacy bind-mounts config
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
2020-04-09 17:31:03 -07:00
Xavier Deguillard
ad34cc5476 bundle2: bunch of fixes for Python3
Reviewed By: DurhamG

Differential Revision: D20930267

fbshipit-source-id: 5df5f7d1fbcd4875b4ee93be8ff84f8190972770
2020-04-09 16:27:43 -07:00
Adam Simpkins
e8fea00489 rage: report the full config
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
2020-04-09 14:13:31 -07:00
Jun Wu
921fc702ee py3: enable some rebase tests
Reviewed By: xavierd

Differential Revision: D20929674

fbshipit-source-id: d43e7525ce8e4c599c0db962f8e8d64ce955d9d8
2020-04-09 13:20:37 -07:00