Mercurial > hg
diff mercurial/httppeer.py @ 39630:9c2c77c73f23
wireprotov2: define and implement "changesetdata" command
This commit introduces the "changesetdata" wire protocol command.
The role of the command is to expose data associated with changelog
revisions, including the raw revision data itself.
This command is the first piece of a new clone/pull strategy that
is built on top of domain-specific commands for data retrieval.
Instead of a monolithic "getbundle" command that transfers all of the
things, we'll be introducing commands for fetching specific pieces
of data.
Since the changeset is the fundamental unit from which we derive
pointers to other data (manifests, file nodes, etc), it makes sense
to start reimplementing pull with this data.
The command accepts as arguments a set of root and head revisions
defining the changesets that should be fetched as well as an explicit
list of nodes. By default, the command returns only the node values:
the client must explicitly request additional fields be added to the
response. Current supported fields are the list of parent nodes and
the revision fulltext.
My plan is to eventually add support for transferring other data
associated with changesets, including phases, bookmarks, obsolescence
markers, etc. Since the response format is CBOR, we'll be able to add
this data into the response object relatively easily (it should be
as simple as adding a key in a map).
The documentation captures a number of TODO items. Some of these may
require BC breaking changes. That's fine: wire protocol v2 is still
highly experimental.
Differential Revision: https://phab.mercurial-scm.org/D4481
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 12 Sep 2018 10:01:16 -0700 |
parents | a86d21e70b2b |
children | f80db6adabbe |
line wrap: on
line diff
--- a/mercurial/httppeer.py Wed Sep 12 09:58:23 2018 -0700 +++ b/mercurial/httppeer.py Wed Sep 12 10:01:16 2018 -0700 @@ -802,8 +802,7 @@ return True # Other concepts. - # TODO remove exchangev2 once we have a command implemented. - if name in ('bundle2', 'exchangev2'): + if name in ('bundle2'): return True # Alias command-* to presence of command of that name.