Georges Racinet <georges.racinet@octobus.net> [Thu, 30 Mar 2023 12:14:57 +0200] rev 50412
rust-revlog: explicit naming for `RevlogEntry` lifetime
This matches what has been done in `revlog::changelog::ChangelogRevisionData`,
and has the advantage of making things clearer when we introduce other, shorter
lived lifetimes.
Georges Racinet <georges.racinet@octobus.net> [Wed, 29 Mar 2023 20:50:42 +0200] rev 50411
rust-changelog: introducing an intermediate `ChangelogEntry`
Before this change, client code needing to extract, e.g, the Node ID and the
description from a changeset had no other choice than calling both
`entry_for_rev()` and `data_for_rev()`. This duplicates some (limited) computation, and
more importantly imposes bad hygiene for client code: at some point of developement,
the client code would have to pass over both entry and data in its internal layers,
which at some point of development would raise the question whether they are consistent.
We introduce the intermediate `ChangelogEntry` from which both conversion to the generic
`RevlogEntry` and extraction of `ChangelogRevisionData` are possible.
It might grow some convenience methods in the future.
We keep the `data_for_rev()` method of `Changelog` for compatibility, pointing users at the more
powerful alternative.
Georges Racinet <georges.racinet@octobus.net> [Wed, 29 Mar 2023 21:03:39 +0200] rev 50410
rust-changelog: added a test for `NULL_REVISION` special case
The result is due to `Revlog.get_rev_data()` returning an empty
byte string for `NULL_REVISION`, followed by special case for
emtpty byte strings in `ChangelogRevisionData::new()`.
Georges Racinet <georges.racinet@octobus.net> [Wed, 29 Mar 2023 20:24:58 +0200] rev 50409
rust-changelog: made doc-comments more consistent
The most important is the one about `data_for_rev`, that looked like
a copy-paste leftover (got me confused first time I read this code, before
I actually learned there were both `Entry` and RevisionData`.
In the comment for the `struct`, "changelog" was probably more about
the format in general (as documented elsewhere) than as an identifier.
Some of the "Return something" had "of", half had "for".
Jason R. Coombs <jaraco@jaraco.com> [Tue, 21 Mar 2023 20:47:30 -0400] rev 50408
extras: re-use Projection from jaraco.collections
Jason R. Coombs <jaraco@jaraco.com> [Tue, 21 Mar 2023 17:21:45 -0400] rev 50407
extras: expose 'retained_extras' for extensions to extend
Jason R. Coombs <jaraco@jaraco.com> [Tue, 21 Mar 2023 17:17:09 -0400] rev 50406
extras: extract function for projecting names from a gettable object
Manuel Jacob <me@manueljacob.de> [Sat, 25 Mar 2023 23:02:33 +0100] rev 50405
hgweb: add "children" into the JSON template for a changeset
The children are shown in the HTML templates, so I don’t see a reason against including them in the JSON template as well.
Raphaël Gomès <rgomes@octobus.net> [Fri, 24 Mar 2023 10:43:47 +0100] rev 50404
branching: merge stable into default
Julien Cristau <jcristau@mozilla.com> [Wed, 22 Mar 2023 15:19:02 +0100] rev 50403
help: fix formatting for http config section
Raphaël Gomès <rgomes@octobus.net> [Mon, 20 Mar 2023 23:16:14 +0100] rev 50402
branching: merge stable into default
Felipe Contreras <felipe.contreras@gmail.com> [Thu, 09 Mar 2023 13:02:13 -0600] rev 50401
fastexport: rework newline logic
Newlines should only be added when otherwise the stream would look weird
without them (on blobs), therefore they are the exception.
Flip the logic so they are added, not skipped.
Arseniy Alekseyev <aalekseyev@janestreet.com> [Mon, 06 Mar 2023 11:27:57 +0000] rev 50400
encoding: avoid quadratic time complexity when json-encoding non-UTF8 strings
Apparently the code uses "+=" with a bytes object, which is linear-time, so the
whole encoding is quadratic-time. This patch makes us use a bytearray object,
instead, which has a(n amortized-)constant-time append operation.
The encoding is still not particularly fast, but at least a 10MB file
takes tens of seconds, not many hours to encode.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 08 Mar 2023 11:01:11 +0100] rev 50399
bundle: prevent implicite bundling of internal changeset
Now that the two mains source of on-disk bundle are preventing the inclusion of
internal changesets in their bundling. We can add a lower level check that
would prevent any other leakage of internal-phase changesets.
We keep the door open to some usage, like the temporary bundle using during
strip for example.
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 10 Mar 2023 07:19:25 +0100] rev 50398
bundle: abort if the user request bundling of internal changesets
See inline comments for details.
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 10 Mar 2023 07:10:19 +0100] rev 50397
strip: do now include internal changeset in the strip backup
See inline comment for details.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 08 Mar 2023 11:00:30 +0100] rev 50396
revset: add `_internal()` predicate
This predicate help core code to select internal changeset (in the internal
phase).
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 10 Mar 2023 03:41:18 +0100] rev 50395
strip: drop the assert about bundled revision
This is working well, so no need for extract computation. See the previous
changeset for the rationnal of still have these assert around for a short
interval.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 09 Mar 2023 15:06:59 +0100] rev 50394
strip: explicitly compute the boundary of the backup bundle
We want to make change to the set of backed up revision in a future changeset,
we start with a change of the computation without any changes in the semantic
to clarify later changeset.
The could of costly assert are here to testify that the result is still
correct. They will be removed in the next changesets, but I wanted them in this
changeset to help in case someone bisect a regression to this changeset in the
future.
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 10 Mar 2023 04:04:10 +0100] rev 50393
outgoing: fix common-heads computation from `missingroots` argument
When initializing a `outgoing` object, the `common set` can be defined explicitly (with the `commonheads` argument`) or implicitly (with the missingroots arguments).
It turns out the logic to compute `commonheads` from `missingroots` is buggy, as it does not consider the parents of enough changesets. Previously, it only considered parents of "missingroots` items, while it need to consider all parents of missing. Here is an example:
F
|\
C E
| |
B D
|/
A
If we use [E] as missing-roots, the missing set is [E, F], and the common-heads
are [C, D]. However you cannot only consider the parent of [E] to find them, as
[C] is not a parent of [E].
This already fix the bundle generated in one test, and it would prevent many
other to misbehave with future change from this series.
Jason R. Coombs <jaraco@jaraco.com>, Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 09 Mar 2023 01:26:04 +0100] rev 50392
bundle: include required phases when saving a bundle (
issue6794)
We now properly computes and includes phases above secret in bundle,
previously, they would be skipped, and then the code computing them would
crash.
Note that from this changeset, we also include the heads associated with the
changegroup's "target" phase. This turned out to be necessary to ensure the
movement of changeset included in the bundle, but already known locally.
This explain why lines for "secret" heads appears in multiple tests.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 08 Mar 2023 17:33:33 +0100] rev 50391
bundle: add test bundling changeset in the "archived" phase
Having this test highlight that phase bundling above secret is significantly
broken. Fixes coming in the next changesets.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 08 Mar 2023 15:23:22 +0100] rev 50390
bundle: introduce a "v3" spec
This is a small update from "v2", we use the freshly out of experimental
changelog version "03' format (alignment with bundle version is a coincidence) and we
now bundle phases by default.
We shall use v3 as the default bundle type later, when changegroup version '03'
is a bit more established
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 08 Mar 2023 15:43:23 +0100] rev 50389
bundle: add some phase boundary in the bundle type test case
Same logic as the previous one, we want the tests to cover richer cases. It
actually reveal a bug in `hg bundle foo.hg REMOTE` involving secret. So this is
definitly not a bad idea.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 08 Mar 2023 15:21:39 +0100] rev 50388
bundle: expand the graph we us for bundletype/bundlespec tests
We are about to test more things, especially phase bundling, so we need a graph
a bit more complex than a single node.
The test "code" was a bit simplified in the process, but no test-semantic
changes were made.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 07 Mar 2023 04:50:29 +0100] rev 50387
revset: include all non-public phases in _notpublic
We forgot up to update this when new phases were added.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Mar 2023 04:11:29 +0100] rev 50386
dirstate: remove _actual_file_name methode
This is dead-code
Matt Harbison <matt_harbison@yahoo.com> [Tue, 28 Feb 2023 15:00:26 -0500] rev 50385
revlog: add an exception hint when processing LFS flags without the extension
It would be even better if this was either detected sooner, or the transaction
completed (especially since the read/write processors aren't needed for the
exchange). But this makes it easier for the user to resolve until that can be
figured out.
Matt Harbison <matt_harbison@yahoo.com> [Mon, 27 Feb 2023 23:12:23 -0500] rev 50384
tests: drop py36 conditionals in test-bad-extension.t
Since this is a `>=` test, it's really conditionalizing py27 content, which
isn't a thing anymore.
Matt Harbison <matt_harbison@yahoo.com> [Mon, 27 Feb 2023 23:11:05 -0500] rev 50383
tests: drop py36 conditionals in test-hook.t
Since this is a `>=` test, it's really conditionalizing py27 content, which
isn't a thing anymore.
Matt Harbison <matt_harbison@yahoo.com> [Mon, 27 Feb 2023 22:51:18 -0500] rev 50382
tests: drop py36 conditionals in test-http-bad-server.t
Since this is a `>=` test, it's really conditionalizing py27 content, which
isn't a thing anymore.
Matt Harbison <matt_harbison@yahoo.com> [Mon, 27 Feb 2023 23:04:09 -0500] rev 50381
configitems: enable changegroup3 by default (unless using infinitepush)
The LFS extension requires this, and if it isn't enabled on the client (or the
LFS extension isn't loaded), a web client gets a 500 instead of a sensible error
message. Now it gets a different (client) error, but maybe it can be handled
more gracefully.
c0f11347b107 indicates that treemanifest repos have this issue
too.
29cfc474c5fd mentions gating this behind `experimental` so that the format
could change, but that was 7 years ago and we now have an experimental
`changegroup4` as well.
We can keep this as a config for the next cycle in case someone runs into an
unexpected problem, and then jettison it if the infinitepush bundle name changes
are either acceptable as-is or can be created differently.