[PATCH 6 of 6 V2] peer: document the peer interface
Sune Foldager
cryo at cyanite.org
Fri Jul 13 15:12:48 CDT 2012
# HG changeset patch
# User Sune Foldager <cryo at cyanite.org>
# Date 1342209278 -7200
# Node ID 28ab0ef0cb0bb55921793e578077b1ef217f03f1
# Parent 258587d53651fcd9088bd338fac667b9ecc19243
peer: document the peer interface
diff --git a/mercurial/peer.py b/mercurial/peer.py
--- a/mercurial/peer.py
+++ b/mercurial/peer.py
@@ -10,6 +10,56 @@
import error
class peerrepository(object):
+ '''peer API:
+
+ local functions:
+ local
+ returns local repository object or None
+ peer
+ returns self
+ canpush
+ True if peer is writable, False otherwise
+
+ remote functions - modern API:
+ lookup
+ lookup changeset hash on the remote
+ heads
+ return list of topological heads on the remote
+ known
+ queries the remote for known changesets
+ branchmap
+ returns list of all branch heads
+ getbundle
+ returns bundle of changegroups
+ unbundle
+ push a bundle to remote
+ pushkey
+ push to key-value storage
+ listkeys
+ list remote key-value storage
+
+ remote functions - legacy API:
+ capable
+ checks capabilities
+ requirecap
+ helper; raise exception on missing capability
+ branches
+ used by old discovery algorithm
+ between
+ used by old discovery algorithm
+ changegroup
+ returns a changegroup for a revision range
+ used by old pull/clone protocol
+ changegroupsubset
+ returns a changegroup for some revisions
+ used by old pull/clone protocol
+ lock
+ locks repository
+ used by old ssh servers
+ addchangegroup
+ adds a changegroup
+ used by (very) old ssh servers
+ '''
def capable(self, name):
'''tell whether repo supports named capability.
More information about the Mercurial-devel
mailing list