Commit Graph

13 Commits

Author SHA1 Message Date
Durham Goode
9c1b611dff indexedlog: make writing to indexedlog the default
Summary:
We've rolled both of these out to 100%. Let's make this the default so
we can delete those configs.

Reviewed By: quark-zju

Differential Revision: D26233645

fbshipit-source-id: cd7a08c404483f78ab714763870f5bf0fa801e7a
2021-02-11 09:34:55 -08:00
Jun Wu
027709fa36 pull: use the new repo.pull API if possible
Summary:
The `pull` commmand has a lot of tech debt (with issues like inefficiency, race
conditions, named branches, etc). The new `repo.pull` API isn't designed to
support all legacy usecases.

This diff switches a subset of `pull` command that the new API can support to
the new API. It should solve race condition or `visibility.add` inefficiency
issues (ex. 20s on addgroup, 187s on visibility.add - P154836357).

Logic related to remotenames was ported from the remotenames extension.
The selectivepull tests seem strong enough to check their behaviors.

The new pull API is used by commit cloud for many months. So I turned the
new code path on by default. It can be turned off by changing
`commands.new-pull`.

There are a few test changes. The new behavior seems more correct overall:
- test-commitcloud-switch-workspace.t
  - "M/F" swap is caused by rev number: both are correct
  - "S: public remote/stable" is more correct than "S: draft"
- test-commitcloud-sync-rb-deletion.t
  - "draft1: draft remote/scratch/draft1" is more correct because
    "remote/scratch/draft1" is listed in the "book --list-subs"
    command above.
- test-commitcloud-sync-rb-enabling.t
  - "public1: draft" not showing up is more correct.
- test-fb-hgext-remotefilelog-lfs-prefetch.t
  - Difference seems to be caused by rev order.

Reviewed By: markbt

Differential Revision: D25562089

fbshipit-source-id: ac22b2f0492ab53517d580d706dfbc823fd0e0cc
2021-01-11 13:28:15 -08:00
Jun Wu
4da3addbee tests: migrate off rev numbers for more tests
Summary:
Change by `fix-revnum.py`. Part of the tests using `hg debugstrip`,
which I'm trying to avoid.

Reviewed By: DurhamG

Differential Revision: D22240181

fbshipit-source-id: a569b712fe4b985378e5c61c000deecccefbc488
2020-07-06 14:04:28 -07:00
Xavier Deguillard
dc8c24ab30 remotefilelog: enable the rust stores by default
Summary:
The Rust store code has been enabled everywhere for a few weeks now, let's
enable it by default in the code. Future changes will remove the config as well
as all the code associated with the non Rust store code.

The various tests changes are due to small difference between the Rust code and
the Python one, the biggest one being it's handling of corrupted packfiles. The
old code silently ignored them, while the new one errors out for local
packfiles. The test-lfs-bundle.t difference is just due to an ordering
difference between Python and Rust.

Reviewed By: kulshrax

Differential Revision: D21985744

fbshipit-source-id: 10410560193476bc303a72e7583f84924a6de820
2020-06-23 18:47:44 -07:00
Jun Wu
ff888f03a6 repair: remove "saved backup bundle to" message
Summary:
The code path printing that message is rarely used in production setup.  This
makes transition to mutation easier.

Reviewed By: sfilipco

Differential Revision: D21913595

fbshipit-source-id: 3aa22575c11e38dbb7d4c4cbc7aad8dde2e755ed
2020-06-10 19:29:54 -07:00
Jun Wu
219554305e clone: add a new clone function with less tech-debt
Summary:
The current `clone --shallow` command has some issues:
- It fetches *all* remote bookmarks, since selectivepull does not work with
  streamclone, then remove most remote bookmarks in a second transaction.
- It goes through remotenames, which is racy, and D20703268 does not fix the
  clone case. Possible cause of T65349853.
- Too many wrappers (ex. in remotefilelog, remotenames, fastdiscovery) wtih
  many configurations (ex. narrow-heads on/off) makes it hard to reason about.

Instead of bandaidding the clone function, this diff adds a new clone implementation
that aims to solve the issues:
- Use streamclone, but do not pull all remote names.
- Pull selectivepull names explicitly with a working "discovery" strategy
  (repo heads should be non-empty with narrow-heads on or off).
- Do clone in one transaction. Outside world won't see an incomplete state.
- Use `repo.pull` API, which is not subject to race conditions.
- Eventually, this might be the only supported "clone" after Mononoke becoming
  the single source of truth.

Note: the code path still goes through bookmarks.py and remotenames.py.
They will be cleaned up in upcoming diffs.

Reviewed By: DurhamG

Differential Revision: D21011401

fbshipit-source-id: d8751ac9bd643e9661e58c87b683be285f0dc925
2020-05-12 10:23:23 -07:00
Durham Goode
48aec8ca41 py3: misc fixes to remotefilelog and treemanifest
Reviewed By: quark-zju

Differential Revision: D19747715

fbshipit-source-id: da6716ff46342d777d45bec8e560ab41d544645f
2020-02-17 14:52:33 -08:00
Zeyi (Rice) Fan
92f6f35e7a mark all tests requiring Python 2
Summary:
This diff marks **ALL** mercurial tests requiring Python 2 feature.

After you fixes some tests, simply remove the `py2` feature requirement and that tests will be continuously run after your diff is landed.

To bypass this feature requirement, run the tests command with `HGTEST_FORCE_PY2=1`. For example:

```
HGTEST_FORCE_PY2=1 buck test //eden/scm/tests:hg_run_tests
```

or

```
HGTEST_FORCE_PY2=1 python run-tests.py
```

----

Basically this diff are created with the following commands:

```
$ sed -i 's/import feature\(.*\)$/import feature\1\n\nfeature.require(["py2"])/' test-*-t.py
$ sed -i '1s/^/#require py2\n/' test-*.t
$ ls | grep -P "^test.*(?<\!-t)\.py$" > list && vim -p $(cat list)
# manually adding feature requires for these Python tests.
```

(Note: this ignores all push blocking failures!)

ignore-conflict-markers

Reviewed By: singhsrb

Differential Revision: D19655148

fbshipit-source-id: 985e3ccb4010cc559049f1d89f8909bc2d9b5e20
2020-01-30 18:49:21 -08:00
Mark Thomas
b654a9aae5 tests: use disable treemanifest in place of setconfig
Summary: Use `disable treemanifest` in place of `setconfig extensions.treemanifest=!`

Reviewed By: quark-zju

Differential Revision: D19457678

fbshipit-source-id: 47c8b3c4f4ed5cfc97275ca67afab4a86ffe7f0d
2020-01-20 02:45:15 -08:00
Jun Wu
ba2d83b3f8 pull: remove "new changesets" message
Summary:
Reverts https://www.mercurial-scm.org/repo/hg/rev/eb586ed5d8ce.

The colon syntax (x:y) is deprecated and is unsupported by segmented changelog.

Reviewed By: DurhamG

Differential Revision: D19394101

fbshipit-source-id: 8c66756f1035ab7660180716a2afa052879f384e
2020-01-14 21:02:27 -08:00
Xavier Deguillard
38139a9785 tests: make file fetching messages optional
Summary:
The Rust ContentStore will not print these, and in order to better understand
what tests are broken with it enabled, let's make them optional.

Reviewed By: quark-zju

Differential Revision: D19318848

fbshipit-source-id: 87a1da510b51adc40a0d08157925a990456d3e9c
2020-01-09 07:46:59 -08:00
Jun Wu
75a8173a10 tests: enable chg for 572 tests
Summary:
Add `#chg-compatible` to 572 tests that seem to pass with chg enabled.
This should make them run faster.

Reviewed By: xavierd

Differential Revision: D18870507

fbshipit-source-id: fe895e733efffc9286cd3d17c7a156c803124395
2019-12-09 15:26:29 -08:00
Adam Simpkins
ab3a7cb21f Move fb-mercurial sources into an eden/scm subdirectory.
Summary:
In preparation for merging fb-mercurial sources to the Eden repository,
move everything from the top-level directory into an `eden/scm`
subdirectory.
2019-11-13 16:04:48 -08:00