[PATCH 0 of 5 RFC] basic peer API implementation

Sune Foldager cryo at cyanite.org
Tue Jun 26 21:41:21 UTC 2012


This patch series implements the peer api for remote repositories
(meaning anything you pull, push, clone, incoming, outgoing etc. to,
no matter if it's on the local disk or not). The peer class only
contains the methods available to the wire protocol, and thus forces
code to not use any methods that only exist in certain contexts. This
eliminates a class of errors that pops up now and then.

The work was mostly done by Peter Arrenbrecht, and continued by him
and me last summer. I discussed the patches with Matt at the last
sprint, and we agreed that they are mostly ok, although there are a
number of details that might need attention before being pushed. Thus,
this should be seen as an RFC :)

Among other things that might need attention:

1. The patches should maybe be collapsed into fewer, maybe just one or
two.

2. The 'grace code' Peter put in here and there (marked with comments)
to make it easier on plugins, might be removed. This is code that
accepts both a peer and a localrepo object in certain
places. Otherwise, most plugins will need updating.

3. Some code might be written slightly differently, optimized a bit or
commented more.

4. Code style (line length and such) needs some work.


The code passes the test suite except for the code style test.

-Sune


More information about the Mercurial-devel mailing list