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
Summary:
Because fsmonitor needs to be able to fallback, we need to consume the
entire pendingchanges list upfront so we can detect a fallback case. Previously
we just returned a generator and would never fallback, which resulted in an
exception for the user.
Reviewed By: quark-zju
Differential Revision: D17961313
fbshipit-source-id: ca11a074631b59e9226936d33f2176894203c29b
Summary:
We are migrating away from revlogs. So remove the dump/undump scripts and their
tests.
Reviewed By: DurhamG, xavierd
Differential Revision: D17962551
fbshipit-source-id: ff4738d237550b84c61733834c4c89e3bd08f760
Summary:
If a transaction rolls back, it may change the dirstate parent. We need
to tell Eden about it in that case or else it gets out of sync.
Reviewed By: quark-zju
Differential Revision: D17943808
fbshipit-source-id: 7504484e20768d5a0147a774d954004e9549b2d6
Summary:
We no longer support inline changelog. This is because:
- D17804370 changed visibility to use the Rust `revlogindex` to normalize heads.
- The Rust `revlogindex` does not support inline revlog and will likely panic.
However, there are still inline changelog in the wild.
- Although D17125922 disabled inline revlog, it only affects newly created
changelog.
- Repos created before D17125922 can still use inline changelog (if they are
small).
- There are such repos in production.
This diff fixes the issue by forcing a migration to non-inline changelog.
Reviewed By: sfilipco
Differential Revision: D17957037
fbshipit-source-id: 0690e8c041ee9c0b7100416b5794963582516311
Summary:
Revision numbers are deprecated, let's not print them in the rebase output.
The tests were automatically fixed with run-tests.py -i
Reviewed By: quark-zju
Differential Revision: D17936451
fbshipit-source-id: a8f0403b6af4573421ca874e9311f26931eba697
Summary:
The new dirstate loops over the nonnormal files and marks them as
added, removed, etc. There was a bug where if a file was added, it was marked
added even if it disappeared from disk. Let's double check that the file exists
before we mark it as added.
I don't believe the other file states (merged and removed mainly) have this issue.
Normally this issue only reproduced in Eden checkouts. This highlighted a bug
where the non-eden filesystem was reporting files that had been
hg-added-then-rm'd as changed, when really pendingchanges should not report that
since that file being missing it not a pending change relative to the originally
checked out tree.
Reviewed By: quark-zju
Differential Revision: D17921401
fbshipit-source-id: a57992b83173c299ba3307d6324dd357cd2b0b24
Summary:
A recent dirstate refactor made the dirstate get marked dirty if a file
was marked for clean. Unfortunately it also set the dirstate to dirty if the
file was only checked for clean and didn't require marking. This resulted in the
dirstate getting written with no changes, which triggered IDE's to run hg
status, which re-wrote the dirstate, triggered IDE's, etc.
The fix is to use the built in dirstate.clearneedcheck function, which handles
this appropriately.
Reviewed By: xavierd
Differential Revision: D17919381
fbshipit-source-id: 78698f1c82f00a95502d09ad9515bee58b1191fc
Summary:
The previous diff that added branch metadata tried to use [0] on a set,
which doesn't work. This fixes it.
Reviewed By: xavierd
Differential Revision: D17913449
fbshipit-source-id: d26a101fb21edf8440b7f6e7f5c355a018df36fc
Summary:
If the config workingcopy - enablewalker is set to true use rust walker to
retrieve matching files in working copy.
Reviewed By: xavierd
Differential Revision: D17481644
fbshipit-source-id: 8436d4cd3a9bd29954c7b2be52e50c53b53f1557
Summary:
The diff that added commitcloud backup to crdump didn't take into
account that backups print to stdout, which interferes with parsing the json
from crdump. Let's silence it.
Reviewed By: singhsrb
Differential Revision: D17910359
fbshipit-source-id: 7ed3de8d9c2f9a8a2706f5e9783860fd2cfa2b67
Summary:
This removes the possibility that "." stack becomes accidentally hidden, if
they are not part of tracked visible heads.
Reviewed By: sfilipco
Differential Revision: D17888548
fbshipit-source-id: 2cdd4791925fee2583860d22abd544fbe2538da5
Summary:
Mutation records can refer to commits that don't exist in the local repo, particularly
when commits have been shared between repos, or mutation records have been
backfilled from obsmarkers.
When computing the foreground of a node, ignore any successors that do not exist.
Update the algorithm to cope with and ignore potential cycles from backfilled
obsmarkers by removing all the already-seen nodes from the set of new nodes on
each iteration.
Reviewed By: quark-zju
Differential Revision: D17905952
fbshipit-source-id: 3ab96453c88da9b271a30b83f0748435803861fe
Summary:
If narrow-heads is enabled, commits can all be accessed directly without
using the "directaccess" extension. So let's disable it in that case.
Reviewed By: sfilipco
Differential Revision: D17888725
fbshipit-source-id: 0e316ab86fd5f4eaeb674854619f685058d11ded
Summary:
Register `remotenames` as "files to backup" so they got restored by the
transaction framework on transaction abort.
Reviewed By: xavierd
Differential Revision: D17888017
fbshipit-source-id: 81e923a250ef8fd95d76d57961ff535d18a81d50
Summary:
This makes sure post-transaction hooks get a consistent view of the repo
(instead of updated changelog, but lagging remtoenames).
Reviewed By: xavierd
Differential Revision: D17888015
fbshipit-source-id: b318b7d26fc8c2b2c85364135ee6a101d47a2778
Summary:
With narrow-heads enabled, remotenames decide public phases. So updating
remotenames should invalide the phase cache.
Reviewed By: xavierd
Differential Revision: D17888016
fbshipit-source-id: 01c2210bf0022c6ad139a4c4453d9920ef5cbb83
Summary: This makes test output shorter.
Reviewed By: xavierd
Differential Revision: D17883761
fbshipit-source-id: 0b6d5e8ce94ac40c5357e2da90640e2464d21cd7
Summary:
On flush, if no data was added to the mutable packfile, Ok(None) should be
returned. This fixes a bug in the PackStore where an attempt was made to open
the newly created packfile, while none existed.
Reviewed By: quark-zju
Differential Revision: D17861327
fbshipit-source-id: 70f3f49f60de5883ca85787c1bb00c16c74e8f2f