Commit Graph

1271 Commits

Author SHA1 Message Date
Jun Wu
5b1b1febc1 nameset: do not resolve nullid remotely
Summary: The Rust NameSet does not have nullid. Do not bother resolving remotely.

Reviewed By: kulshrax

Differential Revision: D29437983

fbshipit-source-id: f1eb73e738281b3b5096fba22ba92833f5a4f3ee
2021-06-28 14:36:39 -07:00
Jun Wu
4ecb46990a pull: use heads(master_group) as the "old" master in fast path
Summary:
The remotenames information might be out of sync with the DAG.
Use the DAG's master group's head for the pull fast path "old" master so that
even if the remotenames is stale for some reason, the fast path still works.

Reviewed By: andll

Differential Revision: D29434719

fbshipit-source-id: 7bbd0757dc6a9428f86663ac4989f7c30b365b46
2021-06-28 12:50:26 -07:00
Jun Wu
0e125b2246 pull: add a test about a suboptimal case
Summary:
If a user Ctrl+C-ed (or something else interrupts) between flushing changelog
and flushing metalog (remotenames).  The pulled commits will exist in the local
graph and break the next time using the fast path.

Reviewed By: andll

Differential Revision: D29434720

fbshipit-source-id: e7ca7542691279644679effb06707a1d305541af
2021-06-28 12:50:26 -07:00
Jun Wu
285d8646ef pull: ui.debug => tracing.debug
Summary:
This is a better practice. It avoids debug messages from other places (ex.
discovery).

Reviewed By: andll

Differential Revision: D29434721

fbshipit-source-id: 5990f0174e9b61aed7d9d56252df63b571364070
2021-06-28 12:50:25 -07:00
Jun Wu
bb7914ab50 remotenames: skip pull for modern clone paths
Summary:
The remotenames has logic to work with legacy clones to write the remotenames
state. However, modern clone paths take care of remotenames directly so there
is no need to do an extra pull by remotenames.

Reviewed By: DurhamG

Differential Revision: D29428883

fbshipit-source-id: a73c0ee716b09f4e34d6fa30997f961284678d13
2021-06-28 12:25:17 -07:00
Jun Wu
e454f71fa9 localrepo: write .hg/reponame on repo creation
Summary: Make dynamicconfig pick up the repo name because hgrc gets written.

Reviewed By: DurhamG

Differential Revision: D29428878

fbshipit-source-id: fbf578cd7c770a4541fff3b85ff40c40cd5a6cc5
2021-06-28 12:25:17 -07:00
Jun Wu
91f01464e6 dynamicconfig: include reponame and username in header comment
Summary:
This makes it easier to debug wrong reponame issues.

In theory those need to be checked and the config needs to be regenerated if
they are changed for correctness. Given that username and reponame are rarely
changed, I saved it for later.

Reviewed By: DurhamG

Differential Revision: D29428880

fbshipit-source-id: f996af6a7a1e329faaa8b0a53dac8621fa94dac8
2021-06-28 12:25:17 -07:00
Jun Wu
a26181e39e dirsync: skip metaedit commits
Summary: This avoids issues in assertions used by metadataonlyctx.

Reviewed By: DurhamG

Differential Revision: D29430672

fbshipit-source-id: 4de305d62f65a9d6c4fb2e3f375ef20d9d94d41c
2021-06-28 11:21:05 -07:00
Jun Wu
eead6bc10e tests: add a test to demonstrate metaedit+dirsync issue
Reviewed By: DurhamG

Differential Revision: D29430673

fbshipit-source-id: d17a25e892d20dc006ed97d60239b53fb4fbebcc
2021-06-28 11:21:05 -07:00
Andrey Chursin
26759fa8aa pull: fallback to slow path on root conflict
Reviewed By: quark-zju

Differential Revision: D29399075

fbshipit-source-id: b623f46beba5254b08d14a25187eee300454a1ff
2021-06-25 18:51:00 -07:00
Andrey Chursin
9712359884 pull: use fast path pull for master
Summary:
Use segmented changelog fast path during master branch pull
This change is gated by a config

Reviewed By: quark-zju

Differential Revision: D29347804

fbshipit-source-id: f0cc7633e67fb04266ce15506375873d58ea77fc
2021-06-24 20:36:13 -07:00
Jun Wu
b5b41b733c test-fb-hgext-treemanifest-peertopeer: fix test on macOS
Summary: macOS's `wc -l` prints extra spaces. Remove them.

Differential Revision: D29367789

fbshipit-source-id: 23ccacd015a1c5cdc186fcb0c282dd63f4171021
2021-06-24 15:17:06 -07:00
Jun Wu
e396cab669 dag: include roots in pull data
Summary:
The roots data will be useful for the client to check if the pulled commits are
going to overlap with its existed DAG.

Reviewed By: andll

Differential Revision: D29363808

fbshipit-source-id: e09d924d65537f59fd4ea209b568265d07a80e46
2021-06-24 15:12:58 -07:00
Jun Wu
03003242b0 debuginternals: new command to list or export internal states
Summary:
Sometimes we need repo internal states for deeper investigation. Right now
the process is quite adhoc - telling people to figure out where the "backing"
repo is, excluding unwanted files like 00changelog.d, etc. Let's just make
it easier so we have a dedicated command to tar up selected internal states.

Reviewed By: andll

Differential Revision: D29242716

fbshipit-source-id: 85604d0df5b3a12f1aed29e4f31fcd5c166f9066
2021-06-24 12:31:47 -07:00
Andrey Chursin
fc47068389 debugsementpull: introduce debug command to pull using segmented chanelog
Summary:
This is simple command mostly to be used by testing before we fully integrate with hg pull

This command does not perform discovery and requires from/to revision to be passed in cmd line

Reviewed By: quark-zju

Differential Revision: D29315647

fbshipit-source-id: 26d67031e566b7c99af1e2a5ab287f02b52f7db0
2021-06-23 17:58:26 -07:00
Meyer Jacobs
5e9a33e11e tests: fix test-fb-hgext-treemanifest-peertopeer.t on mactest
Summary: `|&` apparently fails on mactest, so I've replaced it with `2>/dev/stdout | ` which works on my devserver and macbook.

Reviewed By: andll

Differential Revision: D29337621

fbshipit-source-id: eaac2592f4c7bfda6696c2500f3b08441b596c39
2021-06-23 16:11:41 -07:00
Meyer Jacobs
640767d414 scmstore: track contentstore fallbacks
Summary:
Introduce basic contentstore fallback tracking to help monitor the scmstore shim rollout.

This will be expanded to a general fetch metrics system for scmstore in a future change.

Reviewed By: kulshrax

Differential Revision: D29305839

fbshipit-source-id: c6cc3ea15a3bb7b90f4ec298febc911ec4e2af91
2021-06-23 15:26:26 -07:00
Meyer Jacobs
b5858adee1 scmstore: update remaining tests
Summary: Update the remaining tests for scmstore. In each of these cases we're just disabling scmstore for various reasons. I think `test-lfs-bundle.t` and `test-lfs.t`'s failures represents a legitimate issue with scmstore's contentstore fallback, but I don't think it should block the rollout

Reviewed By: kulshrax

Differential Revision: D29289515

fbshipit-source-id: 10d055bf679db8efdeb16ac96b7ed597d7b6d82c
2021-06-22 13:14:58 -07:00
Meyer Jacobs
43a75431bb scmstore: update additional test
Summary: Only four tests remaining after this.

Reviewed By: kulshrax

Differential Revision: D29229656

fbshipit-source-id: 56c0a17f6585263e983ce8bc3c345b1f266422e0
2021-06-21 20:32:50 -07:00
Meyer Jacobs
88ab7198bc scmstore: update more tests
Summary: Update more tests to avoid relying on pack files and legacy LFS, and override configs in `test-inconsistent-hash.t` to continue using pack files even after the scmstore rollout to test the Mononoke's response to corruption, which is not currently as easy with indexedlog.

Reviewed By: quark-zju

Differential Revision: D29229650

fbshipit-source-id: 11fe677fcecbb19acbefc9182b17062b8e1644d8
2021-06-21 20:32:50 -07:00
Meyer Jacobs
b489f6b1c8 tests: modify tests to exercise non-packfile configuration
Summary:
Remove packfile-specific parts of tests and modify them to test without depending on packfiles where possible.

Currently debugindexedlogdatastore and debugindexedloghistorystore appear to be broken, and debugdumpindexedlog just dumps the raw indexedlog contents, without any semantic information, so for the time being I've simply removed most packfile inspection.

Reviewed By: DurhamG

Differential Revision: D29099241

fbshipit-source-id: 86c4f9c83520374560587b8bec5c569d9c5c6510
2021-06-18 17:39:52 -07:00
Meyer Jacobs
5b1a16077f scmstore: actually fix undesired file logging
Summary: My previous fix was actually incorrect, we now log actual remote requests, but join that with the logs from the contentstore fallback.

Reviewed By: DurhamG

Differential Revision: D29206878

fbshipit-source-id: d22e58792bf380c274e8086ce08aebe20dd9b848
2021-06-18 17:39:52 -07:00
Mark Juggurnauth-Thomas
759d6fc5b7 commitcloud: remove syncing of obsmarkers
Summary: Obsolescence markers have been deprecated in favour of mutation and visibility for some time.  Remove syncing of obsmarkers via the commit cloud service.

Reviewed By: liubov-dmitrieva

Differential Revision: D29159443

fbshipit-source-id: 33e1d526a9df5c02059931c880529d695036c616
2021-06-17 06:09:02 -07:00
Jun Wu
d12a1fe872 test-inherit-mode: stabilize the test
Summary:
In some envs the mode 02775 gets printed, and some other envs have 00775:

    --- test-inherit-mode.t
    +++ test-inherit-mode.t.err
    @@ -85,7 +85,7 @@
       006?0 ./.hg/store/00changelog.i (glob)
       00664 ./.hg/store/00changelog.len
       00660 ./.hg/store/00manifest.i
    -  02775 ./.hg/store/allheads/
    +  00775 ./.hg/store/allheads/
       00664 ./.hg/store/allheads/index2-node
       00664 ./.hg/store/allheads/log
       00664 ./.hg/store/allheads/meta

Allow both in the test.

Reviewed By: singhsrb

Differential Revision: D29185622

fbshipit-source-id: 40995c3941a88dbae7ad484c1a3abf9cded40bab
2021-06-16 23:33:42 -07:00
Meyer Jacobs
94be2053d5 tests: remove pack file-only tests
Summary: Pack files are no longer supported, yet we still have many tests which exercise them. In preparation for landing `scmstore` as a drop-in replacement for ContentStore, I'm removing our tests which only exist to test datapack-specific functionality.

Reviewed By: DurhamG

Differential Revision: D29099012

fbshipit-source-id: 635a913ee0d93ed8d536e71f8fa6a600b823b343
2021-06-15 19:00:58 -07:00
Andres Suarez
0f273c5ded update globset from 0.4.5 to 0.4.7
Summary:
The only real change here is: https://github.com/BurntSushi/ripgrep/pull/1756
This is a patch release but fixes a very glaring bug that others have
depended on. This diff fixes the uses to match the old behavior.

Although it's billed as a "fix", it's actually a huge perf improvement
for Linttool, which uses predominantly recursive suffix globs. The fact
that we don't have to compile ~5,000 regexps at Linttool startup anymore
makes such a huge difference that I am going to do write up soon.

Reviewed By: ndmitchell

Differential Revision: D29085977

fbshipit-source-id: 304470e5fa8cb986738aa0d9dd941641684a9194
2021-06-15 15:47:49 -07:00
Jun Wu
be06ac3ada hgcommands: add debugdumpdynamicconfig for no-repo use-cases
Summary:
The added command gives access to read (execute) dynamicconfig without
using an on-disk repo.

It can be used by the clone script to stage rollout lazy changelog, or just to
verify dynamic config changes without using a repo.

Reviewed By: DurhamG

Differential Revision: D29123072

fbshipit-source-id: e8856d816a636fa860bfcc9694306a4a37552523
2021-06-15 10:48:01 -07:00
Jun Wu
1e2b3cf87a configmodel: impl Config on BTreeMap<String, String>
Summary: This allows BTreeMap to be used as a provide of config for testing.

Reviewed By: andll

Differential Revision: D28019023

fbshipit-source-id: 94a1585139d6c6612fa163f2ff1aecc909db3a72
2021-06-13 09:19:22 -07:00
CodemodService Bot
cb6754e1d8 Daily arc lint --take BLACK
Reviewed By: zertosh

Differential Revision: D29058106

fbshipit-source-id: e114f36939ad24a41e1211258824184552b7655e
2021-06-11 04:13:52 -07:00
Jun Wu
8cc60851cb clindex: remove the extension
Summary:
It is only useful for Python revlog-based changelog, which was removed by the
previous diff.

Reviewed By: DurhamG

Differential Revision: D29020190

fbshipit-source-id: 3332f1532a510dc72f21d68801e093b5eba10145
2021-06-10 20:28:27 -07:00
Meyer Jacobs
8f9bcf232a scmstore: basic scmstore & sha256-based status
Summary:
Modify the status command to prefer comparing content sha256 when comparing files over comparing content directly, using cached aux data when possible and writing newly computed hashes to cache.

A new config option, `scmstore.status`, gates this new behavior.

When `scmstore.status` is enabled, the `status` output should be more accurate, not assuming files with non-matching `HgId`s in an arbitrary pair of revisions are different. As written, this will cause fetching of data that wouldn't otherwise be fetched, but remote fetching of aux data is planned.

This change also doesn't introduce batch fetching, this is planned.

Reviewed By: DurhamG

Differential Revision: D28826219

fbshipit-source-id: dcd253f169723983738148559d61ba655dd453a4
2021-06-10 18:24:59 -07:00
Jun Wu
fa7466cf90 doctor: work with non-revlog changelog
Summary:
Make `doctor` aware of non-revlog changelog and do not hide commits
incorrectly.

Reviewed By: DurhamG

Differential Revision: D29020189

fbshipit-source-id: af7fab75a877997e3f11dd21e506c965da078f83
2021-06-10 14:44:27 -07:00
Jun Wu
6f63fe94d0 test-doctor: demonstrate it hides commits incorrectly for non-revlog changelog
Summary: The doctor command assumes revlog changelog, which does not cover all setups.

Reviewed By: DurhamG

Differential Revision: D29020188

fbshipit-source-id: 68bb4e20efb49482df84a71ab7d86a20a6fa93ce
2021-06-10 14:44:27 -07:00
Jun Wu
3765f8bd76 changelog: remove Python revlog-based changelog
Summary: For all clients and tests we're using revlog changelog based on Rust.

Reviewed By: DurhamG

Differential Revision: D29020191

fbshipit-source-id: 44ab603ea07b8891831692285e94ea0e4df849f5
2021-06-10 14:44:27 -07:00
Jun Wu
e4c9a1ae17 verify: make verify a no-op
Summary:
Verify is tightly coupled with revlog details, and assumes a non-lazy repo.
Revlog is going away and our repo is lazy typically, so let's just make verify
a no-op.

Reviewed By: DurhamG

Differential Revision: D28974546

fbshipit-source-id: 487dc65ceb9a1e445b58d03a53353a8382aefc08
2021-06-10 14:44:27 -07:00
Durham Goode
fde02a6e12 getdeps: fix oss-eden_scm-darwin-getdeps
Summary: More python 3 shenanigans.

Reviewed By: quark-zju

Differential Revision: D29005541

fbshipit-source-id: 210d90b0258927019a08fa79a26e38e0f01b4eaa
2021-06-10 14:24:25 -07:00
Jun Wu
b2d5645a09 changelog: remove inline to non-inline changelog migration
Summary:
Practically, our client-side revlog changelogs should be non-inline now for a
long time. There is no need to keep the migration logic.

The revlog is being deprecated too so its implementation details (inline) is
going to be irreverent. The related test is then removed.

Reviewed By: DurhamG

Differential Revision: D28974551

fbshipit-source-id: ea456c46dac11d6a8b225c269b49598ab34c2548
2021-06-10 13:56:59 -07:00
Jun Wu
827bea0b58 linkrevcache: remove the extension
Summary: It was only useful server-side and will be incompatible with upcoming changes.

Reviewed By: DurhamG

Differential Revision: D28974549

fbshipit-source-id: 70a715ce170baa78adb8b1fcf7d29e3d1479c05e
2021-06-10 13:56:59 -07:00
Jun Wu
7dca190311 test-hgsql: remove more hgsql related tests
Summary: hgsql is irrelevant. Remove more tests that will be broken by upcoming changes.

Reviewed By: DurhamG

Differential Revision: D29019287

fbshipit-source-id: 6fd04d2eb088a0ca9c975b25a4f28a5772f0e088
2021-06-10 13:56:59 -07:00
Jun Wu
ceaf71e9bc test-bundle2-remote-changegroup: remove the test
Summary:
This test uses bundle2 details that are hard to maintain.
Let's just remove the test.

Reviewed By: DurhamG

Differential Revision: D29019286

fbshipit-source-id: a64918736039331bf2fc3cd23e9c67dd77510c22
2021-06-10 13:56:59 -07:00
Jun Wu
8fcb63ccd3 test-strip-cross: remove the test
Summary:
This test is too tricky to maintain with modern setups. Namely, we don't
support strip and are dropping revlog usage. Let's just remove the test.

Reviewed By: DurhamG

Differential Revision: D28974550

fbshipit-source-id: e8d30e726735432820ceaf4ef27d1b83753122a4
2021-06-10 12:32:26 -07:00
Jun Wu
1deab38235 test-treemanifest-server: remove the test
Summary:
We no longer uses this code base for hg server logic.

The test requires non-Rust commit backend which will be removed.

Reviewed By: DurhamG

Differential Revision: D28974547

fbshipit-source-id: 433a6697f6cbf08450c43ce810490fcdb53cf718
2021-06-10 12:32:26 -07:00
Jun Wu
97d1414888 test-revlog: remove the test
Summary: It tests revlog details that are going to be irrelevant.

Reviewed By: DurhamG

Differential Revision: D28974552

fbshipit-source-id: 3ff08473be236849442c3c30d5cf1e1c2a1b628d
2021-06-10 12:32:26 -07:00
Jun Wu
7b3c6a8e7f test-generaldelta: remove the test
Summary: It tests revlog details that are going to be irrelevant.

Reviewed By: DurhamG

Differential Revision: D28974548

fbshipit-source-id: a44e97daa24aece446d899e7711a59cb4a133398
2021-06-10 12:32:26 -07:00
CodemodService Bot
8cddb36cf2 Daily arc lint --take BLACK
Reviewed By: zertosh

Differential Revision: D28957848

fbshipit-source-id: 80ce3c197a09bc924a8920aedb7c7fb093760dd3
2021-06-08 03:55:06 -07:00
Durham Goode
40f304d428 run-tests: more Python 3 fixes
Summary:
More things needing fixing to be python 3 compatible. Caught when
trying to remove the Python 2 build.

Reviewed By: quark-zju

Differential Revision: D28880028

fbshipit-source-id: d162c78237f330f1f931c3581b25ead24e3ea375
2021-06-07 16:46:18 -07:00
Durham Goode
ffa6c61481 run-tests: fix allow/deny list of tests with multiple cases
Summary:
The recent change to make run-tests work with Python 3 broke the
allow/deny list functionality because it started testing the full test name
instead of the base. This fixes that.

Reviewed By: quark-zju

Differential Revision: D28885125

fbshipit-source-id: 586a71e66e0f094b79e6a3e07e27813db6f662d3
2021-06-03 15:54:03 -07:00
Eric Chen (swe)
0ba2c44d90 uncopy: new command to mark files as not copied
Summary: create `uncopy` command to unmark files that were copied using `copy`.

Reviewed By: quark-zju

Differential Revision: D28821574

fbshipit-source-id: c1c15f6fb2837cec529860aba70b516ddd794f10
2021-06-03 13:54:48 -07:00
Jun Wu
94c1c510d7 tests: remove some hgsql tests
Summary:
They are breaking and hgsql is not relevant (hg server repo was forked). So
let's just remove the tests.

Reviewed By: andll

Differential Revision: D28852159

fbshipit-source-id: 04a47ea489b3f190cffe7f714a9f4161847a2c86
2021-06-02 16:08:06 -07:00
Jun Wu
13ab29ce76 runtests: fix remaining issues
Summary:
Fix remaining issues like encoding and `bname` vs `name` difference
(bname was deleted by a previous change, but it's not just encoding
difference from name, bname does not have " (case x)" suffix).

Differential Revision: D28852092

fbshipit-source-id: df013b284414600deb6f20a5c0883f09906bf976
2021-06-02 16:08:06 -07:00