Commit Graph

11 Commits

Author SHA1 Message Date
Jun Wu
a3ac43a23a rollout: use doublewrite changelog backend for hg-dev
Summary:
Turn on rust changelog (changelog2) for all hosts (except hgsql).

Turn on doublewrite backend for hg-dev hosts, triggered by pull.
Tests are mostly working, and I have been using it for weeks.

Reviewed By: singhsrb

Differential Revision: D24259759

fbshipit-source-id: b89a27f98a6d3d1e4ea187bf7b29f875d0e96e2e
2020-10-20 15:53:57 -07:00
Jun Wu
b46a5b6192 copies: improve compatibility with segmented changelog
Summary:
There are 2 issues:
- len(repo) is no longer the "max rev" + 1. Use 1<<63 instead.
- If invalidatelinkrev is a repo requirement, linkrev can no longer be trusted.

Reviewed By: DurhamG

Differential Revision: D24270423

fbshipit-source-id: 4e5c999772fad6ef2b1dabd2d6363d4226242c4d
2020-10-20 15:24:28 -07:00
Jun Wu
a7ba754d88 rebase: remove more uses of revnums
Summary: Replace revnum with commit hashes.

Reviewed By: singhsrb

Differential Revision: D24233229

fbshipit-source-id: 98b4d45b542b65c375cef405b45b66cd2dad22e4
2020-10-20 15:24:28 -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
Durham Goode
420dcf9c63 py3: fix copy tracing
Summary: filter returns a generator in Python 3, but we need a list.

Reviewed By: singhsrb

Differential Revision: D23720661

fbshipit-source-id: 8de3f5844bfe8b85b37c44423733fd2a09967397
2020-09-16 09:27:36 -07:00
Jun Wu
99d2054889 changelog: initial support for segmented changelog
Summary:
Add a way to actually try out segmented changelog by setting
`format.use-segmented-changelog`.

The main compatibility issues are assumptions that `0 .. len(repo)` are valid
revision numbers. Segmented changelog uses 2 spans `0 .. len(master_group)`
and `<a large 64-bit int> ..` for the non-master group. Some assumptions
about `len(repo)` were removed.

Segmented changelog also does not support linkrevs since revs can be
re-assigned. Some logic (ex. in treemanifest) that relies on linkrev being
`len(repo)` is changed.

There might be other issues, which will be fixed once we discover them.

Reviewed By: sfilipco

Differential Revision: D22657187

fbshipit-source-id: 688ad718741de0ca15e6aeaf84aced24a20c6b09
2020-08-04 09:59:11 -07:00
Jun Wu
24e46bb082 strip: use Rust strip for testing
Summary:
The Rust strip logic works for both revlog and segmented changelog. Use it in
tests for easier segmented changelog migration.

The old revlog strip has a lot of complexities on linkrev. Since this is only
used for testing, I avoided the complexities by just saying all linkrevs are
invalidated so we can skip the complexities of dealing with filelog or
manifest, or generating a temporary bundle and unbundling them later.

Most test changes are because we no longer strip filelogs. So unbundling
them will not add new file revisions.

`test-repair-strip.t` is removed because it is only about "Permission Denied"
cases. With the new code path file logs are not stripped and the test is not
relevant.

This does not affect hgsql as it has the Rust logic totally disabled.

Reviewed By: DurhamG

Differential Revision: D22402198

fbshipit-source-id: 1c207393f59a8a3a601cfbdf7f07534b8acf46bf
2020-07-20 17:27:52 -07:00
Mark Thomas
49166dbdfd format: apply latest Black formatting
Summary: Reformat using a newer version of Black.

Reviewed By: quark-zju

Differential Revision: D21426337

fbshipit-source-id: 1ac7f6e85a06feec0d41e9509eca09194f421a1d
2020-05-07 09:07:49 -07:00
Jun Wu
3b3c1d62cb copies: repo.revs -> repo.nodes
Summary: Remove a use-case of revision numbers.

Reviewed By: sfilipco

Differential Revision: D20355670

fbshipit-source-id: d7aebb31dcf4bac9f592956d48f5d84a525394b4
2020-03-11 10:42:20 -07:00
Mark Thomas
82715fd2ea py3: iter{keys,values,items} -> pycompat.iter{keys,values,items}
Reviewed By: quark-zju

Differential Revision: D19608323

fbshipit-source-id: dd186ef16d6422a56af41fcaa850d9838ae9a240
2020-01-28 16:27:28 -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