Differences between revisions 4 and 5
Revision 4 as of 2009-05-06 20:12:53
Size: 1684
Editor: DavidSoria
Comment:
Revision 5 as of 2009-05-12 10:51:50
Size: 1705
Editor: DavidSoria
Comment:
Deletions are marked like this. Additions are marked like this.
Line 9: Line 9:
  boolean pushkey (string identifier, string key, string value)   boolean pushkey (string identifier, string key, string value, boolean force=False)

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.

Implementation Details

The puskey/listkeys interfaces is defined as:

  boolean pushkey  (string identifier, string key, string value, boolean force=False)
  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.

Push Access

The current concept does not implement any special push/pull access rules. Everybody who has allow_push rights will be able to push keys. Listing of keys is always possible.

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)