D2024: sshpeer: make "instance" a function
This revision was automatically updated to reflect the committed changes. Closed by commit rHGb0d2885c5945: sshpeer: make "instance" a function (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D2024?vs=5182&id=5241 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, yuja Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D2024: sshpeer: make "instance" a function
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