Commit Graph

58821 Commits

Author SHA1 Message Date
Jun Wu
358e35f067 test-globalrevs: use modern configs
Summary:
Enable mutation, remotenames and narrow-heads (for clients).

Some `x` commits are shown because the server repo cannot hide them.

Reviewed By: DurhamG

Differential Revision: D22200501

fbshipit-source-id: 35abe5198025598f4f5ef8807c2eaa6f3b2f2318
2020-07-02 13:22:34 -07:00
Jun Wu
ed8fd9202c hgsql: disable modern features more aggressively
Summary:
D21894320 (64585a5895) tries to disable features from hgsql. However tests can
run hg commands with hgsql extension turned on or off, and that
messes up things.

Let's test the hgsql requirement and disable related features unconditionally
so we have more confident that the related features won't be turned on
accidentally.

Previously, the `initclient` helper function will create repos with the `hgsql`
requirement. Since we're using the repo requirement to disable features, disable
`hgsql` temporarily during `initclient` so that the client repos can still have
modern features like visibility and narrow-heads.

The globalrevs test is affected and temporarily disabled. It will be fixed in
follow-ups.

Reviewed By: DurhamG

Differential Revision: D22200507

fbshipit-source-id: 3715464430a9115bb00122a8dfa03b1abf9d03ab
2020-07-02 13:22:34 -07:00
Jun Wu
eceb3179c4 hgsql: make CorruptionError more verbose
Summary: This helps debugging some hgsql issues especially in test-globalrevs.

Reviewed By: DurhamG

Differential Revision: D22200509

fbshipit-source-id: cddf79a00951d135dee20a5e9fb3a486abad2ff7
2020-07-02 13:22:34 -07:00
Jun Wu
31b655c656 testutil: make traceback in dott test more useful
Summary:
Without the change the traceback looks like:

```
Traceback (most recent call last):
  File "eden/scm/tests/testutil/dott/shobj.py", line 103, in __del__
    out = self.output
  File "eden/scm/tests/testutil/dott/shobj.py", line 67, in output
    self._output = func(*args[1:], **kwargs) or ""
  File "eden/scm/tests/test-globalrevs-t.py", line 499, in checkglobalrevs
    isgreaterglobalrev("desc('h2')", "desc('g1')") == ""
  File "eden/scm/tests/test-globalrevs-t.py", line 480, in isgreaterglobalrev
    if getglobalrev(left) > getglobalrev(right):
  File "eden/scm/tests/test-globalrevs-t.py", line 469, in getglobalrev
    return int(s)
ValueError: invalid literal for int() with base 10: ''
```

There is no clue about who calls `checkglobalrevs`.

With this change the extra context is provided and it's easy to find out the code is around line 517:

```
Before executing:
  File "eden/scm/tests/test-globalrevs-t.py", line 517, in <module>
    sh % "cd ../master2"
  File "eden/scm/tests/testutil/dott/shobj.py", line 161, in __mod__
    return LazyCommand(command)
  File "eden/scm/tests/testutil/dott/shobj.py", line 38, in __init__
    _checkdelayedexception()
  File "eden/scm/tests/testutil/dott/shobj.py", line 204, in _checkdelayedexception
    traceback.print_stack()
```

Note: before D19649475 (a634526801) the traceback looks like more useful but it's hard to
create that traceback on Python 3:

```
Traceback (most recent call last):
  File "eden/scm/tests/test-globalrevs-t.py", line 517, in <module>
    sh % "cd ../master2"
  File "eden/scm/tests/testutil/dott/shobj.py", line 161, in __mod__
    return LazyCommand(command)
  File "eden/scm/tests/testutil/dott/shobj.py", line 38, in __init__
    _checkdelayedexception()
  File "eden/scm/tests/testutil/dott/shobj.py", line 202, in _checkdelayedexception
    exec("raise exctype, excvalue, tb")
  File "eden/scm/tests/testutil/dott/shobj.py", line 103, in __del__
    out = self.output
  File "eden/scm/tests/testutil/dott/shobj.py", line 67, in output
    self._output = func(*args[1:], **kwargs) or ""
  File "eden/scm/tests/test-globalrevs-t.py", line 499, in checkglobalrevs
    isgreaterglobalrev("desc('h2')", "desc('g1')") == ""
  File "eden/scm/tests/test-globalrevs-t.py", line 480, in isgreaterglobalrev
    if getglobalrev(left) > getglobalrev(right):
  File "eden/scm/tests/test-globalrevs-t.py", line 469, in getglobalrev
    return int(s)
ValueError: invalid literal for int() with base 10: ''
```

Reviewed By: DurhamG

Differential Revision: D22200508

fbshipit-source-id: 07088eac72763f890cc847b9991d79fed18ee0ef
2020-07-02 13:22:34 -07:00
Jun Wu
c08c19572e mutation: drop copypreds handling in the Python land
Summary: The Rust land handles this.

Reviewed By: markbt

Differential Revision: D22174953

fbshipit-source-id: 8023e698fde2463c20028e979d37b677a536c327
2020-07-02 13:22:34 -07:00
Jun Wu
868c2b0108 mutationstore: copy entries automatically on flush
Summary:
Similar to D7121487 (af8ecd5f80) but works for mutation store. This makes sure at the Rust
layer, mutation entries won't get lost after rebasing or metaeditting a set of
commits where a subset of the commits being edited has mutation relations.

Unlike the Python layer, the Rust layer works for mutation chains. Therefore
some of the tests changes.

Reviewed By: markbt

Differential Revision: D22174991

fbshipit-source-id: d62f7c1071fc71f939ec8771ac5968b992aa253c
2020-07-02 13:22:34 -07:00
Jun Wu
2f1d35b06e mutationstore: break cycles for get_dag
Summary: Avoids infinite loops creating the DAG.

Reviewed By: markbt

Differential Revision: D22174978

fbshipit-source-id: ec54665a9d5b88a97fce988456041f9aabc824d6
2020-07-02 13:22:34 -07:00
Jun Wu
d647045a5f mutation: lift "1:1" restriction for get_dag
Summary:
Enforcing 1:1 handling is causing trouble for multiple reasons:
- Test cases like "Metaedit with descendant folded commits" in
  test-mutation.t requires handling non-1:1 entries.
- Currently operations like `metaedit-copy` uses two predecessors (edited,
  copied). It is considered 1:1 rewrite (rewriting 1 commit to
  another 1 commit). However, it does not use multiple records, therefore
  cannot be distinguished from `fold`, which is not 1:1 rewrite and also
  has multiple predecessors. We want to include the `metaedit-copy`
  entries in the 1:1 DAG too.

Therefore lift the 1:1 restriction and let's see how it works.

Reviewed By: markbt

Differential Revision: D22175008

fbshipit-source-id: 84d870dbcc433a0d0e5611a83c93781bfa59d035
2020-07-02 13:22:34 -07:00
Jun Wu
d745424bf9 dag: add a utility to help break cycles
Summary:
This makes it easier to remove cycles in other places.

There are probably fancier and more efficient algorithm for this.
For now I just wrote one that is easy to verify correctness.

Reviewed By: markbt

Differential Revision: D22174975

fbshipit-source-id: 8a2dc755e4bc0b066eda5f42a51208c92409f2f9
2020-07-02 13:22:34 -07:00
Jun Wu
fb27a098a0 test-amend-metaedit: enhance metaedit-copy test cases
Summary: Showing that it does not work for a chain of amends (or metaedits).

Reviewed By: DurhamG

Differential Revision: D22174968

fbshipit-source-id: ff942042b69f96e1cc7092a7003cf4608730a66f
2020-07-02 13:22:33 -07:00
Jun Wu
39b5e99ad8 directaccess: remove extension
Summary:
With narrow-heads (enabled in production and most tests) directaccess is a
no-op. Remove the extension.

Reviewed By: DurhamG

Differential Revision: D22174990

fbshipit-source-id: 662f800cebc3cc7614fa921e4367c4d1f8806eb4
2020-07-02 13:22:33 -07:00
Jun Wu
e8e68cb945 test-rebase-copy-relations: use modern configs
Summary:
Switch to modern configs. It does not quite work right yet, which will be fixed
in follow-ups.

Reviewed By: DurhamG

Differential Revision: D22174966

fbshipit-source-id: d52234ec588a3a92512635291f64fa1819a4424b
2020-07-02 13:22:33 -07:00
Jun Wu
b7e7daec2d test-infinitepush-bundlestore: use modern setups
Summary: It passes with some changes.

Reviewed By: DurhamG

Differential Revision: D22174988

fbshipit-source-id: 1fcefa81d979e01291cb9f646adcfdae46bb47f1
2020-07-02 13:22:33 -07:00
Jun Wu
53b6ab3861 test-debugstrip: use modern setups
Summary: It passes with minor change.

Reviewed By: DurhamG

Differential Revision: D22175006

fbshipit-source-id: 6c5416fc64b065ea1d39eb2ed0cf3e4f873c4cb9
2020-07-02 13:22:33 -07:00
Jun Wu
177d97adb6 test-rename-after-merge: enable visibility
Summary:
This is one of the very few tests that didn't have visibility on.
The blocker was `hg rollback` behavior difference.

Reviewed By: DurhamG

Differential Revision: D22175000

fbshipit-source-id: 4067818c3cde8dade1a47671e8df6558ae348f6e
2020-07-02 13:22:33 -07:00
Jun Wu
0b77c3a7b1 test-visibility: enable narrow-heads
Summary:
Made some edits, mostly about `--hidden`, and phases to make the test
compatible.

Mutation store cannot represent undo (unamend) relationship and hidden
but non-obsoleted commits show up as `o`.

Reviewed By: DurhamG

Differential Revision: D22175001

fbshipit-source-id: 75dcc66238b4f465f5ac183278359d133758faf6
2020-07-02 13:22:33 -07:00
Jun Wu
b3e8cbb300 test-commitcloud: enable mutation for some tests
Summary: They are compatible now.

Reviewed By: DurhamG

Differential Revision: D22174970

fbshipit-source-id: f4825420529dac7c63a28df6c41aa40a254a4b33
2020-07-02 13:22:33 -07:00
Jun Wu
50e46cb0b3 test-fb-hgext-pushrebase: enable modern configs
Summary:
With lots of edits, mostly maintaining bookmarks, the test is compatible with
modern configs.

Reviewed By: DurhamG

Differential Revision: D22174985

fbshipit-source-id: b88cd25da36ebcde908c1b63a15f90e82d1692cb
2020-07-02 13:22:32 -07:00
Jun Wu
7ab22e23a0 test-fb-hgext-pushrebase: make it a bit more verbose
Summary: This makes it easier to see changes with modern configuration.

Reviewed By: DurhamG

Differential Revision: D22174957

fbshipit-source-id: c49f270281c06debd055435362b95509093c1e99
2020-07-02 13:22:32 -07:00
Jun Wu
93e45ff8a4 test-histedit-fold: enable modern configs
Summary: With some edits the test is compatible with modern configs.

Reviewed By: DurhamG

Differential Revision: D22174972

fbshipit-source-id: 971740f3a94048c15fcfc09436df7e09b3e169b8
2020-07-02 13:22:32 -07:00
Jun Wu
a47ebe97c2 test-histedit-edit: enable modern configs
Summary:
Stripping does break `histedit --abort`. Seems not worthwhile to support since
strip is rare. Edit the test so it's using modern configs.

Reviewed By: DurhamG

Differential Revision: D22174965

fbshipit-source-id: 090b92946311e192b9ee36ffa27718a62fc791ee
2020-07-02 13:22:32 -07:00
Jun Wu
47fdcbf7ac test-fb-hgext-remotefilelog-linknodes: enable modern configs
Summary: This test needs a few edits to be compatible with modern setup.

Reviewed By: DurhamG

Differential Revision: D22175002

fbshipit-source-id: 1b75b6535a46bd21d746259778b079f6c53a94d0
2020-07-02 13:22:32 -07:00
Jun Wu
4155a7063c test-fb-hgext-remotefilelog-local: enable modern configs
Summary: This test needs a few edits to be compatible with modern setup.

Reviewed By: DurhamG

Differential Revision: D22174969

fbshipit-source-id: 8f9c1b926d05070cfd8f17ca539693fa580de421
2020-07-02 13:22:32 -07:00
Jun Wu
de7450f3fb test-fb-hgext-treemanifest: enable modern configs
Summary:
This test needs some edits to be compatible with modern setup.  Some
tests about legacy features are removed.

Reviewed By: DurhamG

Differential Revision: D22174983

fbshipit-source-id: e62de2b9571f3366b9c3c4bbfdb66cd7d990e317
2020-07-02 13:22:32 -07:00
Jun Wu
ad33709d93 test-fb-hgext-treemanifest-treeonly: enable modern configs
Summary:
This test needs a lot manual edits to be compatible with modern setup.  Some
tests about legacy features are removed.

Reviewed By: DurhamG

Differential Revision: D22174976

fbshipit-source-id: 09ef10f94438753469ed8725a4b8a5bdfed177cf
2020-07-02 13:22:32 -07:00
Jun Wu
998f09b3ec test-fb-hgext-tweakdefaults: enable modern configs
Summary:
This test needs some manual edits to be compatible with modern setup.
Some tests about legacy features are removed.

Reviewed By: DurhamG

Differential Revision: D22174997

fbshipit-source-id: 0423a45c4d085f4b1128b11b5f0b9876ed82e950
2020-07-02 13:22:32 -07:00
Jun Wu
c84731b9b2 test-fb-hgext-tweakdefaults: migrate off revision numbers
Summary: This test needs some manual editing to fully migrate off revision numbers.

Reviewed By: DurhamG

Differential Revision: D22174980

fbshipit-source-id: baf2ea5f591870fa7560b8a9d23c2a357851e028
2020-07-02 13:22:31 -07:00
Jun Wu
3d1a257f58 test-hggit-extra: enable modern configs
Summary: Needs a minor change and the test is now compatible.

Reviewed By: DurhamG

Differential Revision: D22174960

fbshipit-source-id: e39800165737463d20e67cf1ce9b8f7cd4115be5
2020-07-02 13:22:31 -07:00
Jun Wu
0eb12d09dc test-remotenames: enable modern configs
Summary: These 2 tests only have revision number changes.

Reviewed By: DurhamG

Differential Revision: D22174959

fbshipit-source-id: 5a9176081149f043a0bc468ac9b8ab7392105ef2
2020-07-02 13:22:31 -07:00
Jun Wu
3c8236a4c0 test-remotenames-pull-rebase: enable modern configs
Summary: Needs some manual changes.  This makes the test use modern configs.

Reviewed By: DurhamG

Differential Revision: D22174977

fbshipit-source-id: 494123168ff027212d77dfd3480142597bbd54a9
2020-07-02 13:22:31 -07:00
Jun Wu
9ac7828d5b test-histedit-*: enable modern configs for some easy tests
Summary:
Those tests only need minor fixes like using `max(desc(x))` to avoid selecting
older `x` commits. Changes are only about revision numbers.

Reviewed By: DurhamG

Differential Revision: D22174984

fbshipit-source-id: a3032acb879030e3873839bfe44877f358e63f36
2020-07-02 13:22:31 -07:00
Jun Wu
dd5bb7bb58 test-histedit-arguments: enable modern configs
Summary: This enables mutation, visibility and narrow-heads.

Reviewed By: DurhamG

Differential Revision: D22174986

fbshipit-source-id: 4b3cb0de7e25b14aaafba07b877fd0a153a8fcb7
2020-07-02 13:22:31 -07:00
Jun Wu
064973a4ba tests: migrate some noevolution tests off revision numbers
Summary: By fix-revnum.py. This makes them easier to migrate to modern setups.

Reviewed By: DurhamG

Differential Revision: D22174963

fbshipit-source-id: 4f59685f93742305dafb3b347e5e80b92bcf0c99
2020-07-02 13:22:31 -07:00
Jun Wu
a2195a9c53 test-rebase-dest: enable modern configs
Summary: With fix-revnum.py the test can be easily migrated.

Reviewed By: DurhamG

Differential Revision: D22174994

fbshipit-source-id: 272fcf890d5e6e5b6791d957361fe59e0266742a
2020-07-02 13:22:31 -07:00
Jun Wu
6ed8ba77b9 test-rebase-rename: enable modern configs
Summary: With some manual edits and fix-revnum.py the test is now compatible.

Reviewed By: DurhamG

Differential Revision: D22174971

fbshipit-source-id: c28a45df3b3ab5c976609e934c3eab2dd39a4734
2020-07-02 13:22:31 -07:00
Jun Wu
5d32484cf3 test-rebase-transaction: enable modern configs
Summary: It's only revision number changes.

Reviewed By: DurhamG

Differential Revision: D22175004

fbshipit-source-id: df18e65e974aff169c523917a8c2ea656903e71a
2020-07-02 13:22:31 -07:00
Jun Wu
1f362e9651 test-rebase-scenario-global: enable modern configs
Summary: Still need some manual changes. But the test now works reasonably.

Reviewed By: DurhamG

Differential Revision: D22174954

fbshipit-source-id: 33be68c7a5ce9c7689e830837ce38bb55ca2cc25
2020-07-02 13:22:30 -07:00
Jun Wu
79154c88ab test-rebase-scenario-global: fix usage of revision numbers
Summary: This is done by running the fix-revnum.py script.

Reviewed By: DurhamG

Differential Revision: D22174981

fbshipit-source-id: 1c99100ce5c984a6dd67cc92d14ec077e3e4b7b4
2020-07-02 13:22:30 -07:00
Jun Wu
473b07c328 tests: add a way to fix revision number usages automatically in tests
Summary:
Some tests use too many revision numbers (ex. test-rebase-scenario-global.t).
It's time consuming to fix it manually. Write a script to help with that.

This will be used by the next diff.

Reviewed By: DurhamG

Differential Revision: D22174956

fbshipit-source-id: a873ad326ecbd9cdfa2df58839b0ef21626e1506
2020-07-02 13:22:30 -07:00
Jun Wu
5265f6d372 test-rebase-newancestor: enable modern configs
Summary:
This turns on modern setups including visibility, mutation and narrow-heads.
The test used revision numbers. Changing them to non-revision-numbers fixes it.

Reviewed By: DurhamG

Differential Revision: D22174962

fbshipit-source-id: c851afecaf18b989888e7f40d69ffaa58cda95bd
2020-07-02 13:22:30 -07:00
Jun Wu
ad3c659616 test-rebase-interruptions: enable modern configs
Summary: This enables modern setup for the test.

Reviewed By: DurhamG

Differential Revision: D22175003

fbshipit-source-id: 6e153d4c48e02420c43989e317139d66b89da1da
2020-07-02 13:22:30 -07:00
Jun Wu
4dd49baba7 test-rebase-inmemory: enable modern configs
Summary:
The test used a lot of revision numbers. Changing them to non-revision-numbers
fixes it.

Reviewed By: DurhamG

Differential Revision: D22174974

fbshipit-source-id: 51915afa481ac0263eaeaa3339df8e10a2bc35d5
2020-07-02 13:22:30 -07:00
Jun Wu
dfd8ab5938 test-rebase-detach: enable modern configs
Summary:
This turns on modern setups including visibility, mutation and narrow-heads.
The test used revision numbers. Changing them to non-revision-numbers fixes it.

Reviewed By: DurhamG

Differential Revision: D22174958

fbshipit-source-id: 2a8c178021be9931e66b77f00d3de59d8c794ce5
2020-07-02 13:22:30 -07:00
Jun Wu
a539962c38 test-rebase-conflicts: enable modern configs
Summary:
This turns on modern setups including visibility, mutation and narrow-heads.
The test used revision numbers. Changing them to non-revision-numbers fixes it.

Reviewed By: DurhamG

Differential Revision: D22175005

fbshipit-source-id: c6292f10c27d03102df13a71332ef7a0304d5807
2020-07-02 13:22:30 -07:00
Jun Wu
f4f263fef9 test-rebase-bookmarks: enable modern configs
Summary:
This turns on modern setups including visibility, mutation and narrow-heads.
The test used revision numbers. Changing them to non-revision-numbers fixes it.

Reviewed By: DurhamG

Differential Revision: D22174964

fbshipit-source-id: 74d45b1b497497dfb6fa4b685e862d1bce4d4e5c
2020-07-02 13:22:30 -07:00
Jun Wu
942bc0cf0c test-rebase-flag: enable modern configs
Summary:
This turns on modern setups including visibility, mutation and narrow-heads.
Test seems fine - just revision number changes.

Reviewed By: DurhamG

Differential Revision: D22174998

fbshipit-source-id: fadec9b56be3cd3d5117f7418635e4d6042a52eb
2020-07-02 13:22:29 -07:00
Jun Wu
9c9545f5c3 test-fb-hgext-pushrebase-hgsql-mfs: delete the test
Summary:
The test was about pushing to hgsql servers. Nowadays we push to Mononoke
directly and sync to hgservers in a very different code path. Delete the
test as it's no longer relevant and involves too much low level details
to be compatible with modern setups.

Reviewed By: DurhamG

Differential Revision: D22174967

fbshipit-source-id: 08006bcf59090505d6116dbc024cb9378d27cf02
2020-07-02 13:22:29 -07:00
Jun Wu
2bd81db543 test-fb-hgext-fbhistedit-rebase-interactive: enable modern configs
Summary:
This turns on modern setups including visibility, mutation and narrow-heads.
The test only needs a few revision number fixup.

Reviewed By: DurhamG

Differential Revision: D22174973

fbshipit-source-id: 47470971fb361ac0bec45b932ad3fb66950f0d1c
2020-07-02 13:22:29 -07:00
Jun Wu
5434e42738 test-copy-move-merge: enable modern configs
Summary:
This turns on modern setups including visibility, mutation and narrow-heads.
The test only needs a revision number fixup.

Reviewed By: DurhamG

Differential Revision: D22174989

fbshipit-source-id: 3cef08e4e2214c9ffabc34fdd6e35cd02101172c
2020-07-02 13:22:29 -07:00
Jun Wu
04ddfd3c37 test-convert-hg-sink: turn on visibility and narrow-heads
Summary: Assign bookmarks explicitly to make commits visible.

Reviewed By: DurhamG

Differential Revision: D22174982

fbshipit-source-id: 5310e2f3fd53145c903b824043b0f6591517a156
2020-07-02 13:22:29 -07:00