Summary: As an example of using EdenAPI in a pure-Rust context, reimplement `hg debughttp` in Rust.
Reviewed By: quark-zju
Differential Revision: D18156042
fbshipit-source-id: 19a4ad10d276b413f87fd41e569e271e3e243449
Summary:
GraphQL calls have been observed to fail with an `SSLError` due to a timeout.
When this happens, the phabstatus extension causes the log command to abort,
rather than handling it gracefully as is done for other error types.
Extend this graceful handling to `ssl.SSLError`.
Reviewed By: fanzeyi
Differential Revision: D18169468
fbshipit-source-id: c10fc19076ecf31eeecbd7da57d63c347b1cb65a
Summary:
Contacting Source Control @ FB does not scale. Let's provide some commands
that people can try before contacting us.
Reviewed By: markbt
Differential Revision: D18000421
fbshipit-source-id: 1edfb5f22414e38ea2f0a41e5689539284065435
Summary: This diff adds a Mercurial option (`ssl.signal_status`) to disable signal fetching in `hg ssl`.
Reviewed By: quark-zju
Differential Revision: D18120435
fbshipit-source-id: 2cf01d83b9c5737f8b116a9c3447f32a0abd5d9a
Summary: It is no longer used, no need to keep it around.
Reviewed By: singhsrb
Differential Revision: D18101161
fbshipit-source-id: 92d4b4947d232fddb347257473203ec1f3469335
Summary:
This commit removes the `hgsubversion` extension and associated code
because it should no longer be used.
Reviewed By: quark-zju
Differential Revision: D18088850
fbshipit-source-id: 9da2790c89427c8bbe4e02165f484628718b130c
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: 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:
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:
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:
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:
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:
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:
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 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:
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:
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:
Manifestlog is the object that is often passed around in mercurial as the proxy
to manfiests. Commits that need to check various information on manifests will
will recreate trees for every file that goes into the commit. This is a lot of
churn. Caching the manfiests in the manfiestlog is an easy fix right now.
This codepath was hitting the Rust manifest code path more than the C++ code
path because Rust will eagerly parse entries. Among parsing the highest cost
is to convert the hex Node to a binary Node - an operation that would not
be performed by C++.
Reviewed By: xavierd
Differential Revision: D17859964
fbshipit-source-id: 44341c1cd4e9b70d80d864065f234cb906a8d76b
Summary:
When checking out on a snapshot, we want to make sure that:
1) it gets downloaded with the infinitepush's wrapper;
2) it checks out using the snapshot extension command.
Also changes `--force` flag for `snapshot checkout` cmd to `--clean` for better compliance.
Reviewed By: mitrandir77
Differential Revision: D17762185
fbshipit-source-id: 4cc3b829cba5f6ea9a33daed0367b34225a77dbf
Summary:
The Python interpreter is unable to respond to signals during FFI calls. This means that if there is a long-running FFI call (such as an HTTP tree prefetch via EdenAPI), the user will not be able to interrupt the process with Ctrl-C, leading to frustrating user experience.
To allow the interpreter to handle signals during FFI, let's wrap all EdenAPI FFI calls with a decorator that simply runs the operation in a separate Python thread and then busy-waits for the duration of the call (to avoid blocking in an uninterruptible way).
Reviewed By: quark-zju
Differential Revision: D17844316
fbshipit-source-id: baa4f489567105cfccdc314644ac1ae9e1c82a08
Summary: Use the new `filesystem.purge` method.
Reviewed By: mitrandir77
Differential Revision: D17830420
fbshipit-source-id: 43b340b8c54b5f50db0f2aa0ba318b7cfa00b405
Summary:
There might be cases when `bundlerepo` doesn't have a `_snapshotbundlestore`.
Let's check that directly.
Reviewed By: mitrandir77
Differential Revision: D17793227
fbshipit-source-id: c2312fcf9c3d4de5af2c6e487e594d6338989fbf
Summary:
Remove command name prefix matching to make things much easier.
This breaks command completion.
Reviewed By: sfilipco
Differential Revision: D17644675
fbshipit-source-id: c8a866bf0649c4644c8e5630acdceb459a22deb4
Summary:
There are situations where it's useful for Phabricator to know what
branch a commit was created on. For instance, it may allow Phabricator to
suggest which branch to land a commit too.
Let's add the downstream branch to the crdump output, so jf can report it to
Phabricator.
Caveat: In Mercurial it's impossible to know for certain which remote bookmark a
local commit was made against. The best we can do is a heuristic. The heuristic
is as follows:
1. For a given commit, find the first public ancestor.
2. For that ancestor commit, find all descendant commits that have remote
bookmarks.
3. If the descendant remote bookmarks contain "master", return that.
4. If the descendant remote bookmarks contain just one bookmark, return that.
5. Otherwise, return an empty string.
Reviewed By: mitrandir77
Differential Revision: D17814487
fbshipit-source-id: 1e37f57e18af55d4085fba27111b642a406c81af
Summary:
This updates clienttelemetry to log the peer name to the hg blackbox (on every
connection). This might make it easier to understand which host a given hg is
connecting to even if we can't get to its logs (e.g. in our external sync
processes, we are capturing output to match it for errors, so it's not trivial
to get the remote hostname even with clienttelemetry.announceremotehostname.
It's possible to retrieve the peer name with e.g.: ` hg blackbox --pattern '{"clienttelemetry": "_"}'`
Reviewed By: ikostia
Differential Revision: D17808834
fbshipit-source-id: 5c8afca6bd8b3bbbf14ec8d8efb3f9b1f6b25986
Summary:
The new filesystem abstraction hides the complexity of fsmonitor behind
a single "pendingchanges" call, which only takes a matcher and a boolean for
listing ignore files. This diff refactors the fsmonitor logic to work with this
new API instead of the old walk api.
Reviewed By: quark-zju
Differential Revision: D17142419
fbshipit-source-id: d068ec684668df4fe3ff07a95fc3134ddc5cb4dc
Summary:
Eden wants to be able to perform the purge itself, so Mercurial doesn't
have to walk over the whole tree and so it can do it in bulk. Let's start by
refactoring purge to be implemented within the filesystem layer, and moving the
current implementation down.
Reviewed By: quark-zju
Differential Revision: D17142418
fbshipit-source-id: 13b2dc892756ab79c12b62071930264dc99ee511
Summary:
We eventually want to depend on all commits being uploaded to commit
cloud, instead of passing bundles to other services. To start this process,
let's make hg debugcrdump (which is used by jf submit) force the upload of the
given commits.
This required a minor refactor the backup.backup to make it more usable by logic
other than the backup command. I applied the same pattern to sync as well,
though it wasn't strictly necessary.
In a future diff we'll add logging to track how many jf submits send commits
that are not uploaded to commit cloud.
Reviewed By: mitrandir77
Differential Revision: D17721168
fbshipit-source-id: d191cfe3356a9bb2956a33921e13d317f7ed4ee5
Summary:
`hiddenoverride` was a hack to override visibility. So if visibility is
tracked explicitly, there is no need to enable hiddenoverride.
This breaks the visibility upgrade feature, but we have shipped visibility for
a long time.
Reviewed By: sfilipco
Differential Revision: D17812491
fbshipit-source-id: 58d70165be9265de1beb9600ae5ec72f6db22e6a
Summary:
Commands like `hg rebase --continue` shouldn't be translated, because if the
user does type the translated command, their shell is unlikely to execute it
correctly.
Reviewed By: kulshrax
Differential Revision: D17768761
fbshipit-source-id: 4b995382db12397424ef4391e4515bd7933818dd