Summary: This avoids depending on the C index if the Rust DAG is available.
Reviewed By: DurhamG
Differential Revision: D22519587
fbshipit-source-id: a89d91184feaeef6641d2b04353601297bf5d4d5
Summary:
Replace the Python spanset with the Rust-backed idset.
The idset can represent multiple ranges and works better with Rust code.
The `idset` fast paths do not preserve order for the `or` operation, as
demonstrated in the test changes.
Reviewed By: DurhamG, kulshrax
Differential Revision: D22519584
fbshipit-source-id: 5d976a937e372a87e7f087d862e4b56d673f81d6
Summary: It looks nicer if we highlight the current workspace in the list.
Reviewed By: mitrandir77
Differential Revision: D22826619
fbshipit-source-id: 416b77fb57d8dfe19057e248e12d411dfc5f9412
Summary:
Some users on macs and dev servers are connected to their default workspace, other
users after D22802064 will be connected to their machine workspace. Assume a
user decides to reclone the repo. Currently, as a result of rejoin, the second batch of the users will
automatically see all their commits from the default workspace and will be a bit
surprised. It makes sense to adapt rejoin logic of choosing the default
workspace if workspace name is not given.
Reviewed By: markbt
Differential Revision: D22817941
fbshipit-source-id: 764034c9f2d774051c5523cb2db093af525f27d7
Summary: Make the output more informative
Reviewed By: markbt
Differential Revision: D22803543
fbshipit-source-id: 35dd4ff0a1f1003690b250d5284e48e6abb4f4b1
Summary:
If the LFS server is down, we are going to retry fetching filenode from the
Mercurial server directly, who is expected to not return a pointer.
Previously, this was achieved by adding a hack into `get_missing`, but since
the function is no longer called during prefetch calls, we cannot rely on it
anymore. Instead, we can wrap the regular remote store and translate all the
StoreKey::Content onto their corresponding hgid keys.
Reviewed By: DurhamG
Differential Revision: D22565604
fbshipit-source-id: 2532a1fc3dfd9ba5600957ed5cf905255cb5b3fd
Summary:
The simplest fix so far is to erase accessed bookmarks state before switching
New cloud join will
Reviewed By: markbt
Differential Revision: D22791409
fbshipit-source-id: 9675ec03c275e42e640d3a95dd5eda2ae084b92b
Summary:
Switching workspaces is good to have before depracating old style backups.
Otherwise it will be too confusing for users who would like to keep their work
on different hosts separate.
Reviewed By: markbt
Differential Revision: D22692393
fbshipit-source-id: abae7667ce24465e69613f3cdd4cd01471fc7704
Summary:
When using LFS, it's possible that a pointer may be present in the local
LfsStore, but the blob would only be in the shared one. Such scenario can
happen after an upload, when the blob is moved to the shared store for
instance. In this case, during a `get` call, the local LFS store won't be able
to find the blob and thus would return Ok(None), the shared LFS store woud not
be able to find the pointer itself and would thus return Ok(None) too. If the
server is not aware of the file node itself, the `ContentStore::get` would also
return Ok(None), even though all the information is present locally.
The main reason why this is happening is due to the `get` call operating
primarily on file node based keys, and for content-based stores (like LFS),
this means that the translation layer needs to be present in the same store,
which in some case may not be the case. By allowing stores to return a
`StoreKey` when progress was made in finding the key we can effectively solve
the problem described above, the local store would translate the file node key
onto a content key, and the shared store would read the blob properly.
Reviewed By: DurhamG
Differential Revision: D22565607
fbshipit-source-id: 94dd74a462526778f7a7e232a97b21211f95239f
Summary:
In some rare situation, it is possible to have an LFS pointer in both the
packfile and the LFS store. In this case, the flags for this filenode may or
may not be empty, making the assert too strong.
Reviewed By: DurhamG
Differential Revision: D22565605
fbshipit-source-id: b82282b3f47af2a9e607f09a7a7d271ecc4e521a
Summary:
I'm not sure how these landed, but they need fixes to work correctly in
python.
Reviewed By: sfilipco
Differential Revision: D22699596
fbshipit-source-id: fb6d237f4de92c5efa3b422ddb86117fc256460f
Summary:
It now passes
This also caught an issue with our wireprotocol serialization for non-ascii
bookmark names.
Reviewed By: quark-zju
Differential Revision: D22655896
fbshipit-source-id: 3312ff2fd13ebaea7988b18ace9a83137f40daa3
Summary: This change introduces a bail macro that allows tagging errors using the syntax `bail!(fault=Fault::Request, "my normal {}", bail_args)` or `bail!(Fault::Request, "my normal {}", bail_args)`.
Reviewed By: DurhamG
Differential Revision: D22646428
fbshipit-source-id: a6ec2940001b26db8ddc3a6d3620a1e17406c867
Summary:
When we change `CommitSyncConfig`, we want to not have to restart `scs` servers, and instead have them pick up the new config by using `LiveCommitSyncConfig`.
This diff turned out larger than I expected, mainly due to the need to introduce various things around `TestLiveCommitSyncConfig`:
- `TestLiveCommitSyncConfig`: the trait implementer to use in `mononoke_api::Repo`
- `TestLiveCommitSyncConfigSource`: the helper struct to keep around for new values injection (very similar to how our `ConfigStore` has an inner `ConfigSource`, which can also be `TestSource`, but here injected values can be `CommitSyncConfig` instead of JSON).
- all the places in integration tests, where `setup_configerator_configs` is now needed (I plan to start setting up configerator configs always in a separate diff, as it is cheap)
Here are the explanations for a few things I think may be not immediately obvious:
- I removed the `Clone` bound from `LiveCommitSyncConfig` trait, as `Clone` traits [cannot be made into trait objects](https://doc.rust-lang.org/book/ch17-02-trait-objects.html#object-safety-is-required-for-trait-objects)
- `TestLiveCommitSyncConfigSource` vs `TestLiveCommitSyncConfigSourceInner` discrepancy is to ensure nobody should instantiate `TestLiveCommitSyncConfigSourceInner` outside of `live_commit_sync_config/src`
- I am aware of the ugly discrepancy between the main `--mononoke-config-path`, which is used to load initial configuration and can be both a file-based and a configerator-based config; and `--local-configerator-path`, used to override config sources for `Tunables` and `LiveCommitSyncConfig`. Ideally these two should just be unified somehow, but that is a little out of scope of this diff (I've already added it to the dirt doc though).
- in `mononoke_api::Repo` there are methods `new_test_xrepo` and `new_test_common`, which changed from maybe accepting just a `CommitSyncConfig` to now maybe accepting both `CommitSyncConfig` and `LiveCommitSyncConfig`. It can be made a bit cleaner: I can just query `CommitSyncConfig` from `LiveCommitSyncConfig` in `new_test_common` and avoid having two args. I was too lazy to do this, lmk if you feel strongly about it.
Reviewed By: StanislavGlebik
Differential Revision: D22443623
fbshipit-source-id: 0d6bbda2223e77b89cc59863b703db5081bcd601
Summary: This makes tests depend less on revision numbers.
Reviewed By: DurhamG
Differential Revision: D22468669
fbshipit-source-id: 74a06930faa3e6ee9d246ecc718c2a3740f57a54
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
Summary:
Extend `_log_exception` to inspect exceptions for metadata, and log any that is found to Scuba. Eventually I'd like to merge at least some of this information from the `perfpipe_hg_errors` table into the `perfpipe_dev_command_timers`.
Introduce `Tagged` mixin and `Fault` enum Python types for tagging Python exceptions.
Introduce `debugthrowexception` for testing Python error handling flow.
Reviewed By: DurhamG
Differential Revision: D22585764
fbshipit-source-id: f6300ae25db25d5e75fab9c2a03fb4f9beb06c1f
Summary: This makes it more compatible if the strip algorithm gets changed.
Reviewed By: DurhamG
Differential Revision: D22402194
fbshipit-source-id: 0d296117c6959c0559bb33dcbe1b2de1624dc3b7
Summary:
I dropped the special case of wdir handling. With the hope that we will handle
the virtual commits differently eventually (ex. drop special cases, insert real
commits to Rust DAG but do not flush them to disk, support multiple wdir
virtual commits, null is no longer an ancestor of every commit).
`test-listkeyspatterns.t` is changed because `0` no longer resolves to `null`.
Reviewed By: DurhamG
Differential Revision: D22368836
fbshipit-source-id: 14b9914506ef59bb69363b602d646ec89ce0d89a
Summary:
This can pick a different common ancestor in criss-cross case.
The test is updated to reflect that.
Reviewed By: DurhamG
Differential Revision: D22368837
fbshipit-source-id: 9f897142b3a4bacd0fc90a4a054b7806f1bde826
Summary:
`unittestify.py` has logic to discover executables. It is hardcode as Python 2
hg for now. Change it to be aware of the Python 3 versions.
Reviewed By: DurhamG
Differential Revision: D22562875
fbshipit-source-id: 2a19ac6ee805e22fbcc2651ada5f4eaa1bc85f51
Summary:
Implements based Rust-Python binding layer for error metadata propagation.
We introduce a new type, `TaggedExceptionData`, which carries CommonMetadata and the original (without metadata) error message for a Rust Anyhow error. This class is passed to RustError and can be accessed in Python (somewhat awkwardly) via indexing:
```
except error.RustError as e:
fault = e.args[0].fault()
typename = e.args[0].typename()
message = e.args[0].message()
```
As far as I can tell, due to limitations in cpython-rs, this can't be made more ergonomic without introducing a Python shim around the Rust binding layer, which could adapt the cpython-rs classes to use whatever API we'd like.
Currently, anyhow errors that are not otherwise special-cased will be converted into RustError, with both the original error message and any attached metadata printed as shown below
```
abort: intentional error for debugging with message 'intentional_error'
error has type name taggederror::IntentionalError and fault None
```
We can of course re-raise the error if desired to maintain the previous behavior for handling a RustError.
If we'd like other, specialized Rust Python Exception types to carry metadata (such as `IndexedLogError`), we'll need to modify them to accept a `TaggedExceptionData` like `RustError`.
Renamed the "cause an error in pure rust command" function to `debugcauserusterror`, and instead used the name `debugthrowrustexception` for a command which causes an error in rust which is converted to a Python exception across the binding layer.
Introduced a simple integration test which exercises `debugthrowrustexception`.
Added a basic handler for RustError to scmutil.py
Reviewed By: DurhamG
Differential Revision: D22517796
fbshipit-source-id: 0409489243fe739a26958aad48f608890eb93aa0
Summary:
This fix was originally meant to prevent doing checkunknown files when
it was clear there was no conflict. Unfortunatley, the data doesn't appear to
show it helped, and in some cases it definitely hurt it. Let's back it out for
now until we can do more investigation.
Reviewed By: StanislavGlebik
Differential Revision: D22574000
fbshipit-source-id: aeb644ecd6da046df17e6d10418a72363c1ee532
Summary:
D22526230 (7ab2c54f08) adds extra output.
The test seems to be skipped in buck test due to the hgsql requirement.
Reviewed By: kulshrax
Differential Revision: D22555707
fbshipit-source-id: 8659de3cda517a49296c747e65bfbd0d372c031a
Summary:
Introduce new rust library, taggederror, which contains utilities for attaching metadata to errors. The library provides two main methods for attaching metadata to an error, the TaggedError wrapper type, and the AnyhowExt trait methods. Provides a struct, CommonMetadata, which contains all the metadata types introduced by taggederror (fault, transience, category, and typename), which can also be attached individually (and the same pattern can be used to attach other metadata).
Introduce a new native rust command, debugthrowrustexception, which causes the command to return an error, with some attached metadata.
Modify hg rust native command dispatch error handling to use debug formatter to print anyhow::Error errors. This will print out the source chain, contexts, and backtrace if available, which will cause the metadata we attach as a wrapper error or context to be printed.
Reviewed By: DurhamG
Differential Revision: D22420941
fbshipit-source-id: d38c5a10b686d86b69a2c0a19f5bcbf4ca24dff6
Summary:
Previously you could only canary locally on a devserver by setting an
environment variable. Let's add a --canary flag to debugdynamicconfig that
accepts a host. Hg will ssh to that host and run the configerator cli to grab
the canaried config from that host.
Reviewed By: quark-zju
Differential Revision: D22535509
fbshipit-source-id: af1c21d8402c4e729769e50388d913bf52b66b89
Summary:
The `helpers-testrepo.sh` runs something like
hg files --cwd /path/to/fbsource/fbcode/eden/scm/tests/
to check if `hg` works or not. Previously it fails fast because of the
lz4revlog requirement. The next diff will enable lz4revlog that makes
`hg files` work.
That `hg files` command (if does not fail) is quite expensive because it has no
patterns and lists every file.
It can also be undesirable if the in-repo hg does some kind of auto migration
that makes the repo unusable by the system hg. Therefore just unconditionally
use the system hg.
Reviewed By: DurhamG
Differential Revision: D22419967
fbshipit-source-id: 2d5c75696efecce1ec38a2e4fa23aff101219545
Summary: `hg revert -i` now works and test-revert-interactive.t now passes
Reviewed By: quark-zju
Differential Revision: D22517586
fbshipit-source-id: 76e3c76ea1687fecbd7d66fff42312dac1300c17
Summary:
Previously we would audit all configs and report them if the
dynamicconfig did not match the rc-file config. Now that dynamicconfigs are
widely deployed, let's switch this around to auditing only configs we know have
had issues. This will let us start adding new configs via dynamicconfigs instead
of via the legacy staticfiles and chef, before we've finished migrating all the
legacy configs over.
Reviewed By: quark-zju
Differential Revision: D22401865
fbshipit-source-id: 5c41c674d39c8113b2a40da61e020e8a33c39312
Summary:
We're seeing cases were cloning can take 10's of GB of memory because
we pend all the history information in memory. Let's flush the history info
every 10 million adds to bound the memory usage.
10 million was chosen somewhat arbitrarily, but it results in pack files that
are 800MB, which corresponds roughly with 8GB of memory usage.
This requires updating repack to be aware that a single flush could produce
multiple packs. Note, since repack writes via this same path, it may result in
repack producing multiple pack files. In the degenerate case repack could
produce the same number (or more) of pack files than was inputted. If we set the
threshold high enough I think we'll be fine though. 800MB is probably
sufficient.
Reviewed By: xavierd
Differential Revision: D22438569
fbshipit-source-id: 425d5d3b7999b81e44d1dbe1f2a4ea453ab6ca4f
Summary: Add a new `EdenApiBlocking` trait that exposes blocking versions of the `EdenApi` trait's methods, for use in non-async code.
Reviewed By: quark-zju
Differential Revision: D22305396
fbshipit-source-id: d0f3a73cad1a23a4f0892a17f18267374e63108e
Summary:
Bypass truncation-based transaction if narrow-heads is on.
The transaction abort still works logically because commit references stay
unchanged on abort.
Related EdenFS and Mononoke tests are updated. Mononoke tests probably
shouldn't rely on revlog / fncache implementation details in hg.
Reviewed By: DurhamG
Differential Revision: D22240186
fbshipit-source-id: f97efd60855467b52c9fb83e7c794ded269e9617
Summary:
With modern configs, repo is unfiltered and `ctx.children()` returns unfiltered
commits. Use the revset function `children` instead so invisible children won't
trigger auto restack.
Reviewed By: DurhamG
Differential Revision: D22421689
fbshipit-source-id: 3ec8f616c17254ee9ccfcad96673d209b9163da6
Summary: The test demostrates an issue with the current auto restack logic.
Reviewed By: DurhamG
Differential Revision: D22421690
fbshipit-source-id: e035cd3212357f24322f8eb9ec5941767ad780d9
Summary:
Make zsh_completion complete standard aliases like `checkout`.
This restores the behavior before D18463299 (54451585ce) stack.
Reviewed By: farnz
Differential Revision: D22396737
fbshipit-source-id: 745761041d6d1dec6adba2efb102e2021a01b36b
Summary:
checkunknown is quite expensive since it has to read the contents of
every untracked file, which can be 10's of thousands of non-parallel stats and
reads. For files that don't exist in the working copy, it's just wasted work to
stat for the files at all. Status can efficiently tell us what files are
unknown, so let's use that to triage most "unknown" files to normal writes
before we even get to checkunknown.
The downside of this approach is that it makes an additional call to status,
which is not cached (only non-unknown+non-ignore+non-clean status calls are
cached). We could add more caching if this is a problem.
This doesn't help the case where a user might have 10k+ untracked files due to a
ctrl+c'd checkout, but we'll improve that in a future diff.
Reviewed By: quark-zju
Differential Revision: D22366758
fbshipit-source-id: b54fec113dc162f97a35e705ed083ddd14babe55
Summary:
The test relies on Python revlog implementation details which
do not exist in the Rust revlog implementation.
Reviewed By: DurhamG
Differential Revision: D22240183
fbshipit-source-id: b245b35e561c3364618a0e199244df030cc47942
Summary:
The original test is unmaintainable. Rewrite it to test key features.
I dropped detailed tests about merge conflict / content handling.
In the future we probalby will have a clean Rust implementation of "applying
diff between X and Y to Z" which can replace various unmaintainable patch
application logic in Python. We can test that Rust library extensively and
commands will just use the clean library (ex. revert, backout)
Reviewed By: sfilipco
Differential Revision: D22240184
fbshipit-source-id: 4d6c65fe02ccc92e64c62a48f702187678973086
Summary:
`debugstrip` is an operation that depends on multiple legacy components (revlog
strip, truncate-based transaction). They are incompatible with modern configs
(no truncation, heads-based visibility, metalog-based transaction).
Avoid using it in the test.
Reviewed By: DurhamG
Differential Revision: D22240187
fbshipit-source-id: ec215d75fb766957a3d6f58e491ef815f5bedbdc
Summary:
Change by `fix-revnum.py`. Part of the tests using `hg debugstrip`,
which I'm trying to avoid.
Reviewed By: DurhamG
Differential Revision: D22240181
fbshipit-source-id: a569b712fe4b985378e5c61c000deecccefbc488
Summary:
Since tests do not use it, and we have long disabled it in production.
Let's just disable the command unconditionally.
Reviewed By: DurhamG
Differential Revision: D22368834
fbshipit-source-id: 7ebc5b07c4044b6809defc06437cda7256cb2ebf
Summary:
`hg rollback` was long disabled in production setup. It has weird behavior and
is likely incompatible with modern transaction frameworks. Remove its usage in
tests.
Reviewed By: DurhamG
Differential Revision: D22240180
fbshipit-source-id: 453684ebbc77132e09b1b717b6ad1e106dcad214
Summary:
End-users have been using visibleheads + narrowheads for a while, and hgsql
does not require any filtering, and most tests are migrated to modern configs
(visibility + narrow heads). Now it's time to consider removing the repoview
layer.
This removes complexities around `changelog.filteredrevs` and various different
`repoview` objects with caching problems (ex. I have seen that `repo` and `unfi`
have inconsistent phasecache causing they calculate phases differently and it's
quite hard to reason about confidently).
This will also make it easier to migrate to segmented changelog.
Reviewed By: DurhamG
Differential Revision: D22201084
fbshipit-source-id: 3661c26dd72a64b5005d86e164af4da5a6895649
Summary:
The test case assumed that clone would return data in order from the server.
That is not a valid assumption and Mononoke doesn't return data in order.
Reviewed By: xavierd
Differential Revision: D22364636
fbshipit-source-id: abfcbe0074a08c9a76c42d351ce5c792eb65e24f
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
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
Summary: This helps debugging some hgsql issues especially in test-globalrevs.
Reviewed By: DurhamG
Differential Revision: D22200509
fbshipit-source-id: cddf79a00951d135dee20a5e9fb3a486abad2ff7
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
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
Summary: Showing that it does not work for a chain of amends (or metaedits).
Reviewed By: DurhamG
Differential Revision: D22174968
fbshipit-source-id: ff942042b69f96e1cc7092a7003cf4608730a66f
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
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
Summary: It passes with some changes.
Reviewed By: DurhamG
Differential Revision: D22174988
fbshipit-source-id: 1fcefa81d979e01291cb9f646adcfdae46bb47f1
Summary: It passes with minor change.
Reviewed By: DurhamG
Differential Revision: D22175006
fbshipit-source-id: 6c5416fc64b065ea1d39eb2ed0cf3e4f873c4cb9
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
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
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
Summary: This makes it easier to see changes with modern configuration.
Reviewed By: DurhamG
Differential Revision: D22174957
fbshipit-source-id: c49f270281c06debd055435362b95509093c1e99
Summary: With some edits the test is compatible with modern configs.
Reviewed By: DurhamG
Differential Revision: D22174972
fbshipit-source-id: 971740f3a94048c15fcfc09436df7e09b3e169b8
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
Summary: This test needs a few edits to be compatible with modern setup.
Reviewed By: DurhamG
Differential Revision: D22175002
fbshipit-source-id: 1b75b6535a46bd21d746259778b079f6c53a94d0
Summary: This test needs a few edits to be compatible with modern setup.
Reviewed By: DurhamG
Differential Revision: D22174969
fbshipit-source-id: 8f9c1b926d05070cfd8f17ca539693fa580de421
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
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
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
Summary: This test needs some manual editing to fully migrate off revision numbers.
Reviewed By: DurhamG
Differential Revision: D22174980
fbshipit-source-id: baf2ea5f591870fa7560b8a9d23c2a357851e028
Summary: Needs a minor change and the test is now compatible.
Reviewed By: DurhamG
Differential Revision: D22174960
fbshipit-source-id: e39800165737463d20e67cf1ce9b8f7cd4115be5
Summary: These 2 tests only have revision number changes.
Reviewed By: DurhamG
Differential Revision: D22174959
fbshipit-source-id: 5a9176081149f043a0bc468ac9b8ab7392105ef2
Summary: Needs some manual changes. This makes the test use modern configs.
Reviewed By: DurhamG
Differential Revision: D22174977
fbshipit-source-id: 494123168ff027212d77dfd3480142597bbd54a9
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
Summary: By fix-revnum.py. This makes them easier to migrate to modern setups.
Reviewed By: DurhamG
Differential Revision: D22174963
fbshipit-source-id: 4f59685f93742305dafb3b347e5e80b92bcf0c99
Summary: With fix-revnum.py the test can be easily migrated.
Reviewed By: DurhamG
Differential Revision: D22174994
fbshipit-source-id: 272fcf890d5e6e5b6791d957361fe59e0266742a
Summary: With some manual edits and fix-revnum.py the test is now compatible.
Reviewed By: DurhamG
Differential Revision: D22174971
fbshipit-source-id: c28a45df3b3ab5c976609e934c3eab2dd39a4734
Summary: Still need some manual changes. But the test now works reasonably.
Reviewed By: DurhamG
Differential Revision: D22174954
fbshipit-source-id: 33be68c7a5ce9c7689e830837ce38bb55ca2cc25
Summary: This is done by running the fix-revnum.py script.
Reviewed By: DurhamG
Differential Revision: D22174981
fbshipit-source-id: 1c99100ce5c984a6dd67cc92d14ec077e3e4b7b4
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
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
Summary: This enables modern setup for the test.
Reviewed By: DurhamG
Differential Revision: D22175003
fbshipit-source-id: 6e153d4c48e02420c43989e317139d66b89da1da
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
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
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
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
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
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
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
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
Summary: It seems the test just passes with the change.
Reviewed By: DurhamG
Differential Revision: D22174979
fbshipit-source-id: 88b940e54fc7a5f71ca839cb583cf219fd3f30b9
Summary:
This test works fine except for stripping rev 0 (the first commit). Since
strip is not used in production for end-users and is likely going away, and we
are unlikely to strip the first commit of a repo on server-side, I just removed
the problematic test case to make it compatible.
Reviewed By: DurhamG
Differential Revision: D22174993
fbshipit-source-id: f362c6209852015558924151b58dc06b16c95df0
Summary: Migrate more tests to use narrow-heads.
Reviewed By: DurhamG
Differential Revision: D22130171
fbshipit-source-id: 92a1b1dc237a7f66b4430ef680d1a2f60e715778
Summary: Most of them need extra server-side bookmarks for deciding phases.
Reviewed By: DurhamG
Differential Revision: D22130169
fbshipit-source-id: 2a4d3301fbf9dd8b8003fc319bda1180c6196ce8
Summary: Those concepts use obsstore. They become no-ops with mutation. Remove them.
Reviewed By: DurhamG
Differential Revision: D22320091
fbshipit-source-id: eb9a8196b6ec8c8164a0d04cb7258c41cd5de596
Summary:
New Commit Cloud command to list user's own worspaces in Commit Cloud
hg cloud ls
Reviewed By: markbt
Differential Revision: D22308127
fbshipit-source-id: 756c419a9bb3d6f50ddd5b4dd344cd35b9a02d2d
Summary:
When rebasing a long stack, it's common to have a long obsoleted (`x`) stack.
The `x` stack is likely duplicated with their successors therefore generally
not that useful. They take a lot of space, making it harder to find useful
commits. Collapse them in smartlog output by only showing their heads and
roots.
This is disabled for automation as VSCode @ FB has issues rendering the
"unstable" commits.
Screenshot of before vs after:
{F242018914}
Reviewed By: markbt
Differential Revision: D22289661
fbshipit-source-id: 1afce073e14abe8c23a05d52d60847fc5e0bfb66
Summary:
The subcommands it ran returned bytes then treated them as strings.
Let's decode them to strings.
Reviewed By: quark-zju
Differential Revision: D22339397
fbshipit-source-id: d9d503bd97271c649ad67c74d098b572c1bd7dea
Summary:
With D22303305 (4868f5bf5b) the test is no longer valid - the mmap happened in Rust and
cannot be tested from Python wrapping functions. Remove the test.
Reviewed By: DurhamG
Differential Revision: D22316110
fbshipit-source-id: f7e16e2ac72908c836a7aeeefa1fb0ef035d01fc
Summary:
Sometimes `Ctrl+C` the test runner does not fully stop it. From gdb it seems
the test runner is waiting for a thread which might have deadlocked. The
progress thread does not have anything critical that need to sync back to
the main program. Avoid waiting for it to make Ctrl+C work better.
Reviewed By: kulshrax
Differential Revision: D22290453
fbshipit-source-id: bdc5260cbd339cc392728834330609343c0048d3
Summary: Most of them need extra server-side bookmarks for deciding phases.
Reviewed By: DurhamG
Differential Revision: D22117739
fbshipit-source-id: 711bf96063913fd6148125a5628f0b0f4efbf489
Summary:
Enable narrow-heads.
Changed log revset from `:` to `all()` to make the test compatible.
Reviewed By: krallin
Differential Revision: D22200495
fbshipit-source-id: 148a82e77c953b9e7dbed055ef464c318e56cafa
Summary:
Enable narrow-heads, and mutation. Disable obsmarker related features.
Change phase manipulation to `debugmakepublic` which works with narrow-heads.
Reviewed By: krallin
Differential Revision: D22200511
fbshipit-source-id: 8dec050f137e6cc055015fe084eb4cc67faa1216
Summary:
Enable narrow-heads.
The test output seems a bit unstable - sometimes I got 28 there. So I globbed
it out.
Reviewed By: krallin
Differential Revision: D22200497
fbshipit-source-id: f005381a341d88c0bcbb09150e7d1878df7a38f3
Summary:
Enable narrow-heads.
Change the revset `:` to `all()`. With narrow-heads, `:` selects all commits
including those that are not referred by visible heads. The `all()` revset
only selects commits reachable from visible heads.
Reviewed By: krallin
Differential Revision: D22200498
fbshipit-source-id: beb863d42069ae898e419a4a75b3a707c72ae1f9
Summary:
Enable remotenames, selectivepull, and narrow-heads. Use the new stream clone
code path.
Selectivepull makes a difference. `hg pull -r HASH` also pulls the selected
bookmarks so an extra `pull` was unnecessary. Change the clone command to use
`-U` to trigger the new clone code path.
Reviewed By: krallin
Differential Revision: D22200499
fbshipit-source-id: 764202098c7e8afdbb5e2ee83679da7570c08c90
Summary:
Enable remotenames and narrow-heads.
Local bookmarks are replaced by remote bookmarks, causing the test change.
Reviewed By: krallin
Differential Revision: D22200500
fbshipit-source-id: aeee528d1766e0642c12e78a6c1a50cadc8a579a
Summary:
Enable remotenames and narrow-heads.
The commits become 'draft' because there are no remote bookmarks.
Reviewed By: krallin
Differential Revision: D22200514
fbshipit-source-id: 04d0befa7c22756e936a28ffdcdf1305057cf062
Summary:
Enable remotenames and narrow-heads.
The test was migrated cleanly. The only change is that local bookmarks are
replaced by remote bookmarks.
Reviewed By: krallin
Differential Revision: D22200510
fbshipit-source-id: f5b8cd2ed125e9fc4e5daac897851d91fef5693f
Summary:
Enable remotenames and narrow-heads.
Local bookmarks are replaced by remote bookmarks.
Reviewed By: krallin
Differential Revision: D22200503
fbshipit-source-id: 41ac4f4f606011dcaf6d0d9867b01fb77b9a79d8
Summary:
Enable remotenames and narrow-heads.
Phase exchange is gone because of narrow-heads.
The remtoenames extension was written suboptimally so it issued a second
bookmarks request (which, hopefully can be removed by having selective
pull everywhere and migrate pull to use the new API).
Reviewed By: krallin
Differential Revision: D22200506
fbshipit-source-id: c522bb9fc1396d813e0f1f380c4290445bab3db3
Summary:
Enable remotenames and narrow-heads. The `master_bookmark` is no longer a local
bookmark in the client repo.
Reviewed By: krallin
Differential Revision: D22200513
fbshipit-source-id: bc3c1715ce21f45a35bc67148eb00e44944bea6e
Summary:
Enable remotenames and narrow-heads. The server gets one more request from
remotenames.
Reviewed By: krallin
Differential Revision: D22200502
fbshipit-source-id: 26bc28b19438c7be4a19eae6be728c83b113f822
Summary:
Enable remotenames and narrow-heads. The client gets remote bookmarks instead
of local bookmarks during clone and phases are decided by remote bookmarks.
Reviewed By: krallin
Differential Revision: D22200515
fbshipit-source-id: 12a9e892855b3a8f62f01758565de5f224c4942b
Summary:
Most tests pass without changes. Some incompatible tests are added to the
special list.
Reviewed By: krallin
Differential Revision: D22200505
fbshipit-source-id: 091464bbc7c9c532fed9ef91f2c955d6e4f2df0b
Summary: Many tests are incompatible. But many are passing.
Reviewed By: kulshrax
Differential Revision: D22052475
fbshipit-source-id: 1f30ac2b0fe034175d5ae818ec2be098dbd5283d
Summary:
Many tests want to change commit phase to public. We don't want to leak this
feature to end-users. Therefore make a debug command.
Reviewed By: kulshrax
Differential Revision: D22052481
fbshipit-source-id: 4ce6a61120da0d74374465e97ac0ec0ff9638088
Summary:
The test depends on too much details of the obsstore and is hard to
migrate to mutation. The undo command in production actually uses
a different code path (with narrow-heads, it rewrites metalog directly),
which is somewhat covered by test-undo-narrow-heads. Ideally we extend
the undo test with more cases under modern configs. For now let's just
remove the test with legacy configs to unblock migration progress.
Reviewed By: kulshrax
Differential Revision: D22174961
fbshipit-source-id: 57baf5e6f59938069b44a5db8c5ae1662f094f84
Summary:
It has too many dependencies on legacy components that it's too hard to
migrate. `test-rebase-mutation` is the test that is more relevant.
Reviewed By: kulshrax
Differential Revision: D22174996
fbshipit-source-id: 40889bc2f80021839ce0ffe13098404e8aa97fbb
Summary:
The test is about syncing with obsmarkers. We no longer use obsmarkers so the
test is no longer relevant.
Reviewed By: kulshrax
Differential Revision: D22174999
fbshipit-source-id: 7615852b734319bc838b238f4c9b54252ba5c355
Summary:
The test is mostly about manipulating phases and phase exchange in bundle2.
Both of them are gone with narrow-heads, which makes phases immutable.
Practically, phases affect whether commits are immutable and that are covered
by individual tests (ex. amend tests check amend fails on public commits).
Reviewed By: kulshrax
Differential Revision: D22174955
fbshipit-source-id: cabc0de552f0ede54a23a6e6eec47b14c2a863b9
Summary:
With narrow-heads (enabled in production and most tests) hiddenerror will
never happen. Remove the extension.
Reviewed By: kulshrax
Differential Revision: D22174987
fbshipit-source-id: e3e3823d3da89dfd51b60f65f8e138ea723cc00f
Summary:
We don't use the flag processor framework for things other than LFS in the
non-Rust code. It is coupled with revlog, which is going away. Our LFS usage is
covered by other tests.
Reviewed By: kulshrax
Differential Revision: D22130168
fbshipit-source-id: 78a04df49961e2faca0def71daeec6a40e45c4b5
Summary:
We have narrow-heads on in production. Phases are decided by remote bookmarks
instead of exchanged separately. Remove the test since it's no longer relevant.
Reviewed By: sfilipco
Differential Revision: D22052477
fbshipit-source-id: c60382448d5e4d3d2d1225762b6c133873016881
Summary:
The return order of `index2.headsancestors` and `index.headrevs` are different.
Fix it. This affects the default commit to update to after `hg clone` in some
tests.
Reviewed By: sfilipco
Differential Revision: D22200496
fbshipit-source-id: 273201461c814241ce8dafa6f7ca00f72ea83eab
Summary:
If the repo is newly created, do not show the migration message.
This makes migration smoother.
Reviewed By: sfilipco
Differential Revision: D22052480
fbshipit-source-id: 4857bcb3e38094501eaa63a52f09d49853cf761b
Summary:
This allows narrow-heads head calculation without the remotenames extension.
The test about related internal APIs is deleted. Other tests will cover the heads calculation indirectly.
Reviewed By: sfilipco
Differential Revision: D22052476
fbshipit-source-id: 99ad01b075b93e135d7f6c1bc27d837b19337726
Summary:
This makes it possible to implement sparse profile based target determinator
cleanly. The old approach is to change `.hg/sparse` every time, and run
`hg log --sparse FILE`, which is hacky and less efficient.
Reviewed By: kulshrax
Differential Revision: D15798327
fbshipit-source-id: 5d46e5b2619f70a911324776b39829446e87b932
Summary:
When a file is mmap'ed, removing it will always fail, even with all the rename
magic. The only option that works is to ask the OS to remove the file when
there is no other file handles to it. In Python, we can use the O_TEMPORARY for
that.
Reviewed By: quark-zju
Differential Revision: D22224572
fbshipit-source-id: bee564a3006c8389f506633da5622aa7a27421ac
Summary: Not that useful and does not align with the direction we are headed.
Reviewed By: quark-zju
Differential Revision: D22213796
fbshipit-source-id: ffd86fc1a9207c134448836d0e54e48510a11135
Summary: The extension was deprecated by the eol extension.
Reviewed By: DurhamG
Differential Revision: D22129826
fbshipit-source-id: 293a57b4039f424154955454e0a7a74dc7d23069
Summary:
In Python3, array indexing into a byte string returns a int, not a string.
Let's instead use the struct module to extract a byte string out of it that we
can then decode afterwards.
Reviewed By: DurhamG
Differential Revision: D22097226
fbshipit-source-id: e6b306b4d3bcf2ba08422296603b56fcadbb636e
Summary:
These were broken mostly due a test issue (using bytes instead of str), and a
small difference when printing "units_per_sec", which was an int in python2,
and was computed as a float in python3.
Reviewed By: DurhamG
Differential Revision: D22095813
fbshipit-source-id: 8af8332dad5366d2c168485b120a984ff1ba558a
Summary:
I landed D22118926 (e288354caf) yesterday expecting those messages at about the same time
xavierd landed D21987918 (4d13ce1bcc), which removed them. This removes them from the
tests.
Reviewed By: StanislavGlebik
Differential Revision: D22204980
fbshipit-source-id: 6b1d696c93a07e942f86cd8df9a8e43037688728
Summary:
Now that the workers are in Rust, we no longer need the forker version in
Python. For now, the Python LFS extension still uses the threaded worker so
keep this one for now, when that extension will be removed we can remove the
rest of the worker code.
In theory, not all repository would benefit from the Rust workers, but these
are not supported at FB due to not being remotefilelog based.
Reviewed By: DurhamG
Differential Revision: D21987295
fbshipit-source-id: d17b9730651671608cf13f7abe6a9bb32251e140
Summary:
The Rust store code has been enabled everywhere for a few weeks now, let's
enable it by default in the code. Future changes will remove the config as well
as all the code associated with the non Rust store code.
The various tests changes are due to small difference between the Rust code and
the Python one, the biggest one being it's handling of corrupted packfiles. The
old code silently ignored them, while the new one errors out for local
packfiles. The test-lfs-bundle.t difference is just due to an ordering
difference between Python and Rust.
Reviewed By: kulshrax
Differential Revision: D21985744
fbshipit-source-id: 10410560193476bc303a72e7583f84924a6de820
Summary:
There are lots of "hanging" questions in the support group. While not all of
them are our fault (ex. mergedriver), we don't have an easy reply to tell
users what's actually going on.
This diff adds a way to write sigtrace periodically so we can include it in
rage output.
Reviewed By: sfilipco
Differential Revision: D22009699
fbshipit-source-id: 5349f613b08507ed02cc0e3fa00963fd7d4c3d21
Summary: The tracing APIs and error context APIs can achieve similar effects.
Reviewed By: xavierd
Differential Revision: D22129585
fbshipit-source-id: 0626e3f4c1a552c69c046ff06ac36f5e98a6c3d8
Summary: Make test-test-commit-interactive.t python 3 compatible. Note I wasn't sure if it was worthwhile to spend too much time on the translation portion of the test. If someone objects to the deletion, I can spend more time on it.
Reviewed By: DurhamG
Differential Revision: D22122960
fbshipit-source-id: d232971581fca0532ed05c8ca1fdb7b5e8bd99e0
Summary:
If we're going to iterate through the whole manifest, we should probably
prefetch it. Otherwise, we might end up doing a whole lot of sequential
fetching. We saw this this week when a change landed in sparse profiles that
caused requests to Mononoke to increase 100-fold.
Unfortunately, I don't think we can selectively only fetch the things we are
missing, so this just goes ahead and fetches everything unconditionally. If
there is a better way to do this, I'm all ears.
Reviewed By: StanislavGlebik, xavierd
Differential Revision: D22118926
fbshipit-source-id: f809fa48a7ff7b449866b42b247bf1da30097caa
Summary:
This test appears to fail when run in hgbuild. It's not clear why it
doesn't repro locally, but it appears to be a locale issue, so let's just for it
to use C.
Reviewed By: singhsrb
Differential Revision: D22178365
fbshipit-source-id: 007c86681ff1bd4845b1feb41b7bbb031edf172b
Summary: Add the EdenAPI server to the `hg_mononoke_run_tests` test target. This will make it possible to start an EdenAPI server in Mercurial's Buck tests.
Reviewed By: quark-zju
Differential Revision: D22147098
fbshipit-source-id: 1e29b7c06f1dd74f26d821943cd44ef09a7d505f
Summary:
While the code contained type information, some of them were not entirely
correct, path for instance should be str, command arguments are also passed in
as str, not bytes.
Reviewed By: ikostia
Differential Revision: D22104689
fbshipit-source-id: 50cbc9f81a3d9cc324f9105f0bbfbc71d9ca9e98
Summary: Per our ongoing effort to reduce the usage of potentially problematic terminology, rename the environment variables used to include and exclude tests.
Reviewed By: singhsrb
Differential Revision: D22143371
fbshipit-source-id: 97a0f73b21183f94d34af929e75cd531e4e24196
Summary:
This is required for migrating to python 3. Originally this broke
builds on non-fbcode centos7 platforms. Since we don't need hgsql in non-fbcode
platforms, I've just tweaked it to skip the hgsql tests for non-fbcode centos7.
Reviewed By: quark-zju
Differential Revision: D22140187
fbshipit-source-id: 01676db9d006375bd3b5ae9e8f13f5592e36b074
Summary: In Python3, b'a\n'[-1] is 10 whereas in Python2 it is "\n".
Reviewed By: quark-zju
Differential Revision: D22128582
fbshipit-source-id: 3b13a14efd81ea2de4fd7125597e3c7ec6371492
Summary: It had some in-test python that needed to be updated.
Reviewed By: quark-zju
Differential Revision: D22097852
fbshipit-source-id: ebe4ab19a2e4bed73badc1d34d6fcf2db6072559
Summary: Fixes test-dispatch.t and fixes statprof while we're at it.
Reviewed By: xavierd
Differential Revision: D22103518
fbshipit-source-id: 7d795c6f9e3e2c8958746c10e39f55922a923dc5
Summary:
It now works with python 3. I dropped some test output. In one case
it was confirming that various path encoding work, but we only support utf8 now.
I also dropped some bit that enabled debug output, since the output order was
not the same between python 2 and 3 and it seemed non-trivial to fix.
Reviewed By: xavierd
Differential Revision: D22101132
fbshipit-source-id: 682e7c61f1dd18cce34bdc014c85d560f883bd18
Summary:
We support unicode file paths, and in python 3 those get passed to
python libraries as unicode strings. The tests set LANG=C which mean the python
library tries to convert the path to ascii, but fails for any non-ascii
characters. Let's switch to LANG="en_US.UTF-8" to match our production
behavior and make tests about unicode paths work.
Reviewed By: xavierd
Differential Revision: D22098359
fbshipit-source-id: c3057edc66e6e32f7b8b49374e622d02bd05711f
Summary:
This module was using binascii.hex directly instead of using Mercurial hex
function.
Reviewed By: xavierd
Differential Revision: D22096490
fbshipit-source-id: 32c912c16415ffd94371ad945c4df2f5a82b92e5
Summary: For python3 compatibility, explicitly open subprocesses in text mode (universal_newlines=True instead of text=True for backwards compatibility), and do not explicitly .decode("utf-8"), as all strings are already utf-8.
Reviewed By: xavierd
Differential Revision: D22123138
fbshipit-source-id: d91cee7909f4e87b4a04b85fa2a2929aec052da3
Summary:
Context: while syncing ovrsource commits into fbsource as a preparation for
megarepo we noticed that there are some commits that are particularly large
(e.g. up to 4Gb). Syncing them causes hgsql to become unavailable for 10-20
mins until all hg servers catch up - during that time hg log -r tip --forcesync
would just throw mysql unavailable errors.
As a mitigation for this we tried to make hgsql read from replicas instead of
master and it worked! (see D22094976 for more details). However the approach we
chose was quite hacky.
This diff tries to make it less hacky. It add --syncfromreplica option which
will be used by remote_backup.sh script on hg servers. if we don't have a lot
of read traffic on hg servers (and it should be the case for repos that are
hosted on Mononoke) then hg servers should try to read mostly from replica.
One important note here - the repository's state *might* go back in time with --syncfromreplica. I.e. consider the case where we move a bookmark without adding a new commit. Now, let's say local repository got the latest state from mysql leader. Then when we try to sync from replica if this replica is behind the local state of repository then we'd fetch the bookmarks from replica even though they are older.
With our current setup where we have a lot of different repos on different hg servers in completely different state this problem should be acceptable.
Reviewed By: ikostia
Differential Revision: D22118491
fbshipit-source-id: 4bfa869b697326441de6c004cd548df483049b9d
Summary:
The write method returns the number of bytes written, and python3 print these
if not captured.
Reviewed By: quark-zju
Differential Revision: D22096665
fbshipit-source-id: 2b1abd994df4c705515a6dc3d01c720f056f0411
Summary:
The expected message are printed via repo.ui.debug, which may not be the same
device as print uses, and thus the output may be interleaved in a different
way. By using the same way of printing, this issue is avoided.
Reviewed By: ikostia
Differential Revision: D22097487
fbshipit-source-id: 6e49f44987f5660a00e72c082f0a5a483dded9ae
Summary: Add a command to print out the current status of visibility tracking.
Reviewed By: quark-zju
Differential Revision: D22089413
fbshipit-source-id: 729e9f36fbc13ba90518dcd428a44c02ce358167
Summary: Commit cloud sync works best when visibleheads are enabled. Default to requiring it.
Reviewed By: quark-zju
Differential Revision: D22089414
fbshipit-source-id: b786103d5c5f65a7908eb97a973af9eca5990b22
Summary:
Somehow reading the file with `open("r")` will try to decode it as ascii, but
that file may contain utf-8 characters, so open it as bytes, and then decode
it.
Reviewed By: DurhamG
Differential Revision: D22105188
fbshipit-source-id: 0cfbd8c5417b637dd76391f86226e24ee663baf7
Summary:
Add logging of the repo root and repo shared root to the sampling extension.
Reduce the number of different strings that are logged by replacing any path
component that equals the user's username (e.g. their home directory) with
`$USER`.
Reviewed By: farnz
Differential Revision: D22066053
fbshipit-source-id: 39221e5182b3d4df51afa386497003e637a50b13
Summary: Replaces usages of whitelist/blacklist with include/exclude/allow. These terms are more descriptive and less likely to contribute to racial stereotyping. More context: https://fb.workplace.com/groups/sourcecontrolteam/permalink/2926049127516414/
Reviewed By: farnz
Differential Revision: D22039299
fbshipit-source-id: d5b4cdeca681e1f4c992f7ef0b9f772b2ae1abd3
Summary:
Add a `--record` flag, which uses `git` to track changes in `$TESTTMP`.
I use it to track changes with C revlog vs the Rust revlog.
Reviewed By: farnz
Differential Revision: D22007501
fbshipit-source-id: a8027aa4b2b3b97c3cf5f642434451826fcbded9
Summary: Replace usages of whitelist/blacklist with include/exclude/filter/allow. These terms are more descriptive and less likely to contribute to racial stereotyping. More context: https://fb.workplace.com/groups/sourcecontrolteam/permalink/2926049127516414/
Reviewed By: kulshrax
Differential Revision: D22039298
fbshipit-source-id: 255c7389ee5ce5e54bbccdfb05ffa4cafc6958e5
Summary:
Those tests show up as "skipped". I removed some rarely used ones:
- test-check-jshint: we seldom write javascript.
- test-check-shbang: a slow test that does not do much.
- test-chg: chg is being tested in other tests by default.
- test-docker-packaging: probalby already broken, we don't use docker.
- test-verify-repo-operations: a slow test that is too expensive to run with
limited value.
Reviewed By: markbt
Differential Revision: D21989103
fbshipit-source-id: 8080ad68dc75b59f87336b94af38c8231f4f10f4
Summary:
There is no need to migrate if the obsstore is a proxy to the mutation store.
This avoids a crash reading the attribute `_all`.
Reviewed By: DurhamG
Differential Revision: D21999245
fbshipit-source-id: bfa6439982834c6835412fc175132526525af548
Summary: The test breaks, let's not enable mutation for it.
Reviewed By: DurhamG
Differential Revision: D21998151
fbshipit-source-id: 9c06485287d906837444f39faf90886933decc9b
Summary:
When kicking off the background process, we were depending on the
current working directory being inside the repo. This is not always true, like
when the current command was invoked like `hg -R xxx log -r .`. Let's invoke the
debugdynamicconfig command with the explicit path.
Reviewed By: quark-zju
Differential Revision: D21983297
fbshipit-source-id: 72981ea596e62dced3918f2fc6272953ab3d84cd
Summary:
Treemanifest was recently enabled in this test, but it breaks the Windows
tests. For now, let's just go back to the previous state and we can investigate
later.
Differential Revision: D21989349
fbshipit-source-id: fb3d3d1315400f56a6166a01112affc0a4d96da6
Summary:
Somehow clone-dst isn't empty which makes the second clone to fail due to it,
let's just clone it elsewhere.
Differential Revision: D21989189
fbshipit-source-id: 125f33f3f498d0c089785018e39ee7c5b795b472
Summary: Those tests only need minor changes to be compatible with mutation.
Reviewed By: sfilipco
Differential Revision: D21913606
fbshipit-source-id: 0a2b0e08cb558960a7d0f938300f375c34457a62
Summary:
Incompatible tests are blacklisted.
The affects non-tests environment: `proxy-obsstore` is turned on.
That is in theory not very different from having an empty obsstore.
If it becomes an issue we can easily turn it off.
Reviewed By: sfilipco
Differential Revision: D21899139
fbshipit-source-id: e4a87ecced0542e7852b48b1a807775e523b3cc9
Summary: Those tests can be migrated with minor changes like rev number fixups.
Reviewed By: sfilipco
Differential Revision: D21913589
fbshipit-source-id: 0ee080ea9d70ded74c07ce6a93d309437b992bd6
Summary: Some `x` commits become `o` because they don't have successors.
Reviewed By: sfilipco
Differential Revision: D21913601
fbshipit-source-id: 8d23edd4daa948433969460be9e6488865be7fb0
Summary:
I found myself friendly editing the output of run-tests.py:
Failed test-failure.t: output changed
Failed test-failure-unicode.t: output changed
to extract file names:
test-failure-unicode.t
test-failure.t
Then use the file names as parameters to other commands, like `run-tests.py`
again, or `hg revert`, or `hg shelve`.
Change the output format to print the filenames directly to make it easier to
use.
Reviewed By: sfilipco
Differential Revision: D21913609
fbshipit-source-id: 4b1d2265f384ad9afbe478b7ff0d6e543eff00df
Summary: We're getting rid of obsstore. The extension is no longer needed.
Reviewed By: sfilipco
Differential Revision: D21899142
fbshipit-source-id: 6e4dd2b2ddfa9325c19d6d1d9951099748260904
Summary:
The feature is off in production.
It calls the "scan changelog" code path in pullcreatemarkers.py, which
is also unused in production.
This allows us to remove a test that no longer passes with the mutation config.
Remove it.
Reviewed By: sfilipco
Differential Revision: D21913600
fbshipit-source-id: 23850fca2d1dc3d135d25954f00a08dc6d13972e
Summary:
The test uses `obsolete.revive`, which is no longer supported.
The alternative is to use unhide / undo which revives commits by changing
visibleheads directly.
Reviewed By: sfilipco
Differential Revision: D21913591
fbshipit-source-id: fea8c00692ba84c3a079012176970efb5aa29fae
Summary: We're migrating off obsstore. The test is no longer relevant.
Reviewed By: sfilipco
Differential Revision: D21913592
fbshipit-source-id: 8a721a9eea19ad04027f014727cdf0e6fb9a6b60
Summary:
The test is mostly about obsmarkers and is not that valuable with mutation.
Delete it since we do have mutation + histedit test coverage.
Reviewed By: sfilipco
Differential Revision: D21913594
fbshipit-source-id: 8c785a698fcf7c0d9f947e961c66960c13ea1111
Summary:
The test is coupled with legacy logic (obsmarker, phase exchange, over
ssh/http, bundle1, etc.), is flaky (6%-10% flaky score), and hard to maintain.
It provides little value since we probably want Thrift / Serde / HTTP protocols
instead of improving bundle2. Therefore remove it.
Reviewed By: sfilipco
Differential Revision: D21913603
fbshipit-source-id: 9d3d7410e60b67aadf816c917949772f991d2e65
Summary:
They are no-op with mutation, which is enabled in production. Therefore remove
the template keywords and tests.
Reviewed By: sfilipco
Differential Revision: D21913602
fbshipit-source-id: 40ef3a915d591d6bcae2ca7931e388b5d5e00c25
Summary:
Pruned commits are handled by visibility. Ignore them when calculating
`obsolete()`.
This change makes transition to mutation smoother. The latter does not allow
obsoleting commits without successors.
Practically, this means some `x` commits will show as `o`s.
Reviewed By: sfilipco
Differential Revision: D21913596
fbshipit-source-id: 8a6495d040595ead1f6f08cf81e095e25cd8ff1f
Summary: This makes transition to mutation smoother.
Reviewed By: sfilipco
Differential Revision: D21913599
fbshipit-source-id: 74cc0b7f0608a952eded4a40291b56b291a221e5
Summary:
The code path printing that message is rarely used in production setup. This
makes transition to mutation easier.
Reviewed By: sfilipco
Differential Revision: D21913595
fbshipit-source-id: 3aa22575c11e38dbb7d4c4cbc7aad8dde2e755ed
Summary: This makes transition to mutation smoother.
Reviewed By: sfilipco
Differential Revision: D21913608
fbshipit-source-id: b9ba470572ed68dff75104bba9dbb5c8622dcfb0
Summary:
The summary callback is only used to display "obsoleted n changesets".
Remove it to make transition to mutation smoother.
Reviewed By: sfilipco
Differential Revision: D21913597
fbshipit-source-id: e47fa9df0033d1302ffc8dfa3b9885eb75861f4b
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
Summary:
On Windows, if a file is memory mapped it cannot be truncated, unfortunately,
with the 00changelog.i being almost 500MB, this means that every time Mercurial
starts, the file needs to be read entirely. With the code being moved to Rust,
this read is done twice, resulting in a memory consumption of over 900MB.
Instead of always trying truncate the file in place, let's just try to truncate
it first, and then copy it, truncate it and then move it back in place. This
will allow us to memory map the 00changelog.i on Windows, which should
significantly reduce the memory consumption of Mercurial.
Reviewed By: DurhamG
Differential Revision: D21953553
fbshipit-source-id: e0f447fea017a34c8da8cdbbc6914cee7b5b2bee
Summary:
We need to support pushing legacy flat manifets commits without push
rebase. Currently we rebuild the tree on the server and recompute it's hash,
which can result in a tree hash instead of a flat hash for the pushed commit.
Since we're provided with the correct hash via the push, we should just use that
directly.
Since the hash isn't validated, it opens some opportunities for receiving
incorrect data from the server, but we can disable this functionality at some
point, once all legacy repos have been merged in. Then we can get rid of the
need for flat manifest hashes entirely once we switch to a new hash scheme.
Reviewed By: quark-zju
Differential Revision: D21962513
fbshipit-source-id: 8cdaf3a4e2aba73d5fc97fcb78821d2c88f5284f
Summary: I made a change before landing my last diff and didn't retest.
Reviewed By: xavierd
Differential Revision: D21944268
fbshipit-source-id: a5c820cef5b0fc019c7be5d096db9d0e7b3e5a44
Summary:
Introduced a new local commit metadata storage system, smallcommitmetadata, which stores a simple local JSON file for a mapping of (node, category) -> value.
This data can be manipulated with the debugsmallcommitmetadata command, and can be consumed in the smartlog using the smallcommitmeta template func.
Total number of entries can be limited with smallcommitmetadata.entrylimit configuration option, which defaults to 100.
Reviewed By: DurhamG
Differential Revision: D21673611
fbshipit-source-id: 2239a47867118dd86b15944058505ddf67548549