D3318: repository: remove ipeercommands from ipeerbase

2018-04-13 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG62ebfda864de: repository: remove ipeercommands from 
ipeerbase (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3318?vs=8138&id=8186

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

AFFECTED FILES
  mercurial/localrepo.py
  mercurial/repository.py
  mercurial/wireprotov1peer.py

CHANGE DETAILS

diff --git a/mercurial/wireprotov1peer.py b/mercurial/wireprotov1peer.py
--- a/mercurial/wireprotov1peer.py
+++ b/mercurial/wireprotov1peer.py
@@ -308,7 +308,7 @@
 else:
 f.set_result(result)
 
-@zi.implementer(repository.ipeerlegacycommands)
+@zi.implementer(repository.ipeercommands, repository.ipeerlegacycommands)
 class wirepeer(repository.peer):
 """Client-side interface for communicating with a peer repository.
 
diff --git a/mercurial/repository.py b/mercurial/repository.py
--- a/mercurial/repository.py
+++ b/mercurial/repository.py
@@ -284,8 +284,7 @@
 being issued.
 """
 
-class ipeerbase(ipeerconnection, ipeercapabilities, ipeercommands,
-ipeerrequests):
+class ipeerbase(ipeerconnection, ipeercapabilities, ipeerrequests):
 """Unified interface for peer repositories.
 
 All peer instances must conform to this interface.
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -196,6 +196,7 @@
 def close(self):
 self._closed = True
 
+@zi.implementer(repository.ipeercommands)
 class localpeer(repository.peer):
 '''peer for a local repo; reflects only the most recent API'''
 



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


D3318: repository: remove ipeercommands from ipeerbase

2018-04-13 Thread indygreg (Gregory Szorc)
indygreg added a comment.


  In https://phab.mercurial-scm.org/D3318#53227, @durin42 wrote:
  
  > I think we should probably avoid breaking that API until after we get 
remotefilelog in core? That'd at least be nice for me, because RFL is pretty 
invasive proto-wise. :(
  
  
  I have little desire to purge this until at least next release. Minimal gains 
from it. Wins come from core and new peers being able to use new API.

REPOSITORY
  rHG Mercurial

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

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


D3318: repository: remove ipeercommands from ipeerbase

2018-04-13 Thread durin42 (Augie Fackler)
durin42 added a comment.


  I think we should probably avoid breaking that API until after we get 
remotefilelog in core? That'd at least be nice for me, because RFL is pretty 
invasive proto-wise. :(

REPOSITORY
  rHG Mercurial

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

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


D3318: repository: remove ipeercommands from ipeerbase

2018-04-13 Thread indygreg (Gregory Szorc)
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  AFAICT all callers in core have moved to the commandexecutor
  interface for invoking wire protocol commands. Or at least they
  aren't using the named methods on ipeercommands to invoke them.
  
  This means we can drop ipeercommands from the ipeerbase interface.
  As far as interface based programming goes, it is now illegal to call
  an ipeercommands method for issuing wire protocol commands. However,
  the methods are still there, so they will still work. At some
  point we will want to break that API...

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/localrepo.py
  mercurial/repository.py
  mercurial/wireprotov1peer.py

CHANGE DETAILS

diff --git a/mercurial/wireprotov1peer.py b/mercurial/wireprotov1peer.py
--- a/mercurial/wireprotov1peer.py
+++ b/mercurial/wireprotov1peer.py
@@ -308,7 +308,7 @@
 else:
 f.set_result(result)
 
-@zi.implementer(repository.ipeerlegacycommands)
+@zi.implementer(repository.ipeercommands, repository.ipeerlegacycommands)
 class wirepeer(repository.peer):
 """Client-side interface for communicating with a peer repository.
 
diff --git a/mercurial/repository.py b/mercurial/repository.py
--- a/mercurial/repository.py
+++ b/mercurial/repository.py
@@ -284,8 +284,7 @@
 being issued.
 """
 
-class ipeerbase(ipeerconnection, ipeercapabilities, ipeercommands,
-ipeerrequests):
+class ipeerbase(ipeerconnection, ipeercapabilities, ipeerrequests):
 """Unified interface for peer repositories.
 
 All peer instances must conform to this interface.
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -196,6 +196,7 @@
 def close(self):
 self._closed = True
 
+@zi.implementer(repository.ipeercommands)
 class localpeer(repository.peer):
 '''peer for a local repo; reflects only the most recent API'''
 



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