Summary: This will be used to describe what the commit graph backend is.
Reviewed By: sfilipco
Differential Revision: D22970577
fbshipit-source-id: 753efdbdd4466730ece758d9f4789fbd21e2801b
Summary:
This allows us to try segmented changelog while maintaining revlog
compatibility.
Reviewed By: sfilipco
Differential Revision: D22970583
fbshipit-source-id: 7c43cdadd76300e76e89f38aac5ed3ecc0cff728
Summary: The value of linkrev is invalid with segmented changelog. Do not resolve it.
Reviewed By: sfilipco
Differential Revision: D23036079
fbshipit-source-id: 8f8b097458bc694327db6ba4e2dc4107bdf44157
Summary:
Phabricator reports some repos as being backed by git, and the phrevset
code path in that case uses the python 2 hex encoding. Let's just use the hex
function directly.
Reviewed By: quark-zju
Differential Revision: D23207771
fbshipit-source-id: 88de3153e52a3db456c17ab4ca4b9c9dd6049855
Summary:
Related commit: D23213192
Currently repo configs don't store their phabricator callsigns and because of this,
it's hard to generate them with a given repo name (e.g. fbsource) in Mononoke.
This diff synced the changes between configerator (check the other commit) and fbsource.
Reviewed By: farnz
Differential Revision: D23214677
fbshipit-source-id: cf102d69958c7dc32f8b72cecbfad017d0a31329
Summary:
In the next diff I'd like to compute generation number first, and then call
DifferenceOfUnionsOfAncestorsNodeStream. To avoid refetching these numbers
again let's create a function that accepts a vector of (ChangesetId,
Generation) pairs.
While here I also made the order more consistent: now we have "hashes"
parameters always in front of "excludes"
Differential Revision: D23212883
fbshipit-source-id: 11e0a1494126f84b36e3e33e65071449db5840d2
Summary:
Previously for undesired fetches of lfs files we were logging 0. Let's log the
real path instead
Reviewed By: ikostia
Differential Revision: D23209754
fbshipit-source-id: 7a893b257a89332a5169ab2072ecf48ae94b91e0
Summary: Rather than using a Python program, simulate having no editor during tests using `internal:none`.
Reviewed By: quark-zju, ikostia
Differential Revision: D23152446
fbshipit-source-id: 5560f58885ee5959c62f0ac8bcf0483b9c3072f6
Summary:
The commandserver was setting args as bytes when they should be
strings. This was breaking arg parsing for users using hglib, which communicates
with hg via the commandserver.
Reviewed By: sfilipco, singhsrb
Differential Revision: D23202623
fbshipit-source-id: f71e4145211069b2f7ed6935fe86585061cbf8b3
Summary:
The old discovery logic is incompatible with the rust changelog because
the changelog is not based on revlog.
Reviewed By: sfilipco
Differential Revision: D23036065
fbshipit-source-id: 633fdf8726d40cb14e63c3df2f5573d35cb1640a
Summary:
They are faster if the new dag backend is used. For example, `headsancestors`
will be backed by a fast native path, where the `head(ancestors(x))` revset
would be unusably slow if the new dag backend is used.
Reviewed By: sfilipco
Differential Revision: D23036069
fbshipit-source-id: 75df1e2240520a6e560bc5d8414ba2f4fb7a4674
Summary:
It read the sharedpath manually but needed to read it as utf8, not
bytes.
Reviewed By: quark-zju
Differential Revision: D23194858
fbshipit-source-id: aa73c2cc782070ba6c4d2c441d6f5338842b137f
Summary:
sshpeers were being cleaned up twice. Once during the explicit close()
and once during the __del__ destruction. This caused it to double count the
reported _totalbytesreceived.
Reviewed By: quark-zju
Differential Revision: D23178435
fbshipit-source-id: da76158be561511f2f2a5e255fd03aa4a6b78da0
Summary:
We missed a Windows http client breakage because our LFS server integration
wasn't run on Windows. Let's enable the fb feature for all our cargo test runs.
Reviewed By: singhsrb
Differential Revision: D23140315
fbshipit-source-id: 46cc533c1e543ffc32d472b49a8f6daeee3b5009
Summary:
Aux data wire protocol part 1: field annotations & basic compatibility model.
Annotates fields in `file`, `tree`, and `complete_tree` wire structs with `#[serde(rename = "N", default, skip_serializing_if = "is_default")]`. I've avoided using `#[serde(default)]` on the container structs themselves because this can cause some confusion / incorrect behavior if not used carefully. Consider a wire struct `FooRequest` with a field of type `Option<Bar>`. `Option<Bar>` defaults to `None`. If `FooRequest`'s `Default` implenentation sets the field's default to `Some(bar)`, a `FooRequest` explicitly constructed with `None` for the field will be serialized with the field omitted (because it passes `is_default`) and will be deserialized on the server as `Some(bar)`, causing incorrect behavior. To address this, we'd need to change the `is_default` function used with `skip_serializing_if` to check against the field's default value as set by the container, which isn't trivially possible without some sort of reflection (please correct me if you know a good way to achieve this). This is unfortunate, as it'd be very desirable for the container to be able to set defaults different from the individual field type defaults, for cases where one boolean, for instance, should default to true. As-is, we'd need to address this with wrapper types instead, where we can fully control the `Default` implenentation.
We can, of course, address this by providing an alternate `skip_serializing_if` function to fields with default that doesn't match that set by the container. This will need to be done carefully, though, to avoid the issue I described above.
Currently the JSON module manually serializes and deserializes all the top-level request objects, so the rename annotation doesn't impact it. We can add `#[serde(alias = "rustfieldname")]` if we'd like the server and client to be able to accept manually-crafted requests and responses with explicit field names. This could also be useful to replace the manual parsing in the JSON module, but can't replace the manual serialization in a clean way. We'd need to introduce a second copy of the wire types, without the serde `rename` attribute, to allow serializing with the actual rust field name.
I've only modified the `tree`, `file`, and `complete_tree` modules. I intend to eventually update the rest of the edenapi protocol later on, when the implementation of `file` and `tree` are complete / stable. This will give us a chance to fix any mistakes before copying the design to more places.
Note: I do not intend to keep to proper wire protocol compatibility at this stage in the implementation. Expect field numbers to be re-used by non-compatible changes.
Reviewed By: kulshrax
Differential Revision: D23172756
fbshipit-source-id: 39976ed4bede892bd6981f9c3f23557a91f9028b
Summary:
This came from a [request from Fred Emmott](https://fb.workplace.com/groups/osssupport/permalink/4116491528399431/), but also is something we should do due to the GitHub UI redesign:
Nowadays on GitHub, tags are not shown in the sidebar (just the count) and instead GitHub Releases are prioritized and the most recent *release* is shown.
Secondly, the Source Code zip archives for tags/releases are created on-the-fly on GitHub. This can cause problems for downstream projects that need consistent content hashes of the archive for security/reproducability reasons. This action also creates its own archives (zip and tar.gz) and attaches them to the release.
Reviewed By: fredemmott
Differential Revision: D23167073
fbshipit-source-id: 463e9d93a2c4af260ac3c4dbc1ceab7894add714
Summary: Make it consistent with the top-level README which does not use the "HG" name.
Reviewed By: kulshrax
Differential Revision: D23176134
fbshipit-source-id: 2d809cfa89234d00c714f9db381a138e9f03fc64
Summary:
hg `cloud join -w myworkspace --switch/--merge` should require --create option for all not default
workspaces if the workspace doesn't already exist.
I also enabled reusing of http connection, so it makes `hg cloud switch` much faster.
It is less than 2 sec now.
Reviewed By: markbt
Differential Revision: D23188491
fbshipit-source-id: 9a2ba2df4ba91e9dba9484cd49fc886f70b09880
Summary: In py3, a string pattern cannot be used to match against a bytestring text. Convert the pattern to a bytestring, which should be compatible with python2 without additional changes.
Reviewed By: DurhamG
Differential Revision: D23135472
fbshipit-source-id: fcc0b111c646011f5b556f032ef85ef326cb9511
Summary: Minor refactor: moved the tests from main to their own file, because main was getting too large and found it hard to navigate through the code.
Reviewed By: StanislavGlebik
Differential Revision: D23188766
fbshipit-source-id: a2b2e32c77587f95c07a0bb02a4957e3671dd2c6
Summary:
This largely moves connection accepting from old style bytes, futures and tokio
to updated versions, while keeping some parts at old bytes/futures in order to
remain compatible with the rest of the Mononoke codebase.
Division lies on `Stdio` which maintains old channels, stream and futures,
while the socket handling, connection acception and wire encoding is updated.
With the updated futures, we now wait for the forwarding stream to have
succeeded before considering a connection fully handled.
Other notable changes:
- futures_ext now a mini codec Decoder instead of relying on NetstringDecoder,
which has been updated to use bytes 0.5
- hgcli has been modified to use updated NetstringDecoder
- netstring now requires the updated bytes 0.5 crate
- the part in connection_acceptor was handling repo/security logic is now part of repo_handler (as it should have been), connection_acceptor now only handles networking and framing
- tests now verify that the shutdown handler is triggered
Reviewed By: krallin
Differential Revision: D22526867
fbshipit-source-id: 34e43af4a0c8b84de0000f2093d7fffd3fb0e20d
Summary:
- Added a commandline flag to ignore testpilot even when it's available
- Fixed an oversight that caused getdeps to return 0 even if ctest tests have failed.
Reviewed By: wez
Differential Revision: D23161362
fbshipit-source-id: 1ed97c481315e2b39f1128680386390930194970
Summary:
As noted in the documentation for it, this can be removed once get and prefetch
return a continuation. This is now done, and thus we can remove it entirely.
Mis-use of it caused data to be fetched twice: once by memcache, and the second
one by getpackv2.
Reviewed By: singhsrb
Differential Revision: D23123344
fbshipit-source-id: 9ac0594faaba94ead04a8bb9035e14809a706641
Summary: The python code stripped new lines but the Rust code did not.
Reviewed By: singhsrb
Differential Revision: D23167515
fbshipit-source-id: add33ec6e4cfd9169e6fef8208490e0aeede38bd
Summary:
The tests weren't windows compatible. Let's get rid of the path
separators.
Reviewed By: quark-zju, singhsrb
Differential Revision: D23170573
fbshipit-source-id: f934691cd2891205442885a12debe3a28d275fc5
Summary:
Subscribers to the commit tailer categories would like to know when Mononoke
received the commit.
Reviewed By: StanislavGlebik
Differential Revision: D23162447
fbshipit-source-id: 747214f1964a643f59c491aa08cdbd5c8fe331c8
Summary:
Allow callers of `resolve_bookmark` to specify whether they'd like the most recent value of
the bookmark, rather than one which may be stale.
Use this in the repo_move_bookmark test to avoid flakiness caused by the test code racing against
the warm bookmark cache.
Reviewed By: StanislavGlebik
Differential Revision: D23151427
fbshipit-source-id: 4b8358be1cf103479ccc23a41b2505776543ee49
Summary:
Extract construction of the hook manager to its own crate, so that we can re-use it.
Eventually the hook manager will become a repo attribute and will be constructed by
the repo attribute factory, but for now it needs its own factory method.
Differential Revision: D23129407
fbshipit-source-id: 302fde4d1ae38c6f61032a32c880018ebf84dee2
Summary:
Convert hook rejections from a tuple to a named struct. This will be used in
the bookmarks_movement public interface.
Reviewed By: krallin
Differential Revision: D23077550
fbshipit-source-id: a35476817660c38b8df879ba603b927a7e39be21
Summary: Some repos are push-redirected repos: pushes go to another repos, but then synced into this repo. Because of this, when we import a repo into a smaller repo that push-redirects to a large repo, we need to make sure we don't break the large repo with the imported code, since merges, pushes, imports etc. are redirected to the large repo. For now, in order to avoid breaking the large repo, we added a simple check that returns error, if the small repo push-redirects to the large one.
Reviewed By: ikostia
Differential Revision: D23158826
fbshipit-source-id: f722790441d641f67293e78c5d1ea5d1102bbb9b
Summary:
This new disallowlist will let us specify config section.key's which
should not be accepted from old rc files. This will let us incrementally disable
loading of those configs from the old files, which will then let us delete them
from the old rc's and eventually delete the old rc's entirely.
This diff also removes hgrc.local and hgrc.od from the list of configs we
verify, since those are not on the list of configs that need to be removed in
this initiative.
Reviewed By: quark-zju
Differential Revision: D23065595
fbshipit-source-id: 5cd742d099efd651174cab5e87bb7cdc4bae8054
Summary:
Previously the backing store was loading configs manually. Now that
system, dynamic, user, and repo config loading are unified, let's go through
that approved path.
Reviewed By: kulshrax
Differential Revision: D22736338
fbshipit-source-id: 232023e660107a096691e9d99bf89c04c218dfbd
Summary:
The last few diffs prepared Rust for loading dynamic and repo configs.
This diff finally changes Python so that we're no longer doing any of this work
in Python.
Reviewed By: quark-zju
Differential Revision: D22712625
fbshipit-source-id: 0b71e81d79d10ea3ce7a1b31f315ada5728af9a9