Summary:
`listdir` makes it more expensive to detect config changes. We no longer need
it. Therefore drop the feature.
Reviewed By: markbt
Differential Revision: D13875655
fbshipit-source-id: 147adce45021c7b028aada5c40f498c2fd58c7f5
Summary:
Eventually we'd like "default" to be not a special name. This is one step
torwards that.
Differential Revision: D14233455
fbshipit-source-id: 739091a124bc667c607c283bf00abc66b4081d25
Summary:
Some hooks (ex. mergedriver) are checked in old release branches. Provide
"mercurial" module compatibility so they won't break.
Reviewed By: mitrandir77
Differential Revision: D14366343
fbshipit-source-id: d47cc4fd512f63e4f6cdc5d7e5ab2c4398216b2f
Summary:
`helpers-testrepo.sh` decides whether to use the in-repo hg or the system hg.
With the latest treemanifest chagne, the in-repo hg could fail on `hg files`
complaining about `remotefilelog.reponame` not being set, while `hg id` still
works.
Since most `test-check` tests just run `hg files`. Use the same command instead
of `hg id` to decide whether to use system hg.
Reviewed By: sfilipco
Differential Revision: D14372231
fbshipit-source-id: e87d407ff1d2552306f62912e0805dafe3c0bacb
Summary:
There are not a lot of users of fbcode lfs pointers. Let's just merge the hg
one into it. This makes it easier to upload things without worrying about which
lfs-pointer file to use.
Reviewed By: singhsrb
Differential Revision: D14381672
fbshipit-source-id: f3ecb996e094d41605e3a883a83bd3e96b5bcd55
Summary:
Introducing new command for Mercurial only to support check of existing commits in both the repo and the infinitepush storage.
For Mononoke case, just the standard 'known' works fine.
We can not overload the standard 'known' in mercurial case, because it is used in discovery and having there infinitepushcommits breaks some commands.
Next diff is replacing isbackedupnodes with isbackedupnodes2
Reviewed By: markbt
Differential Revision: D14370603
fbshipit-source-id: 8d7b64b4d556c0f1caa7f797dba360501571daad
Summary:
If Mercurial detects `ENOTCONN` when trying to open the current directory,
there is a high likelihood this is a disconnected eden virtual checkout.
Provide some advice as to what to do: run `hg fs start`.
Reviewed By: strager
Differential Revision: D13888873
fbshipit-source-id: 7619df0681d15b862d1a6f86d90491aa873bf86b
Summary: Include the output from edenfs rage in the hg rage output.
Reviewed By: chadaustin
Differential Revision: D14007061
fbshipit-source-id: fe0baf6c19dd4f2afd470ba70304c78582dfe879
Summary: Add `hg fs` subcommands for the other main `edenfsctl` commands.
Reviewed By: chadaustin
Differential Revision: D14007062
fbshipit-source-id: 9b5f56b14b5812216c929232b2697233f38288cc
Summary:
Support updating of commit visibility when using pushrebase. Since obsmarkers
may not be available, this also involves looking at the commit mutation data
returned from the server.
Reviewed By: DurhamG
Differential Revision: D12980783
fbshipit-source-id: 837e356e500e7bf9710a3619a31094cae21d36c9
Summary:
When commits are added or modified, update the set of visible heads if
visibility tracking is enabled.
Reviewed By: DurhamG
Differential Revision: D12980779
fbshipit-source-id: 8f44045159c86a374ae530fa4327ee0807b4320d
Summary:
Add a method of tracking explicit visible heads. Rather than using the
implicit set of commits that are not obsoleted (which may differ between repos
that are connected to a single commit cloud workspace), we instead track commit
visibility explicitly.
This is more like the git model, where only commits that are reachable from
refs are considered for most operations, except that we keep track of the heads
automatically, and use obsmarkers to keep track of the obsoleted commits,
rather than garbage collecting them.
Reviewed By: DurhamG
Differential Revision: D9560361
fbshipit-source-id: 07dabfc04415f2ecb97d57c4e3944c071579ee50
Summary:
Disable the various templates that attempt to determine the fate of a
particular commit based on obsmakers when mutation is enabled. The old
templates were either insufficiently generic (e.g. `amendsuccessors`), or
leaked internal implementation (e.g. `succsandmarkers`).
With mutation enabled, callers should use the `mutations` template to get a
list of a commit's mutations.
Reviewed By: DurhamG
Differential Revision: D12980772
fbshipit-source-id: 920d47f7c61ad52f562cd90f1cb405250c14bc25
Summary:
Add support for detecting landed commits.
Since we don't currently have an index for successor information in the
changelog, we can only detect the successor relationship for predecessors of
draft commits (for which we build a cache). As a temporary workaround,
make it possible to put mutation records in the mutation store that lead to
landed commits. These will allow land detection to work until we have a
changelog that supports indexing on predecessor.
Reviewed By: quark-zju
Differential Revision: D12980780
fbshipit-source-id: d7b14fa073d0406990b92731fe66dfe1c73b404c
Summary:
The `mutations` template keyword expands to a list of the results of mutating
the commit. Each element of the list has an `operation` field, which is a
string describing the mutation operation, and a `successors` field, which is a
list of the successor commits for this operation. Sequences of mutations that
result in a single successor are collapsed into a single `rewrite` operation.
Reviewed By: quark-zju
Differential Revision: D12980787
fbshipit-source-id: 82be2f9131832209cc3ab088f587c45f8c45a9ad
Summary:
Include mutation records for all predecessors of the pushed commits in
infinitepush bundles.
When received from infinitepush, store these additional records in the local
store. This allows us to bridge any gaps in mutation that are omitted from the
local commits when they are received from infinitepush.
Reviewed By: DurhamG, quark-zju
Differential Revision: D12980777
fbshipit-source-id: b1535ca29c0fca3e6cb0f563d78c4c60d4aef58e
Summary:
The debugmutation command should also show information about mutation entries
in the mutation store.
Reviewed By: DurhamG, quark-zju
Differential Revision: D12980785
fbshipit-source-id: 06c3ec2cb9c42edf43729ba3b7c471b1bf8dfb96
Summary:
When traversing mutation entries, if we don't have any information for a
commit, then look instead in the store to see if we have a cached entry
from a non-local commit there.
There aren't any ways of putting entries there, yet. Those will come in
later commits.
Reviewed By: DurhamG
Differential Revision: D12980776
fbshipit-source-id: 63ff12382eb9294aa43ff100a4fe19b7c05f9e61
Summary:
Histedit needs to adjust its records of what commits are replaced. Currently
it does this by examining obsmarkers. If mutation is enabled, use the mutation
information instead.
Reviewed By: quark-zju
Differential Revision: D13279987
fbshipit-source-id: e9622a67635afe2023088fdf0e0b43b0bcd9223f
Summary:
We will be making looking up entries for complex by adding a secondary store of
the information. Make accesses to this information common through lookup
functions.
Reviewed By: quark-zju
Differential Revision: D13279986
fbshipit-source-id: a30084b548762e69cb354c3760d7ec66027a24e1
Summary:
Implement successorssets and foreground in terms of mutation records and
replace them when mutation metadata usage is enabled.
Reviewed By: quark-zju
Differential Revision: D10149263
fbshipit-source-id: bbf6d1fc44a9787660147e15936a9ee1951373ca
Summary:
When enabled, use mutation metadata for the `obsolete`, `extinct`, `orphan`,
`phasedivergent` and `contentdivergent` revsets.
Reviewed By: quark-zju
Differential Revision: D10149265
fbshipit-source-id: 5559fa22a6025e1d341538f3eb2257d8efee15e5
Summary:
Add a mutationcache to the repo. This computes the following information:
* The successor sets for all predecessors of visible commits - these are the
sets of immediate successors for each commit.
* A map from commits which are the results of splits to the final split commit.
* The set of public commits that have visible draft successors.
* The set of draft commits that have multiple sets of visible eventual successors.
* The set of obsolete commits - draft commits with visible eventual successors.
* The set of orphan commits - commits with obsolete ancestors.
* The set of extinct commits - obsolete commits with no orphaned descendants.
These sets will be used later on to replace the obsmarker-based equivalents.
Reviewed By: DurhamG
Differential Revision: D13279988
fbshipit-source-id: 3f063bb68aaba2f19da257efdf79b485b947b7b1
Summary:
Follow up from D14178264.
Two changes:
* tree manifest entries must end with a line feed
* `t` is the byte that flags a directory
Reviewed By: DurhamG
Differential Revision: D14368316
fbshipit-source-id: b0b46c876649b8f25bf0ecdb1266527dbeb33796
Summary:
`manifest::tree::diff()` returns an iterator over the differences between two
tree manifests.
I chose a function that takes two parameters over a method on Tree because it
felt more clear to write `left` and `right`. Also because I am not sure how
iterators would be abstracted on a trait.
Differential Revision: D14347656
fbshipit-source-id: 537574070cd18b08c77b3cd1cf4cff38d77fbf81
Summary:
Cursor is a utility for iterating over a manifest tree. In this diff it is used
to implement Files. In the future it will be used to do a diff between two tree
manifests.
I am not sure how to describe an iterator return value in the Manifest trait so
I kept the function on the tree only for now. Looking forward to hearing your
suggestions.
Differential Revision: D14347655
fbshipit-source-id: ffd856443d8abe3ebd0557a096bf7a5ec46312d3
Summary: The historypack wasn't using remove_file from vfs which was causing repack to fail.
Reviewed By: sfilipco
Differential Revision: D14373649
fbshipit-source-id: 2d87f24bda541bc011ed38533db1ac7bdddc81e3
Summary:
Original commit changeset: af43d4cce555
D14338313 didn't trigger the main `.t` tests. A lot of things actually
depend on `zstd` APIs returning `bytes`. Therefore back out the change.
Reviewed By: DurhamG
Differential Revision: D14372351
fbshipit-source-id: d8daa7d1d2a49d9d0c4d48de22ed0567d1d953a7
Summary:
We don't care about hgweb, or commandserver, or the Python http interface.
Maintaining those low-impact tests for breaking changes have been a pain.
Therefore just remove them, to make upcoming breaking changes slightly easier.
There are also long tests which are written in ways that are very hard to
maintain, namely:
- test-command-template.t
- test-glog.t
- test-revlog.t
We might just rewrite them once we have ideas about what the replacement
APIs are.
Reviewed By: DurhamG
Differential Revision: D14222121
fbshipit-source-id: 5c18f32bb55fb20cf8ccafe1cdd169a4ffaaf5ce
Summary:
`Node` is marked as `Copy`. `FileMetadata` is not much more than `Node` so it
seems pretty clear that it should be marked `Copy`.
Reviewed By: DurhamG
Differential Revision: D14347657
fbshipit-source-id: 939abf88087bc8c6f942047a08d6a4a0d61e053f
Summary:
Cleaning up the `mod.rs` file so that it provides more signal.
`Link` is an internal implementation detail that other internal components may depend on so it is a great candidate to be moved to a dedicated file.
Differential Revision: D14347654
fbshipit-source-id: e5b5a42faf1e9f9c4a0591e5bd94182391ed511f
Summary:
Unfortunately, Mononoke team needs to rename paths to add the markers everywhere.
They deprecated mononoke url:
ssh://hg.vip.facebook.com//mononoke/fbsource
And they are asking us not to use ssh://hg.vip.facebook.com//data/scm/fbsource url without markers.
We finally agreed to have:
```
infinitepush = ssh://hg.vip.facebook.com//data/scm/fbsource?force_mercurial
infinitepush-other = ssh://hg.vip.facebook.com/data/scm/fbsource?force_mononoke
```
So, we would like that rename of the path don't cause `hg sl` show that nothing is backed up.
We use the path as part of our filename.
So, we will go to the server to check the commits, it might slow down a bit the very first `hg sl` or `pushbackup` after the path change, but it should be acceptable.
Reviewed By: quark-zju
Differential Revision: D14366820
fbshipit-source-id: a0fd7bad530dd6690926fe02d38b93c2a72df00b
Summary:
Make them zero-copy to reduce overhead. A side effect is the types become
`bytearray`, instead of `bytes`. It seems fine for zstd use-case.
Reviewed By: ikostia
Differential Revision: D14338313
fbshipit-source-id: af43d4cce5559fe877373737a71e1e1678a17ca7
Summary:
Save, finalize, flush, they mean about the same thing.
The first thing to note is that this implementation is not complete because
the parents are not correctly passed into the hashing function.
The second thing is that store failures make the code a little more complex
than it would have been otherwise.
(Note: this ignores all push blocking failures!)
Reviewed By: quark-zju
Differential Revision: D14292713
fbshipit-source-id: 807d7a385a62cb5f4948f1781d3146eaa6502ca9
Summary:
This function is a bit on it's own with the removal of the pair conversion.
Since it is used in only one place it makes sense to inline it.
(Note: this ignores all push blocking failures!)
Reviewed By: quark-zju
Differential Revision: D14292712
fbshipit-source-id: abbf1dc70d61c0ad039f5bc5ed5277d0770e3899
Summary:
Working on the save mechanism I realized that links_to_store_entry is not that
useful because we can avoid the failure states where we would try to serialize
an ephemeral node. I am removing that function and converting the code that was
using that function to using the Entry constructor directly.
(Note: this ignores all push blocking failures!)
Reviewed By: quark-zju
Differential Revision: D14292714
fbshipit-source-id: 54ef46670319c27d90fc78511a1eb6abf47d3acf
Summary:
There are scenarios where an &PathComponentBuf or a &RepoPath will show up.
An example when using get from a HashMap. These are not the references that we
are looking for. We want &PathComponent and &RepoPath respectively. Adding
explicit conversions.
(Note: this ignores all push blocking failures!)
Reviewed By: quark-zju
Differential Revision: D14292711
fbshipit-source-id: 29f4de25c2ffebf7f009e4f2515e0ba8f0371ae0
Summary:
This is what Rust is telling us to do. The situation that triggers this update is
writing to the store. Particularly when the store is an in memory hashmap we
need to have a mutable borrow to the hashmap to insert into it. From a general
point of view this means that any sharing of the store between different
instances of a manifest will have to be handled by the struct that implements
the `Store` trait.
(Note: this ignores all push blocking failures!)
Reviewed By: quark-zju
Differential Revision: D14292716
fbshipit-source-id: 6e789527dbdf3cd3ffe967f4900251bf31f7d6b2
Summary:
The practical aspect of this method comes when iterating over a tree and having
to maintain the current path. When going deep we will be pushing path
components and when coming back we will be poping path components.
I am not sure if it makes sense to return the path component or not. However I
believe that we should return some sort of error when RepoPath is empty.
(Note: this ignores all push blocking failures!)
Reviewed By: quark-zju
Differential Revision: D14292715
fbshipit-source-id: 4ef1e10de7a60775340063b5baa317d3d626bc64
Summary:
Removes a file from the manifest. Nothing special for it.
(Note: this ignores all push blocking failures!)
Reviewed By: quark-zju
Differential Revision: D14276645
fbshipit-source-id: 85e8ffd6cffee426c73eb627484dfa5a866a364b
Summary:
It is going to be useful in tests to check how certain internal nodes change
so adding an api that allows fetching an internal node.
(Note: this ignores all push blocking failures!)
Differential Revision: D14276642
fbshipit-source-id: 9a3e488be6031f7b4727a8643f64970dcec8c400
Summary:
This removes the need for the local buffer for the parent.
(Note: this ignores all push blocking failures!)
Differential Revision: D14276648
fbshipit-source-id: a9378ea592d502ddf2dcdc35fe6ffa9ba213bc14
Summary:
Using the recently added path utilities so that we don't keep a secondary
parent buffer around.
Updating the file insert logic so that it is readable and intuitive.
(Note: this ignores all push blocking failures!)
Reviewed By: quark-zju
Differential Revision: D14276649
fbshipit-source-id: 8e7e835814f0039645601abbf1b701e8c1ed3697
Summary:
I had an issue where I incorrectly ended up with a &&RepoPath. While debugging
I added this tests to validate my sanity. I think that keeping these tests is
useful for the future.
(Note: this ignores all push blocking failures!)
Differential Revision: D14276640
fbshipit-source-id: d7e1cedc80b3a0ecb97e5a0c80fc4eea110e943f
Summary:
The current implementation has some gotchas that are related to how the `split`
method is implemented for `&str`. The new implementation is more clear for how
we construct path components
(Note: this ignores all push blocking failures!)
Differential Revision: D14276639
fbshipit-source-id: 1a22c177ba570915b7952eee78ed9191f7b72976