Boris Feld <boris.feld@octobus.net> [Tue, 17 Oct 2017 15:27:17 +0200] rev 35276
getbundle: add support for 'bookmarks' boolean argument
This new argument requests a 'bookmarks' part from the server. It is meant to
be used instead of the "listkeys" request.
Boris Feld <boris.feld@octobus.net> [Tue, 17 Oct 2017 15:26:16 +0200] rev 35275
bundle2: support a 'records' mode for the 'bookmarks' part
In this mode, the bookmarks changes are record in the 'bundleoperation' records
instead of inflicted to the repository. This is necessary to use the part when
pulling.
Boris Feld <boris.feld@octobus.net> [Tue, 17 Oct 2017 15:39:34 +0200] rev 35274
bundle2: add a 'modes' dictionary to the bundle operation
This new attribute allows the codes requesting an unbundling to pass important
information to individual part handlers. The current target use case is to
allow for receiving 'bookmarks' part without directly updating local
repository, but just recording the received data instead. This is necessary
for pull where the remote bookmarks are processed locally. I expect the
concept to be beneficial to other parts in the future.
To clarify the bookmark behavior on pull, the remote bookmark value are not just
taken -as-is- into the local repository. There is an extra step to detect
bookmark divergence. The remote bookmarks data are stored until this processing
happens.
Boris Feld <boris.feld@octobus.net> [Tue, 17 Oct 2017 12:38:13 +0200] rev 35273
bookmark: use the 'bookmarks' bundle2 part to push bookmark update (issue5165)
We use the new binary parts we introduced earlier to exchange bookmark. The
payload is a bit more compact since we use binary and the length of bookmarks
is no longer constrained to 255.
.. fix:: Issue 5165
Bookmark, whose name is longer than 255, can again be exchanged again
between 4.4+ client and servers.
Boris Feld <boris.feld@octobus.net> [Tue, 17 Oct 2017 12:37:39 +0200] rev 35272
bookmark: introduce in advance a variant of the exchange test
We are about to introduce a new way to push bookmark to server. We introduce
the test variant before actually updating the exchange to help the output
changes to stand out when it happens.
Boris Feld <boris.feld@octobus.net> [Sun, 15 Oct 2017 19:22:56 +0200] rev 35271
push: move bundle2-pushkey based bookmarks exchange in its own function
We are about to introduce an alternative way to push bookmark over bundle2.
Boris Feld <boris.feld@octobus.net> [Tue, 17 Oct 2017 12:07:24 +0200] rev 35270
bookmark: add pushkey hook compatiblity to the bundle2 part
Currently, pushing a bookmark update triggers a pushkey hooks. It is likely
that users in the wild use such hooks to control bookmark movement. Using a non
push-key mechanism to exchange bookmark means these hooks are no longer called,
possibly breaking existing users setup. So we add explicit call to the pushkey
hooks in the handling of the bundle2 part. This behavior can be disabled with a
new config knob: 'server.bookmarks-pushkey-compat'.
Boris Feld <boris.feld@octobus.net> [Sun, 15 Oct 2017 18:02:11 +0200] rev 35269
bookmark: introduce a 'bookmarks' part
This part can carry and apply bookmarks information. We start with adding the
core behavior of the part. In its current form, the part is only suitable for
push since it plain update the bookmark without consideration for the local
state. Support of the behavior needed for pulling will be added in later
changesets.
Boris Feld <boris.feld@octobus.net> [Mon, 13 Nov 2017 04:22:45 +0100] rev 35268
push: include a 'check:bookmarks' part when possible
Before updating the actual bookmark update, we can start with updating the way
we check for push race. Checking bookmarks state earlier is useful even if we
still use pushkey. Aborting before the changegroup is added can save a lot of
time.
Boris Feld <boris.feld@octobus.net> [Sun, 15 Oct 2017 15:01:03 +0200] rev 35267
bookmark: add a 'check:bookmarks' bundle2 part
This part checks that bookmarks are still at the node they are expected to be.
This allows a pushing client to detect push race where the repository was
updated between the time it discovered the server state and the time it managed
to finish its push.
Such checking already exists when pushing bookmark through pushkey. This new
part can be inserted at the beginning of the bundle, triggering abort earlier.
In addition, we would like to move away from pushey to push bookmark. A step
useful to solve issue5165.