Differences between revisions 1 and 2
Revision 1 as of 2009-05-04 12:37:03
Size: 1365
Editor: DavidSoria
Comment:
Revision 2 as of 2009-05-04 20:47:19
Size: 1474
Editor: DavidSoria
Comment:
Deletions are marked like this. Additions are marked like this.
Line 19: Line 19:

== Next Steps ==
Add the specifics of how you control who's allowed to push keys and how they're stored.

General

The current implementation of the wire protcol in Mercurial lacks support to push and pull data that is not managed by the manifest and revlog. As a result extensions like the Bookmark Extension are not able to push their data over the wire. The following section will describe an approach to extend the wire protocol to make these usages possible.

I propose to add a pushkey and listkeys method to the wire protocol. The pushkey can be used to push a key-value-pair to a remote repository. The remote repository can determine how to update the provided information. The listkeys method can be used to pull the information from a repository and update the data locally according to the provided information.

Implementaton Details

The puskey/listkeys interfaces is defined as:

  • boolean pushkey (string identifier, string key, string value) dict listkeys (string identifier)

The identifier determines which handler to call on the remote site. A short example:

  • pushkey('bookmarks', 'my-bookmark', 'aa3dfa...')

As a result the remote site knows to forward the information to the bookmark implementation. Pushkey returns falls if an error occurs during push.

Listkeys will return a key=>value combination. Both local and remote repository have to provide the necessary "capability" to be able to push and list keys.

Next Steps

Add the specifics of how you control who's allowed to push keys and how they're stored.

PushkeyConcept (last edited 2020-01-05 06:31:05 by MattHarbison)