Commit Graph

1259 Commits

Author SHA1 Message Date
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
Jun Wu
be797a960b test-run-tests: remove pygments test
Summary:
The test might fail with wrong pygments detection (ex. hghave runs with
different python that runs run-tests.py). It's not critical. Remove it.

Example failure:

   #if no-windows pygments
     $ rt test-failure.t --color always
  +  warning: --color=always ignored because pygments is not installed

  -  \x1b[38;5;124m--- test-failure.t\x1b[39m (esc)
  -  \x1b[38;5;34m+++ test-failure.t.err\x1b[39m (esc)
  -  \x1b[38;5;90;01m@@ -1,4 +1,4 @@\x1b[39;00m (esc)
  +  --- test-failure.t
  +  +++ test-failure.t.err
  +  @@ -1,4 +1,4 @@
        $ echo "bar-baz"; echo "bar-bad"; echo foo
  -  \x1b[38;5;34m+  bar*baz (glob)\x1b[39m (esc)
  +  +  bar*baz (glob)
        bar*bad (glob)
  -  \x1b[38;5;124m-  bar*baz (glob)\x1b[39m (esc)
  -  \x1b[38;5;124m-  | fo (re)\x1b[39m (esc)
  -  \x1b[38;5;34m+  foo\x1b[39m (esc)
  +  -  bar*baz (glob)
  +  -  | fo (re)
  +  +  foo

Differential Revision: D28852093

fbshipit-source-id: 98397cb79bedc0c605131462483b78eb5bc2671a
2021-06-02 16:08:06 -07:00
Durham Goode
a2410c8783 tests: fix more run-tests.py Python 3 issues
Summary: These are breaking buck test runs

Reviewed By: quark-zju

Differential Revision: D28802741

fbshipit-source-id: a30c7b64d72356df05676ffab87291a246033d49
2021-06-01 11:43:09 -07:00
Jun Wu
b488208048 changelog2: support migrating from revlog to lazy backend directly
Summary:
Previously it requires migrating to doublewrite first. There is no reason why
the doublewrite migration cannot be done automatically. So let's do it.

Reviewed By: DurhamG

Differential Revision: D28757734

fbshipit-source-id: ba2533b5506309610b87865a838d7efe22bccfac
2021-05-27 17:35:19 -07:00
Durham Goode
38be9c8f05 tests: fix run-tests.py diff output with Python 3
Summary:
The migration to Python 3 broke the unified diff code because difflib
expected the paths to also be bytes.

Reviewed By: quark-zju

Differential Revision: D28758876

fbshipit-source-id: 367ef237594d2908377cd8b81def364b77ee02e2
2021-05-27 14:10:07 -07:00
Jun Wu
7617f2ef23 rm: do not list clean files with -A
Summary:
`rm -A` means removing files that are "deleted" (`rm`-ed but not `hg rm`-ed).
It does not need to list clean files. Listing clean files can be very slow
in a large repo.

Avoid listing clean files so `rm -A` can be faster.

This has a side effect that we no longer maintain the exit value (0: repo
becomes empty, 1: repo is not empty) like before. But I guess nobody really
cares the 1 exit value (and it does not really make sense in the `rm -A`
case).

Reviewed By: DurhamG

Differential Revision: D28622558

fbshipit-source-id: 2087d6508932905564a8307e9438895538ecede9
2021-05-27 11:28:51 -07:00
Durham Goode
92b4a86bf4 runtests: stop using bytes for paths and environment variables
Summary:
The usage of bytes for paths and environment variables makes this entire file hacky and makes it not work on Windows.  Let's remove all of that.

We still use bytes for test output and other file content type cases.

Reviewed By: andll

Differential Revision: D28227825

fbshipit-source-id: b15993601db501160c9fa4eb2463678cde1fa554
2021-05-27 09:52:16 -07:00
Jun Wu
38db21c8d8 changelog2: migrating to lazy makes changelog lazy
Summary:
Previously, migrating to lazy means repo requirement changes. This diff uses
the new API to actually make the changelog lazy.

Reviewed By: DurhamG

Differential Revision: D28700896

fbshipit-source-id: 82cfd70645230cd67223195e25ef07ae5abe7df6
2021-05-26 19:18:57 -07:00
Jun Wu
1721f5f866 debugrebuildchangelog: support rebuild with lazy segmented changelog
Summary:
Switch debugrebuildchangelog from using revlog stream clone to lazy segment clone.
This removes the revlog techdebt and can be used as a way to repair
repos with broken segmented changelog. As we migrate off double-write backend we
can no longer migrate down to revlog then migrate up, and a full reclone can be
slow. So a partial reclone command that just recreates the segmented changelog
seems useful.

This command is one of the two commands that handle emergency situations
when segmented changelog related logic goes wrong. The other command
is the emergency clone mode, added by D27897892 (d1413bbbad), which assumes everything
related to segmented changelog is broken on Mononoke side and we still
need to commit and push. This command relies on segmented changelog
related features, such as hash<->location lookup, and clone on Mononoke
to work properly and the server having a compatible IdMap. So it might
not be able to address all issues if Mononoke goes wrong.

Reviewed By: DurhamG

Differential Revision: D28430885

fbshipit-source-id: 17357a33f6fda4a67d46e2c7e7be6653b530f499
2021-05-26 19:00:01 -07:00
Jun Wu
74db74527e test-debugchangelog: prepare commits in the master group
Summary:
This will be used by the next change to test migrating from a non-lazy
changelog to a lazy changelog actually makes commits lazy.

More commits were added to the graph to test laziness. The old graph
does not have commits that will be made lazy by the current standard
(parents of merges are not lazy).

Reviewed By: DurhamG

Differential Revision: D28700897

fbshipit-source-id: 527c3ce672327ed5e2398c0d89a8e9e92e5b244f
2021-05-26 15:27:16 -07:00
Durham Goode
2e6735be81 patch: fix infinite loop for incorrect patches
Summary:
If a patch declared the length of it's last hunk as N lines, but it
only contained N-1 lines, the Rust code would enter into an infinite loop. This
could happen if a text editor remove the trailing spaces from a patch file.

Let's fix it and add a test

Reviewed By: kulshrax

Differential Revision: D28683977

fbshipit-source-id: 0a999ae108676531a2cf18e77a3b426ba4647164
2021-05-26 11:18:19 -07:00
Jun Wu
c72cd2333f metalog: remove conditional metalog logic
Summary:
Now metalog can no longer be `None`. Let's just remove logic handling its
`None` case.

This changes the commitcloud-sync-race test because the metalog itself has
internal locking and changes are atomic.

Reviewed By: DurhamG

Differential Revision: D28595292

fbshipit-source-id: bd9851f5f3bb25f28f15d673f608af2863953c46
2021-05-25 19:43:45 -07:00
Jun Wu
1f8d8cfbf0 store: always enable store and fncache
Summary:
fncache and store have been default on for years. Enable them unconditionally.
This also makes sure that metalog is always available.

Practically, the only place that does not use fncache is hgsql server repos and
they are irrelevant now.

Reviewed By: DurhamG

Differential Revision: D28595289

fbshipit-source-id: 32b9906c179518acdb17a206b54f98a3dc994921
2021-05-25 19:43:45 -07:00