[PATCH 0 of 1] bfiles: new sshstore

david.douard at logilab.fr david.douard at logilab.fr
Mon Nov 9 14:33:34 CST 2009


Hi Greg and others,

sorry I did not had much time these days to work on the sshstore as promised.

Here a new implementation of the sshstore, using a new bfserve command (similar to hg's serve --stdio command, but limited to bfile's support for a ssh file store).

This version still have several copied pieces of code from sshserver and sshsrepo, but I'm not sure whether it's best to keep it like this or if I should better implement sshstore and sshstoreserver classes as subclasses of this formers, since they have many methods which are meaningless in the case of the sshstore implementation.

One other point, I've started to look how to implement the sshstore.verify method. And I wonder if we would not better have a basestore class implementing the main logic of the tree methods (get, put anf verify) making use of low-level methods to do the actual job of getting or putting a file in the store.

For example, the implementation of get method in the newly added httpstore, retriveving the file in a temp location, chacking its integrity before overwriting the file in the working directory should done in each and every implementation of a bfile store.

So what about refactoring the stores in this way?

David



More information about the Mercurial-devel mailing list