Commit Graph

56986 Commits

Author SHA1 Message Date
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
Xavier Deguillard
935b80f837 templater: diff is returning bytes chunks
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
2020-04-09 09:10:57 -07:00
svcscm
7c2f110a25 Updating submodules
Summary:
GitHub commits:

c69ea54e3e
a195efce4b
15c139773f

Reviewed By: zpao

fbshipit-source-id: 800698aba8559254f09d38473418ce3dda3e7276
2020-04-09 09:01:41 -07:00
Adam Simpkins
49cc8e4d3c default to checking out the master revision for hg repositories
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
2020-04-09 00:18:19 -07:00
Adam Simpkins
7adf1f3e3c fix an off-by-one issue in the fsck code when formatting dates
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
2020-04-09 00:18:18 -07:00
Xavier Deguillard
6dadf6fdd9 node: use binascii.Error in Python3
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
2020-04-08 23:46:09 -07:00
svcscm
679ef91af4 Updating submodules
Summary:
GitHub commits:

cc81280ab3
3a2b7f379a

Reviewed By: zpao

fbshipit-source-id: da80bb9fd3764db1275503d4605014d30bf64ae5
2020-04-08 23:46:09 -07:00
svcscm
b701073bbc Updating submodules
Summary:
GitHub commits:

abd43f28cf
dc0571b74a
eb287c72d7
a84d2e5fcb

Reviewed By: zpao

fbshipit-source-id: 2d67bf530f4abe802e3cba5ed936a11bdec310c6
2020-04-08 22:15:07 -07:00
Stefan Filip
25fd8b9034 py3: fix test-hint.py
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
2020-04-08 22:00:35 -07:00
Adam Simpkins
a3d4ae3d40 do not create the README_EDEN.txt file on Windows
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
2020-04-08 20:49:24 -07:00
Adam Simpkins
91e13e2c10 print an error message if an exception is thrown on Windows
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
2020-04-08 20:44:45 -07:00
svcscm
662587ce0c Updating submodules
Summary:
GitHub commits:

383c57bd1e
ea49349e64

Reviewed By: zpao

fbshipit-source-id: 7e660d22ddff0478888fc2ff34daf39839c18000
2020-04-08 19:48:40 -07:00
Stefan Filip
5afca4fadd py3: fix test-manifest.py
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
2020-04-08 19:14:15 -07:00
Xavier Deguillard
76ecec0e57 bisect: make it python3 compatible
Summary: We should read/write to it via as utf8.

Reviewed By: DurhamG

Differential Revision: D20923404

fbshipit-source-id: 86cdc329395d60c88637f24d3c7c5caedcc7111a
2020-04-08 19:08:51 -07:00