D2216: httppeer: remove httpspeer

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Wed Feb 14 21:05:20 EST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHGf6c7733655fc: httppeer: remove httpspeer (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2216?vs=5615&id=5742

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

AFFECTED FILES
  mercurial/httppeer.py

CHANGE DETAILS

diff --git a/mercurial/httppeer.py b/mercurial/httppeer.py
--- a/mercurial/httppeer.py
+++ b/mercurial/httppeer.py
@@ -480,22 +480,15 @@
     def _abort(self, exception):
         raise exception
 
-class httpspeer(httppeer):
-    def __init__(self, ui, path):
-        if not url.has_https:
-            raise error.Abort(_('Python support for SSL and HTTPS '
-                               'is not installed'))
-        httppeer.__init__(self, ui, path)
-
 def instance(ui, path, create):
     if create:
         raise error.Abort(_('cannot create new http repository'))
     try:
-        if path.startswith('https:'):
-            inst = httpspeer(ui, path)
-        else:
-            inst = httppeer(ui, path)
+        if path.startswith('https:') and not url.has_https:
+            raise error.Abort(_('Python support for SSL and HTTPS '
+                                'is not installed'))
 
+        inst = httppeer(ui, path)
         inst._fetchcaps()
 
         return inst



To: indygreg, #hg-reviewers, lothiraldan
Cc: lothiraldan, mercurial-devel


More information about the Mercurial-devel mailing list