Commit Graph

56999 Commits

Author SHA1 Message Date
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
svcscm
1949f4e528 Updating submodules
Summary:
GitHub commits:

54dc44ba8a
726a62cb89
955756111e
66a95f0fac
f1d333089f

Reviewed By: zpao

fbshipit-source-id: 3585db200a5d84ba01b8cf90a3bd7bf003314345
2020-04-09 21:54:46 -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
svcscm
4be68ba529 Updating submodules
Summary:
GitHub commits:

d1ec572702

Reviewed By: zpao

fbshipit-source-id: c41fdf5647ee45e9d99e1b2359a9a9fc84040c2a
2020-04-09 17:54:51 -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
svcscm
9842fdfc3c Updating submodules
Summary:
GitHub commits:

7a3180e685
19579e7221
dcda94e91e
b4dc7ca8b2
9d6974d3c9
f53d1d70d4
0449bf93da
40e7cd264b
03bc4a0de5

Reviewed By: zpao

fbshipit-source-id: e87e2462f661cbaa9c90fc7a9407ee027e11e64b
2020-04-09 17:18:22 -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
svcscm
320e071371 Updating submodules
Summary:
GitHub commits:

12efe7c0ad
af9585915d
07c56b2c42
4a29e9cbc3
1aaa4f7c22
832671379a
26862c2f23
819d357723
9f18c234d9
81b956b41c

Reviewed By: zpao

fbshipit-source-id: 643525fbe02fc99e1258047ae13f0fe3704e3709
2020-04-09 16:19:35 -07:00
Wez Furlong
8dbf80385c getdeps: export fbsource commit date into environment
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
2020-04-09 15:15:01 -07:00
svcscm
dc28f4a2d0 Updating submodules
Summary:
GitHub commits:

fe67bb7c0e
027c1644a7
8045a2a068
05953181a9
faeba96985
e860f8840a
a8a1113de5
959cdee731

Reviewed By: zpao

fbshipit-source-id: 652dbf7024ea374506fa5c46440a1ab9d630e28b
2020-04-09 15:03:17 -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
Jun Wu
ed8a5b548b py3: fix test-rebase-inmemory-mergedriver-exception.t
Reviewed By: xavierd

Differential Revision: D20929678

fbshipit-source-id: 29d4cf9a65c27b19e8504aa8260da2933aeb8342
2020-04-09 13:20:37 -07:00
Jun Wu
ef96a72aa6 py3: fix test-rebase-inmemory-conflicts.t
Reviewed By: xavierd

Differential Revision: D20929676

fbshipit-source-id: 7fbab661c14a51165959018877cc516512347c85
2020-04-09 13:20:37 -07:00
Jun Wu
ab6c8cf9ac py3: fix test-rebaes-conflicts.t
Reviewed By: xavierd

Differential Revision: D20929677

fbshipit-source-id: 7e1a67b78b6eaaea8edb9a1a1241001d9f57f0f6
2020-04-09 13:20:36 -07:00
Jun Wu
95b639358c tests: fix test-rebase-brute-force.t
Summary: Removing b prefix fixes it.

Reviewed By: xavierd

Differential Revision: D20929675

fbshipit-source-id: b90d863dc4aa28abad89926842541f4d3fe3926f
2020-04-09 13:20:36 -07:00
Jun Wu
30250709b0 py3: fix test-absorb-t.py
Reviewed By: xavierd

Differential Revision: D20928613

fbshipit-source-id: 510b8e833d86399872248859d8910b70d7b2c741
2020-04-09 13:20:36 -07:00
Jun Wu
db7377ae0c py3: fix test-fb-hgext-absorb-filefixupstate.py
Reviewed By: xavierd

Differential Revision: D20928614

fbshipit-source-id: beafe9a1aa260e1ac398056e93795c5231139a06
2020-04-09 13:20:35 -07:00
Jun Wu
224f9f11df py3: fix test-autofix.t
Reviewed By: xavierd

Differential Revision: D20928615

fbshipit-source-id: daec7955957f9995d7ee87378b2e3ddf60932d07
2020-04-09 13:20:35 -07:00
Jun Wu
aefe6291fe py3: fix test-ancestor.py
Reviewed By: xavierd

Differential Revision: D20926780

fbshipit-source-id: 1c09b72c00c690289d707f09a468cc4c0fe56eb1
2020-04-09 13:20:35 -07:00
Jun Wu
0464407c68 py3: fix some absorb tests
Reviewed By: singhsrb

Differential Revision: D20926397

fbshipit-source-id: 264a7a8598b6a59678a2f8cacfe5dae6887bd928
2020-04-09 13:20:34 -07:00
Jun Wu
94b9ef5625 add getcommitdata to wireproto capabilities
Summary: This allows the client to do proper feature detection.

Reviewed By: krallin

Differential Revision: D20910379

fbshipit-source-id: c7b9d4073e94518835b39809caf8b068f70cbc2f
2020-04-09 12:57:07 -07:00
Katie Mancini
0979042fd7 Explicitly track current/pending imports -- display current metrics in eden top
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
2020-04-09 12:35:23 -07:00
Katie Mancini
7e58206c30 Explicitly track current/pending Imports -- fix pending imports
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
2020-04-09 12:35:22 -07:00
Katie Mancini
e299b71988 Explicitly track current/pending imports -- refactor and expose current metrics
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
2020-04-09 12:35:22 -07:00
Chad Austin
ba88d4f1d2 enable Thrift function histograms on Windows
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
2020-04-09 11:30:27 -07:00
Jun Wu
3bfb9da1f5 include sorted parents in getcommitdata output
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
2020-04-09 11:04:22 -07:00
Durham Goode
f31d9f1f89 py3: fix streaming clone and bundle output
Summary: Makes test-bundle.t pass in python3

Reviewed By: quark-zju

Differential Revision: D20923758

fbshipit-source-id: 5e874cedc8419e87d1f9024c575ee6928805fad6
2020-04-09 09:23:54 -07:00
Xavier Deguillard
61e146d2ab patch: fix binhunk
Summary: The binhunk is for binary data, therefore we need to use byte strings.

Reviewed By: xavierd

Differential Revision: D20290069

fbshipit-source-id: 9cd763b76df389a1f7b65aecf0be4aa36a85cf91
2020-04-09 09:23:54 -07:00
Xavier Deguillard
3622204e43 util: keep bytesinput as unicode based
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
2020-04-09 09:23:53 -07:00
Durham Goode
df37fef5b3 py3: fix test-basics.t
Summary: Simple fix to output bytes

Reviewed By: xavierd

Differential Revision: D20921348

fbshipit-source-id: befa8abab0a7943fd2d20614dcacf3ef25f1e9ba
2020-04-09 09:23:53 -07:00
Xavier Deguillard
9583563bf2 tests: fix test-fb-hgext-crdump.t in Python3
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
2020-04-09 09:10:58 -07:00
Xavier Deguillard
19556ad7d7 tests: enable tests that are now passing in python3
Reviewed By: DurhamG

Differential Revision: D20927681

fbshipit-source-id: f94efe77ce2d4b1377f7f210493678858ba5eae1
2020-04-09 09:10:57 -07:00