indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  The API is that peer modules must provide an "instance" symbol
  that is callable to return a peer.
  
  Making "instance" a function instead of an alias to "sshpeer"
  makes it easier to monkeypatch the "sshpeer" type. It will also
  make it possible to turn instance() into a factory function of
  sorts that returns different types based on connection properties.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/sshpeer.py

CHANGE DETAILS

diff --git a/mercurial/sshpeer.py b/mercurial/sshpeer.py
--- a/mercurial/sshpeer.py
+++ b/mercurial/sshpeer.py
@@ -370,4 +370,5 @@
             self._pipeo.flush()
         self._readerr()
 
-instance = sshpeer
+def instance(ui, path, create):
+    return sshpeer(ui, path, create=create)



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

Reply via email to