Commit Graph

24 Commits

Author SHA1 Message Date
Saul Gutierrez
ab6d0116b3 histedit: get rid of fold-temp-revision for fold
Summary: When using `hg histedit` and doing folds (or rolls) a temporary commit was created unrelated to the actual results, named `fold-temp-revision`. With these changes that commit is no longer created.

Reviewed By: quark-zju

Differential Revision: D32788375

fbshipit-source-id: b9cfd07f22ff8a3803c60d39c412ee1d328419f0
2021-12-15 09:50:04 -08:00
Jun Wu
f2c3496b91 drawdag: use a single transaction
Summary:
This reduces disk flushes, and is more efficient.

The main motivation is to avoid a situation where each added commit becomes
part of `visibleheads`. For example, drawdag:

  C
  |
  B
  |
  A

would previously have visibleheads change from `A` to `B` to `C`, but now
`visibleheads` is only `C` without having the `B` or `A` state.

Reviewed By: singhsrb

Differential Revision: D32436069

fbshipit-source-id: 30274b1158c5eb796bc24101dc892c334c0f0287
2021-11-15 13:22:01 -08:00
Jun Wu
deea1aaa91 drawdag: make behavior consistent with obsstore and mutationstore
Summary:
Previously, the `debugdrawdag` command adds bookmarks, then the bookmarks get
removed by the `drawdag` shell function in tests.

The implementation of bookmarks has a subtle difference depending on whether
mutation store is used:
- If mutation store is used, bookmarks are not written for hidden commits.
- If obsstore (legacy) is used, bookmarks are written for all commits.

Some tests rely on the legacy obsstore behavior. Let's make `debugdrawdag`
print all commits and be able to skip writing bookmarks so we can migrate
tests relying on the legacy obsstore.

Reviewed By: DurhamG

Differential Revision: D31877893

fbshipit-source-id: a191957da57e031fa763d654d3ba581b1642901b
2021-11-02 18:01:20 -07:00
Jun Wu
9bf6b674a6 config: use Rust graph render as default
Summary: Change the legacy Python graph render to Rust renderer.

Reviewed By: DurhamG

Differential Revision: D24317802

fbshipit-source-id: 4c3dc3a6dd02b7ebe79596a8e77f4b6b139d2e20
2020-10-19 17:07:30 -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
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
3bbdfd3743 revset: successors(x) should only show visible commits
Summary:
I found this when I aborted an rebase Dxxx and trying rebasing again and it
complained about "nothing to rebase". It was caused by Dxxx resolving into
a hidden commit.

Reviewed By: sfilipco

Differential Revision: D23307794

fbshipit-source-id: f7a956b5300240089b6a4648f28cf4a152ee2433
2020-08-27 18:14:28 -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
5c567018c8 tests: enable narrow-heads for more tests
Summary: Migrate more tests to use narrow-heads.

Reviewed By: DurhamG

Differential Revision: D22130171

fbshipit-source-id: 92a1b1dc237a7f66b4430ef680d1a2f60e715778
2020-07-02 13:22:28 -07:00
Jun Wu
6554961897 tests: replace 'phase --public' with 'debugmakepublic'
Summary: This makes narrow-heads migration smoother.

Reviewed By: ikostia

Differential Revision: D22052478

fbshipit-source-id: 83047ad6da4de2034c917bfd5be47a2f32d5cc3d
2020-06-29 11:29:04 -07:00
Durham Goode
9473b487b5 tests: enable treemanifest for ~100 more tests
Summary:
Enables treemanifest for about 100 more tests. To make them pass I had
to expose the gettreepack capability from peers, which just works, and enable
treeonly and sendtrees by default in the tests, which I probably should've done
before anyway.

Reviewed By: quark-zju

Differential Revision: D21894955

fbshipit-source-id: 7a6a4d453824fb8c81a797a5487bf2ecc2b67761
2020-06-10 19:29:48 -07:00
Xavier Deguillard
dd81246300 tests: enable more python3 tests
Reviewed By: DurhamG

Differential Revision: D20931013

fbshipit-source-id: 018a5268ad9fd59030c06217e7f7e6eee000ece6
2020-04-10 11:22:59 -07:00
Jun Wu
9715911327 templatekw: fix predecessors with only mutation enabled
Summary: The template should use mutation instead of obsutil if mutation is enabled.

Reviewed By: markbt, simpkins

Differential Revision: D20901109

fbshipit-source-id: a2b587ddf2a03965886f753e54e075d5d9064f05
2020-04-07 15:11:30 -07:00
Mark Thomas
ac80212e8f mutationstore: remove mutation entry origins
Summary:
Tracking the origin of mutation entries did not prove useful, and just creates
an un-necessary overhead.  Remove the tracking and repurpose the field as a
version field.

Reviewed By: quark-zju

Differential Revision: D20444365

fbshipit-source-id: 65ff11ee8cfe77d5e67a83d03a510541d58ef69b
2020-03-17 04:18:44 -07:00
Mark Thomas
3690e8ab44 debugmutation: add time range limiting
Summary:
Make it possible to limit the time range of mutation info being displayed by hg
debugmutation.

Reviewed By: DurhamG

Differential Revision: D19904000

fbshipit-source-id: 365f54fdd861661961bba1a0ea96fce772623a23
2020-02-17 06:41:03 -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
633382de11 tests: update tests-[i-p]*.t to use new tinit features
Reviewed By: quark-zju

Differential Revision: D19457680

fbshipit-source-id: 2be941f22525ed2d9f5a1aa3c92af38fb612eb46
2020-01-20 02:45:16 -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
Mark Thomas
05f1ef73b2 obsolete: add option for disabling evolution
Summary:
Allow disabling of evolution and obsolescence markers by setting
`experiemental.evolution=obsolete`.

Reviewed By: quark-zju

Differential Revision: D19411232

fbshipit-source-id: 89601a93cff1f87d04b7230fcb6c1e91cf074e92
2020-01-16 01:03:23 -08:00
Mark Thomas
eef0c650e7 mutation: make the mutationstore the source of truth for mutation entries
Summary:
Previously the mutation commit extras were the source of truth for mutation
information, and the mutation store served as a kind of cache.  This turned out
to be less useful than expected, as oftentimes commits are missing, and the
store is better indexed, so in practice using the store as the source of truth
is better.

This change makes the mutationstore the (sole) source of truth for mutation
data.  The extras are kept, but they are now only useful as human-readable
debug information, and to ensure the commit hash is unique.

Collecting the mutation information during commit creation is now done through
a new `mutinfo` object.  This is a dict with the same keys as the mutation
extras, for simplicity, but it is now passed through the `committablectx` and
used to generate the mutation store entry directly.

The `mutation.enabled` config option is now used to control all aspects of
enabling mutation.

The `mutation.record` config option is now only used to indicate whether the
mutation extras should also added to the commit.  Generally this should be set
to `true`, however the option is retained so that mutation extras can be
stripped by running `hg amend --config mutation.record=false`, which no longer
has the side-effect of not recording mutation information to the store.

The "remote commit" mutation record origin is now obsolete, and won't be
generated anymore.

Pushrebase now relies on the obsmarker information coming back from the server
in order to correctly generate mutation information.  We will need to change
this so that the server returns mutation records before we can fully deprecate
obsmarkers.

Reviewed By: DurhamG

Differential Revision: D19410650

fbshipit-source-id: 8d7094e4bfd8d8e97916898d899a8debd339485f
2020-01-16 01:03:22 -08:00
Durham Goode
e1c73204f6 drawdag: use bookmarks instead of tags
Summary:
A future diff will remove tags entirely, so let's move drawdag to be
bookmark based.

Reviewed By: quark-zju

Differential Revision: D18995059

fbshipit-source-id: 70ef67259b37ef9821009d0145aa1e03c09b1309
2019-12-20 16:14:18 -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
Jun Wu
05b53a4d7b metalog: discard in-memory metalog at lock/transaction boundary
Summary:
Before this diff, metalog has a same lifetime as repo.svfs and never gets
reloaded or dropped. That is problematic in case external processes also
make changes, ex. running `hg amend` in `histedit exec`.

    pid 1> histedit action foo (a single transaction, metalog loaded here)
    pid 1> histedit action exec ... (a single transaction)
    pid 2> hg amend (changes metalog)
    pid 1> histedit action bar (cannot perform this action because metalog has
           conflicts!)

This is why test-mutation.t didn't work with metalog.

Fix it by discarding metalog state at transaction/lock boundary (enter/exit).

The next two diffs add checks so we wouldn't discard uncommitted data silently.

Reviewed By: xavierd

Differential Revision: D18519995

fbshipit-source-id: ceb030362d66ad4be142e81accb82a4afa67f305
2019-11-27 00:24:08 -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