Summary:
The extension only offers one command i.e. `show` which can move into
core.
Reviewed By: ikostia
Differential Revision: D10302192
fbshipit-source-id: 9473ec8c80e52506e1b7de62b2c90a51c29419c1
Summary:
The functionality we care about is provided by the `fbshow` extension.
Therefore, lets replace the `show` extension with the `fbshow` extension.
Reviewed By: ikostia
Differential Revision: D10302193
fbshipit-source-id: e6d137f52427d5e6f124714d06b5b55ef0db7c3c
Summary:
This commit just removes the `show` extension.
This commit was split out of D10302193 to address the review comment in that
diff.
Reviewed By: ikostia
Differential Revision: D10359525
fbshipit-source-id: b77a08a7efbaa56eb5a4ceb2dbb3fecaba35f58b
Summary: Traditional shelve did not require `obsstore` to be enabled, which means that `saved bundle` messages were printed a lot. This change fixes all tests that expect these messages.
Reviewed By: singhsrb
Differential Revision: D10261258
fbshipit-source-id: 2b4b10ee94ae9b5723cb69fc8f7c29bc65613774
Summary:
The bug:
This happens because `repo['']` resolves to a `wctx`. This might be undesirable
in its own right, but before we fix that, we can work it around here.
Reviewed By: singhsrb
Differential Revision: D10261261
fbshipit-source-id: 8cb0e96762ffba24030f9e6bae8b0d0c108e3938
Summary: This is a first step towards making `obshelve` a real `shelve`.
Reviewed By: singhsrb
Differential Revision: D10261262
fbshipit-source-id: 7dccfbd7958cdf674c33c8ead73dcd279cebade6
Summary:
The functionality we care about is provided by the `fbamend`
extension. Therefore, lets replace the `amend` extension with the `fbamend`
extension.
Reviewed By: farnz
Differential Revision: D10320739
fbshipit-source-id: 5700d39f488777fcc4033f60ce0a51cda15ef2ad
Summary:
The logic we care about has been moved to core so we can delete the
`inhibit` extension.
Reviewed By: markbt
Differential Revision: D10276448
fbshipit-source-id: 44cabe5d561344cf8f196127ce52491e4654b598
Summary:
Treestate is missing its pathcomplete fastpath. This makes tab completion for
filenames slow on large repositories.
The Rust implementation already supported the feature, it just needs to be
called from the debugpathcomplete commands.
Reviewed By: quark-zju
Differential Revision: D10259633
fbshipit-source-id: f918d55c5bcd21805615710c0eb6302f8ea4b15c
Summary:
Parts of the treedirstate implementation were left in the extension. Since
treestate is now in core, and the two are intertwined, treedirstate should be
in core, too.
In doing so:
- Change the garbage collection behaviour to match that of treestate.
- Use the treestate config options for configuring repacking and garbage
collection.
- Make more of the code common.
Reviewed By: quark-zju
Differential Revision: D10258265
fbshipit-source-id: 89e82bc7662a3d1251fa9886751897cfc46cd66a
Summary: D10244968 changed the parser output but missed this test case.
Reviewed By: quark-zju, singhsrb
Differential Revision: D10261202
fbshipit-source-id: f3b6a4429b792e413f285fb33dfd6b64934ec477
Summary:
The `columns` attribute of the `namespaces` module calls
`templatekw.getlogcolumns()` when the `namespaces` module is loaded. This can
sometimes be too soon (it depends on demandimport), which means it can be loaded
before the translations are loaded.
Delay loading the column names until the namespace is actually created.
Reviewed By: singhsrb
Differential Revision: D10257778
fbshipit-source-id: 5babd06036f91c06de4d5804eb888c525aa34ae1
Summary:
On the server, once we enter treeonly mode we still want to be able to
strip trees from the revlog.
Reviewed By: quark-zju
Differential Revision: D10248895
fbshipit-source-id: 15faec870370d4c28f6a83058eb1bf19cb414d29
Summary:
There's a bug where strip in a treeonly server will not strip the tree
revlogs. Let's add a test so a later fix can show the impact.
Reviewed By: quark-zju
Differential Revision: D10248897
fbshipit-source-id: f45e5abc59eeb9398ba17dd927a5f8eb50bc51af
Summary:
As we transition to treeonly, let's be sure every push contains a
manifest for every commit. To do so, let's add a hook that checks this.
Reviewed By: quark-zju
Differential Revision: D10244912
fbshipit-source-id: 6c2023b1cba5663ed386888a2007a005bc02f688
Summary:
There's an issue now where if a client is treeonly but does not have
sendtrees enabled, it could push commits to the server without manifest data.
Let's add a test for this.
The next commit will introduce a hook to catch this case.
Reviewed By: quark-zju
Differential Revision: D10244913
fbshipit-source-id: 2d6c3081c7190831e0368b0dab472d14e893471f
Summary:
Recently we moved commands.py to a folder structure which broke `make
doc`. This commit fixes the same.
Reviewed By: ikostia
Differential Revision: D10255835
fbshipit-source-id: e0bdc6ce58fd8a5bf55a5f5e5b8bb361cb85f660
Summary: The old version cannot be found and its making the build fail.
Reviewed By: markbt
Differential Revision: D10255834
fbshipit-source-id: d14572885423622ecfe3730bbda07ae1bee7363a
Summary:
The ancestorsaged revset documentation is invalid as it attempts to use a
literal block, which can't be used in doc comments. Change it to use a bullet
list for now.
Reviewed By: singhsrb
Differential Revision: D10255821
fbshipit-source-id: 6f75b5ba22899d938cdf585fc87082372468e352
Summary: pest was upgraded by me to version 2.x which introduced the concept of End Of Input in the parsin rules. Modify the test case to be aware of this.
Reviewed By: singhsrb
Differential Revision: D10255598
fbshipit-source-id: 31ecf56f5cf75a16c799a93aefe7df9a3837b902
Summary: Create pack files instead of loose files for local data. Now this feature is under the config flag.
Reviewed By: DurhamG
Differential Revision: D9700992
fbshipit-source-id: b1ee897ac6fd2fe208f54f999b230353aebaca5b
Summary:
The age extension provides a couple of revsets relating to commit ages. Move
these to core.
Differential Revision: D10239000
fbshipit-source-id: 6ebf3aa263b72e4bbbe25bd516f77b17145e6e7f
Summary:
Currently `hg bisect` asks to run test on all commits it picked as a result of bisection, even if the changes between last checked nodes and chosen one relate to the files, which are not in the sparse profile.
And so it updates to the one of such commits, shows that "0 files were updated" and asks to run tests.
In this diff I check next potential node (result of bisecting) if there are changes between last good commit/last bad commit and the node. And go further to the next bisection iteration if the node can be skipped (nothing was changed since last good commit in sparse profile's files, so we can assume that the node is good as well).
If there are changes on both sides: between bad and the node, good and the node, I ask to run tests.
Reviewed By: markbt
Differential Revision: D9629683
fbshipit-source-id: f8c5d82f7b44ac14a9190c846ee65d635e447af1
Summary:
This makes all crates' cache shared and unifies Cargo.lock, which
is used by the next diff.
Reviewed By: ikostia
Differential Revision: D10213071
fbshipit-source-id: 48a979c41423a8e8a9795ff102646cce13c39ff4
Summary:
Verify SHA256 before writing content to the local blob store. This avoids
issues when the remote store does not response with the correct content.
Differential Revision: D10212567
fbshipit-source-id: 5683058670487df53fb14653d83c27da11367e76
Summary: Second-order diff was hardcoded to use "." even if another rev was specified on the CLI.
Reviewed By: shashkambh
Differential Revision: D10212547
fbshipit-source-id: b9867ba3e2141ee3c9a8c67a83e9c039da2abf41
Summary:
The sampling logic can't work on peer repos, so let's not run it's
reposetup on them. This can happen if the sampling extension is enabled
globally, or gets enabled via a command line flag.
Reviewed By: quark-zju
Differential Revision: D10184240
fbshipit-source-id: db1bec17836dc672454a5390209ac1ded538e8b0
Summary: this will allow advanced user to check manually what's wrong with the command
Reviewed By: mitrandir77
Differential Revision: D10192629
fbshipit-source-id: 4073525e3a31b59e841e13900db363e6f23c85e3
Summary:
The code block is not a valid Rust program. Mark it as "plain".
This fixes `cargo doc`.
Reviewed By: markbt
Differential Revision: D10137806
fbshipit-source-id: 1197d3a2ebc1450a0738686fa6cfa7c7b79dcb0d
Summary:
The `Node` type will be used in multiple places. Let's move it to a standalone
crate so new libraries depending on it won't need to pull in all of
revisionstore's dependencies.
Note: I'd also like the `types` create to only define clean types. Given the
fact NULL_ID is not a great design in Mercurial (`Option<Node>` is a better
choice in Rust), it probably does not belong to the formal Rust `Node` type.
This diff is merely about moving things with minimal changes. NULL_ID will
be decoupled from `Node` in a follow-up.
Reviewed By: markbt
Differential Revision: D10132047
fbshipit-source-id: 5d05c5e0ac06a2d58556c4db11775503f9495626
Summary:
`ontoctx` could be `None`. In that case `.hex()` will fail.
Fix it by recording `ontorev` as `None` in that case.
Reviewed By: liubov-dmitrieva
Differential Revision: D10178579
fbshipit-source-id: e7fdcfe1bc59043685b6da790c28c4a83c514043
Summary:
Move the `predecessors` and `successors` revsets to core, and unify the
variants as a single revset.
Before:
* `predecessors` (provided by fbamend) only returned the immediate
predecessors.
* `successors` (provided by core) returned the given commit and all eventual
successors.
* `allpredecessors` and `allsuccessors` (provided by fbamend) returned all
eventual predecessors and successors, not including the original commit.
Now all these revsets work like the old core `successors`, and additionally
have `depth` and `startdepth` parameters which can be used to customize the
behaviour. This makes them analogous to `ancestors` and `descendants`.
To maintain compatibility with existing users of `allpredecessors` and
`allsuccessors`, these revsets default to a start depth of 1, so they
do not include the original commits.
Reviewed By: quark-zju
Differential Revision: D10028043
fbshipit-source-id: e006700ccf430b7c5d6bd9588253872bce9a18ed
Summary:
This flow shouldn't ever be hit, but it was exposed by the bug fixed in
the previous patch. Let's go ahead and make this code path not fall back to flat
manifests if the server is treeonly.
Reviewed By: quark-zju, singhsrb
Differential Revision: D10156426
fbshipit-source-id: c766bca318712b61fd1b851990849f3d93362c2e
Summary:
Previously the manifestrevlogstore kept a copy of the changelog, the
store, and the svfs from the initial repo object. It's possible that these will
change or be replaced over time, so it's not safe to cache them. Instead let's
just fetch them again each time we need it.
Reviewed By: quark-zju
Differential Revision: D10156425
fbshipit-source-id: ac1e310b51be0377ba9bea75aa1806d256cc5b87
Summary:
This flow has a bug, so let's introduce a test to expose the break. The
next diff will fix the bug.
Reviewed By: quark-zju, singhsrb
Differential Revision: D10156424
fbshipit-source-id: 51d1d8da6728ee930dc1440cd3e685d7c5b5df2a
Summary:
At the moment they are not recorded because setrecordingparams may not be set
before hooks are called.
Also hooks weren't recorded because pushrebasereplacements weren't correctly
set and KeyError was thrown. This diff fixes it
Reviewed By: quark-zju
Differential Revision: D10147933
fbshipit-source-id: ef33d3e4efa7f3c42e7fcc22ee5f6e54068bf1dc
Summary:
Let's log reponame as well so that we can tell requests to different repos
apart.
I named config value `common.reponame` so that we can start using it in different extensions that also need reponame (for example, hgsql and infinitepush)
Reviewed By: farnz
Differential Revision: D10127734
fbshipit-source-id: 031c7393dfce43bf47474ac0878c1e68ddabec50
Summary:
It's useful to know because we can track down slow requests and potentially fix
them on the client.
Reviewed By: farnz
Differential Revision: D10127735
fbshipit-source-id: d21088b50065f322b0c312f048f5828b3d96f99f
Summary:
Add the `sparse switchprofile` command, which lets users specify a set of
sparse profiles they would like to switch to. This is equivalent to `hg sparse
reset` followed by `hg sparse enableprofile`, but in a single step.
Reviewed By: farnz
Differential Revision: D10141938
fbshipit-source-id: 5a1e547d21e3246237fffb17f3b512da18fac804
Summary: Reformat all opted-in python code with version `18.9b0` of Black.
Reviewed By: ambv
Differential Revision: D10126605
fbshipit-source-id: 82af0d645dd411ce8ae6b8d239e151b3730cd789
Summary:
*Symptom:*
I have taken requests with longest time completion on Mercurial.
According to args logged in the request, remotelogfileserver was processing files with duplicates (same path and same filenodeid), which were going one by one.
*Investigations:*
According to some requests, duplicates among files are files of large size (> 1158513 bytes).
I have made a separate 'getfiles' request from local machine with the changed prefix_key for cacheprocess, to make sure, that remotefilelog.cacheprocess does not duplicate file_ids.
The changed key is required to get cache miss.
hg --config remotefilelog.cacheprocess=scmmemcache changed_prefix_key
I did not managed to simulate the case, with large file chunk cache miss.
*Solution*
To get rid of duplicates before running to server. Make a devel.warn if duplicates appear.
Reviewed By: quark-zju
Differential Revision: D10108311
fbshipit-source-id: e21ae4f8feab94a6762d53a74b503bb469783f60