This revision was automatically updated to reflect the committed changes.
Closed by commit rHG98861a2298b5: repository: split capabilities methods into 
separate interface (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3255?vs=8021&id=8096

REVISION DETAIL
  https://phab.mercurial-scm.org/D3255

AFFECTED FILES
  mercurial/repository.py

CHANGE DETAILS

diff --git a/mercurial/repository.py b/mercurial/repository.py
--- a/mercurial/repository.py
+++ b/mercurial/repository.py
@@ -61,6 +61,26 @@
         associated with the peer should be cleaned up.
         """
 
+class ipeercapabilities(zi.Interface):
+    """Peer sub-interface related to capabilities."""
+
+    def capable(name):
+        """Determine support for a named capability.
+
+        Returns ``False`` if capability not supported.
+
+        Returns ``True`` if boolean capability is supported. Returns a string
+        if capability support is non-boolean.
+
+        Capability strings may or may not map to wire protocol capabilities.
+        """
+
+    def requirecap(name, purpose):
+        """Require a capability to be present.
+
+        Raises a ``CapabilityError`` if the capability isn't present.
+        """
+
 class ipeercommands(zi.Interface):
     """Client-side interface for communicating over the wire protocol.
 
@@ -176,7 +196,7 @@
     def changegroupsubset(bases, heads, kind):
         pass
 
-class ipeerbase(ipeerconnection, ipeercommands):
+class ipeerbase(ipeerconnection, ipeercapabilities, ipeercommands):
     """Unified interface for peer repositories.
 
     All peer instances must conform to this interface.
@@ -205,21 +225,6 @@
         calls. However, they must all support this API.
         """
 
-    def capable(name):
-        """Determine support for a named capability.
-
-        Returns ``False`` if capability not supported.
-
-        Returns ``True`` if boolean capability is supported. Returns a string
-        if capability support is non-boolean.
-        """
-
-    def requirecap(name, purpose):
-        """Require a capability to be present.
-
-        Raises a ``CapabilityError`` if the capability isn't present.
-        """
-
 class ipeerbaselegacycommands(ipeerbase, ipeerlegacycommands):
     """Unified peer interface that supports legacy commands."""
 



To: indygreg, #hg-reviewers, durin42
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to