Summary:
As part of simplifying the dirstate API so we can replace it, let's
drop dirstate.matches
Reviewed By: quark-zju
Differential Revision: D17844150
fbshipit-source-id: 5b8f69fb0e102320af3a083dcaa678a2b81dd953
Summary:
If hg received bad data in the initial ssh connection, the error
message doesn't provide any information about what the bad data is unless
--debug was passed. In production situations it's hard to add --debug after the
issue has occured, so let's make it print out the bad data with the message.
Reviewed By: sfilipco
Differential Revision: D18076446
fbshipit-source-id: 2be2741a07ce4c78cbde672b7458c115fac43fab
Summary:
This had performance implications. Let's gate it so we can roll it out
more carefully.
Reviewed By: quark-zju
Differential Revision: D18063673
fbshipit-source-id: 7911753f9a91bd9224e59d774fcec59e9007434c
Summary: This diff switches EdenFS from using the `revisionstore` crate into `backingstore`
Reviewed By: chadaustin
Differential Revision: D17866320
fbshipit-source-id: f6de1fe568ae893e4c2555039df6edfb0a450885
Summary: Add an `expand_path` function to the `util` crate, similar to the `util.expandpath` Python function. This function is similar to one from the `configparser` crate (which it now replaces). A key difference is that this function is designed to be similar to the Python function in terms of expanding home directory references in environment variables.
Reviewed By: xavierd
Differential Revision: D18050348
fbshipit-source-id: 752d85864eaa4c296ca670089f5de2dc860a5d6a
Summary: Add the appropriate `#[derive(Debug)]` attributes to allow printing out a `ConfigMap` with `dbg!`.
Reviewed By: singhsrb
Differential Revision: D18050347
fbshipit-source-id: b9fd59bcf063e023487d53c23b65c55a11d6da14
Summary:
Added function generates a basic diff header. I'll follow up this diff with additions of:
* git-specific headers (`diff --git`): file modes, copy information
* no-prefix mode (without `a/` and `b/`)
High-level context: I'm working on adding support for returning diff from the new Source Control Service. We want the generated diff to be a drop-in replacement for the one that we get from hg in SCMQuery so I'm closely following the behaviour of Mercurial's `mdiff.py` so there's no surprises. I'm planning to implement all of the diff features that we'll use in the Service while making the implementation flexible enough that it can be easily extended in the future and dropped into Rust rewrite of Mercurial.
Reviewed By: markbt
Differential Revision: D17764609
fbshipit-source-id: 43cde9ddef86d01fe926adedb3f2ac19b38ffbec
Summary:
This code, loosely inspired Mercurial's mdiff.py generates the actual "diff"
contents (everything that we can generate just based on the file contents only,
without looking at file metadata such as: filenames, copy information, file
modes etc. Those will follow in separate diffs.
High-level context: I'm working on adding support for returning diff from the new Source Control Service. We want the generated diff to be a drop-in replacement for the one that we get from hg in SCMQuery. I'm planning to implement all of the diff features that we'll use in the Service while making the implementation flexible enough that it can be easily extended in the future and dropped into Rust rewrite of Mercurial.
Reviewed By: krallin
Differential Revision: D17764608
fbshipit-source-id: 4fa3a1afd0547fc512c5e51ed673b1ea007b3245
Summary:
Make sure our `git cat-file` output parsing gets the list of parents correctly.
Also get rid of an empty expected output file for our test, since empty output is implied if no file exists.
Reviewed By: mwdevine
Differential Revision: D18002081
fbshipit-source-id: da4f7a5eecc876bc180c64c06d4eb98b1178f8ee
Summary: We've had a known problem with importing merge commits in the currently landed version of the repo converter source. The problem is that the specification of the source interface is misleading (or perhaps just wrong). We've updated the function to generate changes against all of the parents, not just the first one, and that seems to have fixed our ability to show the head commit of branches.
Reviewed By: tchebb
Differential Revision: D17964281
fbshipit-source-id: 90ae5df7dabaf133612c44d2a41b37200bcdb15f
Summary:
It seems the whole file goes against the convention. Rather than
making the linter happy by fixing the only case it cares about, this diff
simply ignores the error.
Reviewed By: xavierd
Differential Revision: D18041569
fbshipit-source-id: 19731a2adee634baf4cf7569c86ab3fbf46624fc
Summary:
"node" is used in the wire protocol.
While things are deploying the server needs to receive `node`. For
that we use `serde(rename = "node")`.
Looking forward we will need the server to know how to interpret both
`node` and `hgid` while clients are deploying without
`serde(rename = "node")`. For that we use `serde(alias = "node")`.
Reviewed By: kulshrax
Differential Revision: D18041109
fbshipit-source-id: 06b1568ad010526a53d2ccfd46950211d303250d
Summary: This diff makes the `backingstore` crate buildable with CMake so we can use it in EdenFS's CMake build.
Reviewed By: xavierd
Differential Revision: D17870495
fbshipit-source-id: 69c38cc321024d971ae9ecbf1dc126611d0cd3e9
Summary:
For blobs stored in Mercurial's pack/indexedlogdatastore, some of these blobs have a metadata
header at the beginning of the blob for storing copyrev or LFS related
metadata. We do not want to serve this header to the user, and EdenFS does not
need these metadata.
Reviewed By: xavierd
Differential Revision: D17864753
fbshipit-source-id: 91dc47df6ae7f1361cb0869491b4ab855a04cf1b
Summary: This diff adds a `repr(C)` Rust struct for passing Rust's `bytes` to C++. See the next diff in the stack for usage.
Reviewed By: xavierd
Differential Revision: D17863809
fbshipit-source-id: e808ab72c75427a91c4181422798a844077c5c5f
Summary:
This diff adds a new crate `backingstore` that is responsible to help Eden to read data from hgcache.
This diff only implements the initialization logic where it loads the path from hg's configuration files. This diff also contains a struct `CFallible` to help us handling errors from Rust in C++.
Reviewed By: xavierd
Differential Revision: D17593226
fbshipit-source-id: 3dfa8b2b13553cf49ecadd2a589f0ce2e25524b5
Summary:
This diff adds a Rust `repr(C)` struct to pass any errors raised in the Rust
code. So the C++ code can handle these errors.
Reviewed By: chadaustin
Differential Revision: D17859953
fbshipit-source-id: 246a913e558b40980c63f62d06961d3dea5c55ef
Summary: This commit adds the basic required files for a new crate.
Reviewed By: xavierd
Differential Revision: D17859046
fbshipit-source-id: 3b8ab7fb603114597e037bd5ef1efeb57cd7f86b
Summary:
`Node` is a name that is overloaded. It means that in our conversations
we always have to constantly define which Node we are talking about.
Is it the type in Mercurial or the generic term in graphs/trees.
It is just an identifier so we rename it such.
Note that this doesn't remove the Node term yet. I will take care of the
longtail of uses incrementally.
Things that are not renamed:
* linknode
* nodeinfo
* WireHistoryEntry
* cdatapack
Reviewed By: quark-zju
Differential Revision: D18010149
fbshipit-source-id: 83b3911e231e4544848391cd3deb6e44ec2b809d
Summary:
The operation-aware feature is in core. It does not need extra wrapper.
This change was made because the following code will break by function
wrappers:
origargs = inspect.getargspec(origcmd)
try:
repo_index = origargs.args.index("repo")
...
Reviewed By: ikostia
Differential Revision: D17972044
fbshipit-source-id: 863fd2bb37c677d4c7de8955538da551084eeb14
Summary: Eden on Windows store it's socket path in a toml file instead of using symlinks. This diff will fetch the contents from the toml file and populate the root and symlink.
Reviewed By: fanzeyi
Differential Revision: D17912859
fbshipit-source-id: 46d7a7e39ca4d65df55cb6dc7a3d396c82182b32
Summary:
The "sl (unfiltered)" section can be very long. To make it less noisy, let's
only show commits that are predecessors of the current visible draft. This
removes commits that are landed (and became hidden), and is more friendly
in the narrow-heads=true world.
Reviewed By: singhsrb
Differential Revision: D18000596
fbshipit-source-id: e7ed773fee10c5dc26b810356dd3d25e61da522b
Summary:
`/default.d/` configs were moved to hard-coded `<builtin>` config string in
D15307750. Change logic in `rage` so we don't list `<builtin>` configs as
"local config".
Reviewed By: singhsrb
Differential Revision: D18000595
fbshipit-source-id: b3ff0bce6dbb3fae442dc07d7453fa63bc624f7b
Summary:
The fsmonitor state section does not work with treestate or edenfs. Replace it
with `debugtree` and `debugstatus` that works with treestate.
Reviewed By: singhsrb
Differential Revision: D18000597
fbshipit-source-id: 4a4e7434f9d340bd3b44f9a8d19b66ed7b6fa3a6
Summary:
Right now `commit -i -M rev -e` crashes saying --reuse-message conflicts with
--message. That seems to be caused by `logmessage` being called twice.
Fix it by setting `reuse_message` to False if its side-effect (setting
`message`) is done.
Reviewed By: singhsrb
Differential Revision: D18000594
fbshipit-source-id: 96a3078fc1d66a6786caa709a935e093eaa469ea
Summary:
we were not producing the correct filter expression when
invoking biggrep, which resulted in incorrect (no!) output.
The `normpath` is needed because `util.pathto` can produce paths like `../../.`
which biggrep doesn't like.
Reviewed By: quark-zju
Differential Revision: D17950451
fbshipit-source-id: 6c29c32b6b4b293fbec820fd76dea51adbefca4e
Summary:
Now that svn is no longer part of our infra, we don't
need this bit, and it simplifies things in a later diff.
Reviewed By: singhsrb
Differential Revision: D17933129
fbshipit-source-id: 6bf7a58e2d0e77c7f4621d85d5947b592eccb678
Summary: The `_ischanged` function takes 3 parameters. This was introduced due to a mis-merge between two of my other commits that landed, and for some reason CI didn't block the land.
Reviewed By: singhsrb
Differential Revision: D17987996
fbshipit-source-id: ff6f766dbe4b7dc91f16182d6c75e5532a4f6e3c
Summary:
The old code only use multi-line diff if "expected" is multi-line.
That can sometimes show a multi-line message in a single line, which is
unreadable.
Improve it by using multi-line diff if either side is multi-line.
Reviewed By: sfilipco
Differential Revision: D17987723
fbshipit-source-id: a04c13d09d463c1397f45ec34682ef1da75889af
Summary:
This makes it possible to `hg export` a subset of the history that can be
imported into another repo. See added tests for an example.
Reviewed By: sfilipco
Differential Revision: D17966341
fbshipit-source-id: a68c3fe8d43c6790eb3667fd43a80a7247358c7d
Summary: This makes it possible to export a subset of file changes.
Reviewed By: sfilipco
Differential Revision: D17963550
fbshipit-source-id: 0641bdab253a51c0e36a973dc22b662739af8eb6
Summary: The test now completes in 1 second, down from 9 seconds.
Reviewed By: sfilipco
Differential Revision: D17963549
fbshipit-source-id: 5cfae80dd1e4165c015c6fc5a04cec98bc71cbad
Summary:
When mutation is enabled, and no precessors exists, the predecessors can be
None, leading to hg crashing due to:
TypeError: object of type 'NoneType' has no len()
Reported by sas: P118684245
Reviewed By: quark-zju
Differential Revision: D17960775
fbshipit-source-id: 05488dbc52edbc32c323612ea86fe9e94076a126
Summary:
The getancestors is handled by the metadatastore via the getnodeinfo method,
thus the lower level stores don't need to implement it.
Reviewed By: quark-zju
Differential Revision: D17946853
fbshipit-source-id: b516fdad15c96882f1898eb2e94b6ddff353d2bf
Summary:
The store.getancestors is really just a wrapper over getnodeinfo, let's just
use getnodeinfo instead, which would allow us to remove the getancestors from
all the store code.
Reviewed By: quark-zju
Differential Revision: D17946854
fbshipit-source-id: 4cf6b607464f42d573a5911e3975bdd388592c75
Summary: This function was undocumented. Now that we're enabling BFS prefetching for the team, let's add some comments so that if the new functionality causes problems, readers of the code will have some context as to what's going on.
Reviewed By: quark-zju
Differential Revision: D17966978
fbshipit-source-id: 6078d427829d437064cf23b7af2d0cc0fb0a8627
Summary:
In a future diff we'll move lookup resolution into the filesystem
later. To do so, we need to refactor the lookup reporting logic to batch all
lookup reporting into a single place so that later we can insert remotefilelog
prefetches for those files.
This diff moves lookup detection to put them in a list before yielding them. The
next diff will resolve them instead of yielding lookup.
Reviewed By: quark-zju
Differential Revision: D17749375
fbshipit-source-id: 93f383031600525f137039dc955b5e46346754c5
Summary:
A future diff will change filesystem.pendingchanges to actually update
the dirstate when lookup files are resolved. Because of this, we need to compute
the old dirstate id before pendingchanges is called. Let's do that, and pass it
down into the poststatusfixup for usage.
Reviewed By: quark-zju
Differential Revision: D17749372
fbshipit-source-id: a7698ff1ef4aab2805e19929ac2f70841dd0fc3c
Summary:
With loosefiles being gone, we no longer need to repack loosefiles, let's get
rid of the code.
Reviewed By: quark-zju
Differential Revision: D17923874
fbshipit-source-id: 9bc3390d448df4576e4567447a00446d1d1ff717
Summary:
All the repos, and all the tests have this config enabled, we have no plans of
turning it on again, let's kill it.
Reviewed By: quark-zju
Differential Revision: D17923873
fbshipit-source-id: fb5b16ede63918d9e89dc437dfb5cc3e5aa778bd
Summary: Loosefiles are dead, no need to test them anymore.
Reviewed By: quark-zju
Differential Revision: D17919277
fbshipit-source-id: 83386f49711d34e42a82b61ff2bb206a4f5afb12
Summary:
This has been enabled for a while now. We won't be going back to using
loosefiles, so let's make fetchpacks the default in the code. A future step
will remove the code paths that are no longer exercised.
Reviewed By: quark-zju
Differential Revision: D17919275
fbshipit-source-id: 0614f5710b630690de92cdb43ec07d3a2888aa1e
Summary:
The `hg gc` tries to cleanup old loosefiles from the hgcache, since loosefiles
are no longer being generated, there is no need to keep the code around. The
command is kept around to inform users.
Reviewed By: quark-zju
Differential Revision: D17919276
fbshipit-source-id: bd0adc628fda0f72dacb432c859ef827511e7a69