Commit Graph

971 Commits

Author SHA1 Message Date
Durham Goode
9da5707131 checkout: disable fetching history during checkout
Summary:
We're seeing history fetching take quite a while during checkout and
rebase, but it's not really necessary for a checkout. In addition to it being
slow, if memcache doesn't have the history entry we'll fall back to a full
revision fetch from the server, which includes data. Let's disable prefetching
history during checkout.

Reviewed By: quark-zju

Differential Revision: D24295594

fbshipit-source-id: 70aa6e1925074b6546626a5192a7562d6da31f2b
2020-10-15 11:19:23 -07:00
John Reese
737849c9dd apply black 20.8b1 formatting update
Summary:
allow-large-files

black_any_style

Reviewed By: zertosh

Differential Revision: D24325133

fbshipit-source-id: b4afe80d1e8b2bc993f4b8e3822c02964df47462
2020-10-14 20:21:52 -07:00
Jun Wu
49dd754fa6 smartlog: do not use null as --master fallback
Summary:
Previously `--master` falls back to `null` if `-r` is provided for
compatibility. That could be surprising as smartlog's sorting does not work
well without a master branch.

Change `--master` to a consistent value regardless of `-r` is provided or not.

Reviewed By: simpkins

Differential Revision: D24297586

fbshipit-source-id: c6e695333ae17db11dcb98d9cdb57cc2f298ff64
2020-10-14 12:57:36 -07:00
Durham Goode
0fed091abb py3: fix treemanifest server tests
Summary:
simplecache didn't support binary values, which treemanifest uses.
Let's fix that.

Reviewed By: quark-zju

Differential Revision: D24290634

fbshipit-source-id: 2fd5306e10c3354d87832eb6765baca5dbb26d3e
2020-10-14 10:30:32 -07:00
Durham Goode
bff14ff181 py3: fix more tests
Summary: Some of these tests were already passing. Some required minor fixes to pass.

Reviewed By: quark-zju

Differential Revision: D24290635

fbshipit-source-id: 789d3033142466c868057da8f9f23d27aede8ea4
2020-10-14 10:30:32 -07:00
Durham Goode
0cbe0887f6 py3: fix test-convert*
Summary:
They now pass. Didn't test the p4 tests since I don't have p4
available, but I don't think we use it anymore.

Reviewed By: quark-zju

Differential Revision: D24284643

fbshipit-source-id: 184697052c0b7000ad9765b4033964b4d382b811
2020-10-14 10:30:32 -07:00
Xavier Deguillard
bc351a5891 templater: decode the result of diff()
Summary:
Template filters are expecting the output of the template to be a unicode
string, not a byte string. Thus we need to ensure that diff return a unicode
string.

Reviewed By: DurhamG

Differential Revision: D24290908

fbshipit-source-id: 70899249c3e26edd1714fd901fa6af405b61e544
2020-10-14 09:00:53 -07:00
Lukas Piatkowski
715351d576 mononoke/integration tests: fix test-clienttelemetry.t by disabling features
Summary:
The logic inside `eden/scm/tests/features.py` script enables certain
features of HG on tests based on the name of the test. Mononoke's integration
tests suit reuses eden/scm's tests suit and as a consequence it triggers the
same `features.py` logic. It was fine until D24201934 (f5988c415c) introduced a feature for
test that is named in the same way as one of the Mononoke tests - the
`test-clienttelemetry.t`.

In order to fix this problem Mononoke will pass a `--nofeatures` flag to the
`eden/scm/run-tests.py` invocations that will turn off the usage of
`features.py`.

Reviewed By: farnz

Differential Revision: D24276294

fbshipit-source-id: eb28ed55a05de3b012e37407603c2370adaaad16
2020-10-13 05:28:27 -07:00
Meyer Jacobs
f9958ca35a taggederror: introduce category and transience metadata and precedence
Summary:
This change introduces two new metadata types, Category and Transience, and a mechanism for Category to provide a default Fault and Transience, which can be overriden by the user.

Also introduces a mechanism for attempting to log exceptions which occur during exception logging, falling back to the previous behavior of just swallowing the exception on failure.

Reviewed By: DurhamG

Differential Revision: D22677565

fbshipit-source-id: 1cf75ca1e2a65964a0ede1f072439378a46bd391
2020-10-12 17:17:34 -07:00
Xavier Deguillard
437031872f fix test-import-t.py take 2
Summary: Whitespaces are needed.

Reviewed By: quark-zju

Differential Revision: D24264452

fbshipit-source-id: a7ecfbe1bba7d14f92d5218f18d55361a3f4319e
2020-10-12 15:43:57 -07:00
Jun Wu
a35f8765c0 lock: print actual lockinfo on error
Summary:
Change

  abort: repository repo: timed out waiting for lock held by <lockinfo ...>

to:

  abort: repository repo: timed out waiting for lock held by process '842210' on host 'hostname'

Reviewed By: singhsrb

Differential Revision: D24214462

fbshipit-source-id: 65056ebb9764651b2f0126061fafdfdefaa4e9c6
2020-10-12 11:22:20 -07:00
Xavier Deguillard
964e0106c9 tests: fix test-import-t.py
Summary: The rev numbers are almost gone, remove them from the test.

Reviewed By: sfilipco

Differential Revision: D24255156

fbshipit-source-id: 5cbc4a71c2d3f773c5b474d1edce84ceceb50bf9
2020-10-12 10:18:45 -07:00
Jun Wu
e4b677c6e1 remotefilelog: respect invalidatelinkrev store requirement
Summary:
With invalidatelinkrev, linkrev stored in revlog shouldn't be used.
This makes some tests pass with segmented changelog.

Reviewed By: singhsrb

Differential Revision: D24201944

fbshipit-source-id: 6473c30266c79aa97a955b1a6c867411cc67de2b
2020-10-09 13:53:18 -07:00
Jun Wu
2f1c54ae27 clone: copy modern store files
Summary:
Copy segmented changelog, metalog and mutation store for local clones.
This mainly affects tests.

Reviewed By: singhsrb

Differential Revision: D24201941

fbshipit-source-id: c60da9e2bf982a6f66004415e45178749157745e
2020-10-09 13:53:18 -07:00
Jun Wu
631034a2d6 gpg: remove revnum from output
Reviewed By: singhsrb

Differential Revision: D24201943

fbshipit-source-id: 6998ff68ba50480fb7feb4be3b35de1ea4a3ab4a
2020-10-09 13:53:17 -07:00
Jun Wu
3700c832f9 rebase: remove revnum from output
Reviewed By: singhsrb

Differential Revision: D24201945

fbshipit-source-id: 57b8fa1f98625ff186fac76009b1600f22e001bb
2020-10-09 13:53:17 -07:00
Jun Wu
38113e78ee summary: remove revnum from output
Reviewed By: singhsrb

Differential Revision: D24201936

fbshipit-source-id: a864fd1030dd8641ead46d434daadae6d4fca244
2020-10-09 13:53:17 -07:00
Durham Goode
43fe23f09d py3: fix revlog path encodings
Summary: This is needed to move our hg servers to python 3.

Reviewed By: quark-zju

Differential Revision: D24204056

fbshipit-source-id: cbaf97893f8f77b535952ac290766f0fd5e14f0c
2020-10-09 13:31:58 -07:00
Stefan Filip
befcdb1672 tests: fix test-casefolding
Summary: Broken after sweeping changes to remove revnums from tests.

Reviewed By: quark-zju

Differential Revision: D24220976

fbshipit-source-id: bd513b056bf16872ce028c835d680aaa87938917
2020-10-09 10:26:15 -07:00
Jun Wu
09c28abd20 graft: remove revnum from output
Reviewed By: singhsrb

Differential Revision: D24201937

fbshipit-source-id: bad22b741410ef990a709f77de5f843de7c3b5dc
2020-10-08 22:33:08 -07:00
Jun Wu
ec02fad2c6 bisect: remove revnum from output
Reviewed By: singhsrb

Differential Revision: D24201938

fbshipit-source-id: a6443465feac1ba43962e44a679091f655b24d16
2020-10-08 22:33:08 -07:00
Jun Wu
b01b79cf76 backout: remove revnum from output
Reviewed By: singhsrb

Differential Revision: D24201935

fbshipit-source-id: e1f4a9c9c82f401cc5b5ed9df464a58da64a0b65
2020-10-08 22:33:07 -07:00
Jun Wu
16aa4415c3 template: remove revnum from children template
Reviewed By: singhsrb

Differential Revision: D24201939

fbshipit-source-id: 573da6fbb1577b5e25566d238dccca33235494cd
2020-10-08 22:33:07 -07:00
Jun Wu
aed62002d1 commit: remove revnum from commitstatus
Summary: Do not show revnum or "changeset" after commit (with --debug or --vrebose).

Reviewed By: singhsrb

Differential Revision: D24201942

fbshipit-source-id: 2f0d15711df67070e50d4bf30f0b1b4401d85524
2020-10-08 22:33:07 -07:00
Jun Wu
f5988c415c tests: enable segmented changelog for supported tests
Summary: Enable segmented changelog for ~400 tests. They pass without changes.

Reviewed By: singhsrb

Differential Revision: D24201934

fbshipit-source-id: 7972c5548fd8b6b6f49b6bb837433d72a6f6cbd9
2020-10-08 22:33:07 -07:00
Jun Wu
140456fc29 bookmarks: remove revnum from non-plain bookmark output
Summary:
Remove revnum from `hg bookmarks` output.
`HGPLAIN=1` output is not changed for compatibility.

Reviewed By: singhsrb

Differential Revision: D24191788

fbshipit-source-id: 3a873b7baba8f1dfe7b3ec690688313ca1134032
2020-10-08 22:33:07 -07:00
Jun Wu
88a6d88b90 tests: remove revnum from aliases
Summary: Remove revnum from `showgraph`, `tglog*` aliases.

Reviewed By: singhsrb

Differential Revision: D24191791

fbshipit-source-id: f60c00289a0c6d06101f1c8645fc9d6e0f0c941e
2020-10-08 20:31:41 -07:00
Stefan Filip
794ea888d7 tests: fix test-casecollision-merge.t
Summary:
A previous change updated all tests to remove the use of rev numbers. The
update to the list of results missed this tests case.

Reviewed By: quark-zju

Differential Revision: D24208236

fbshipit-source-id: 289136f31e66eb74b106d7ea9401419fc369d59f
2020-10-08 17:44:13 -07:00
Jun Wu
83c996cf95 amend: remove revnum from UX
Summary: Change fold and metaedit to not show revnum in editor message.

Reviewed By: kulshrax

Differential Revision: D24191787

fbshipit-source-id: 140ec58c8eb00c067c6e40e1a18187f7801246e9
2020-10-08 13:22:10 -07:00
Jun Wu
026bd9f950 tests: avoid some rev numbers in revsets
Summary: Done by the fix-revnum.py script.

Reviewed By: singhsrb

Differential Revision: D24173575

fbshipit-source-id: e4cf417be759f9898adfd4102984098474ab38a2
2020-10-08 11:08:37 -07:00
Jun Wu
1ce0eea5dc tests: remove some uses of rev numbers in templates
Summary: Done by `sed`.

Reviewed By: singhsrb

Differential Revision: D24173576

fbshipit-source-id: f1d042b3da7f9b64e0e40b19317364e5cb9ae946
2020-10-07 21:22:58 -07:00
Jun Wu
8560a275b2 autopull: do not pull existing commits
Summary: This seems to only affect `diff --since-last-submit`.

Reviewed By: DurhamG

Differential Revision: D24069463

fbshipit-source-id: 8f311834073505310b37371fc07c6c3c4074ccc5
2020-10-06 14:32:16 -07:00
Jun Wu
ecc8e7187a merge: add a config to specify merge tool in interactive mode
Summary:
Add a way to specify different merge tools for interactive and non-interactive
mode.

This will be used for the default `editmerge` merge tool, which pops up the
`EDITOR` (vim) regardless of interactive mode, causing various user complains
and hangs, including `arc pull` running rebase triggering editor, or VS Code
running rebase triggering editor, and some other rebase hangs or vim errors.

Reviewed By: DurhamG

Differential Revision: D24069105

fbshipit-source-id: ec16fdc704cab6daeedb0c23d4028b4309d96d3f
2020-10-06 14:32:16 -07:00
Xavier Deguillard
b693a4aaba tests: fix test-check-code.t
Summary:
A couple of files were moved but test-check-code.t wasn't updated to reflect
this, causing it to fail.

Reviewed By: DurhamG

Differential Revision: D24113079

fbshipit-source-id: 9a0c0b6f07a6532715bf5ee401036ded0a05b16a
2020-10-05 09:08:37 -07:00
Lukas Piatkowski
9c54ea5f22 mononoke/integration tests: use $LOCALIP instead of ::1 or 127.0.0.1 (#65)
Summary:
Pull Request resolved: https://github.com/facebookexperimental/eden/pull/65

Using $LOCALIP will ensure more consistent behavior when setting up the server in ipv4 or ipv6.
The LOCALIP variable was also abused when it was used to override ssh client address, so SSH_IP_OVEERIDE env was created here.
Lastly the result of `curl` call is now printed whenever the test failed to verify that Mononoke is running.

Reviewed By: farnz

Differential Revision: D24108186

fbshipit-source-id: e4b68dd2c5dd368851f0b00064088ffc442e31e0
2020-10-05 07:51:19 -07:00
John Reese
f42333f17c Apply pyfmt to fbcode/eden
Summary:
Formats a subset of opted-in Python files in fbsource.
Black formatting was applied first, which is guaranteed
safe as the AST will not have changed during formatting.
Pyfmt was then run, which also includes import sorting.
The changes from isort were manually reviewed, and
some potentially dangerous changes were reverted,
and the  directive was added to those
files. A final run of pyfmt shows no more changes to
be applied.

Reviewed By: zertosh

Differential Revision: D24101830

fbshipit-source-id: 0f2616873117a821dbc6cfb6d8e4f64f4420312b
2020-10-04 04:51:00 -07:00
Durham Goode
ddf3eeb94a treemanifest: fix fetching trees with Rust store
Summary:
The bfs fetching path in Rust was broken because it directly called
getdesignatednodes. getdesignatednodes returns False if it wasn't able to
succeed, so we need to be able to fall back in that case. The _prefetchtrees
function is meant for that, so let's just call that.

Reviewed By: singhsrb

Differential Revision: D24090946

fbshipit-source-id: d16c2c8f80f690a22046385f0e95785996a62949
2020-10-02 18:51:11 -07:00
Xavier Deguillard
0967eafcba build: remove portability headers
Summary: These aren't included anywhere, we can remove them.

Reviewed By: DurhamG

Differential Revision: D24062627

fbshipit-source-id: 9ff101eb44965ac3502ada3265ffcc8acc09d2e5
2020-10-02 10:47:24 -07:00
Xavier Deguillard
8cc2738aec clib: remove buffer.[ch]
Summary: These are unused, no need to keep the code around.

Reviewed By: DurhamG

Differential Revision: D24055085

fbshipit-source-id: 6246d746983a575c051ddcb51ae02582a764a814
2020-10-02 10:47:23 -07:00
Xavier Deguillard
a4e27d898d lib: remove portability/dirent.h
Summary: This is unused.

Reviewed By: DurhamG

Differential Revision: D24055083

fbshipit-source-id: bc6bbcf765ccb8c277e4a06e9fc3f033cd01733a
2020-10-02 10:47:23 -07:00
Xavier Deguillard
30ef9bdcf1 extlib: remove large parts of cstore/ctreemanifest
Summary:
This code is effectively unused. The only bit still relevant is that EdenFS
still depends on the Manifest class to parse a manifest.

Reviewed By: DurhamG

Differential Revision: D24037723

fbshipit-source-id: 901ae2ffc8960a95ec655a2e14d79afb8d32dcab
2020-10-02 10:47:22 -07:00
Xavier Deguillard
c16ab69c6a build: remove //eden/scm:cstore
Summary: This is unused, let's remove it.

Reviewed By: DurhamG

Differential Revision: D24037722

fbshipit-source-id: bc8a272809cb1f20f54d651a39ee42ff57169534
2020-10-02 10:47:22 -07:00
Durham Goode
42b3a1b6bc py3: support outputing bytes via templater
Summary:
The 'diff()' template needs to be able to output non-utf8 patches.
To enable this, let's change the templater to output bytes instead of strings.

Note, the templater supports json output, which requires utf8 encoded values. In
that situation we escape any non-utf8 binary and clients would have to be aware
and unescape them.

Reviewed By: quark-zju

Differential Revision: D24029105

fbshipit-source-id: aa011696c0d97281b91c6871c116037d76c178e0
2020-10-02 07:27:08 -07:00
Durham Goode
c90936941f schemes: remove schemes extension
Summary:
This is unused code. It broke a test while I was doing python 3 work,
so let's just delete this.

Reviewed By: quark-zju

Differential Revision: D24063953

fbshipit-source-id: 323b323ff2b9717c9c16eed54adac467a321e2ae
2020-10-02 07:27:08 -07:00
Jun Wu
5048a060d6 localrepo: log changelog backend types
Summary: Log changelog backend types so we can filter commands by type.

Reviewed By: DurhamG

Differential Revision: D24022284

fbshipit-source-id: c402aea0ce3bd20d0f310fea167f24cb1b7a3ae6
2020-09-30 16:21:42 -07:00
Arun Kulshreshtha
2016586fe2 pyprogress: add Python bindings for Rust progress crate
Summary: Add Python bindings to the Rust progress wrappers. This may seem pointless since the Rust code just calls right back into Python, but this is a useful step to get the Rust and Python code to use a common interface for progress. (Which, in turn, will allow switching to a Rust progress implementation down the line.)

Reviewed By: markbt

Differential Revision: D23999816

fbshipit-source-id: 9bca0f23170d3ca474a1cb5d547840e63572ec71
2020-09-30 13:01:15 -07:00
Arun Kulshreshtha
8e94a59c67 hghave: update description of py2 feature
Summary: Description erroneously refers to Python 3.X.

Reviewed By: quark-zju

Differential Revision: D24009652

fbshipit-source-id: be6c90514e68dc12f0b8f6b63e58f98f786558e8
2020-09-29 21:46:02 -07:00
Jun Wu
8dc618b1cd runtests: set tracing level before running tests
Summary:
With the new tracing-core (0.1.10 ->  0.1.16), it's no longer effective
to set EDENSCM_TRACE_LEVEL to more verbose within the test.
Let's set it in run-tests.py which spawns the test process instead.

Reviewed By: kulshrax

Differential Revision: D24004327

fbshipit-source-id: db2cadc7334eb59b25a1e0517e3d1a513e31e0fe
2020-09-29 21:19:20 -07:00
Durham Goode
eb5acf9222 tests: disable flakey tests
Summary:
These tests rely on sleep to simulate race conditions. They are the
largest source of hgbuild breakages. Let's just disable them. Most of this code
is going away in a couple months anyway when Mononoke takes over and revlogs go
away.

Also fixes a failure in test-bookmarks-strip.t that showed up.

Reviewed By: singhsrb

Differential Revision: D23922660

fbshipit-source-id: 35cacc19de03c031c84c1ebf2124884f4b4248e6
2020-09-24 21:32:23 -07:00
Xavier Deguillard
dc19397ccc doctor: use the right indexedlog config
Summary:
The remotefilelog.indexedlog{data,history}store configs are no longer in use,
so we shouldn't use them as a way to test whether the indexedlog are present.

Reviewed By: quark-zju

Differential Revision: D23918133

fbshipit-source-id: 902a369f5e1774b8e2fa1e4b3280fbb7cc377775
2020-09-24 16:58:36 -07:00