Patchwork D2723: httppeer: consolidate _requestbuilder assignments and document

login
register
mail settings
Submitter phabricator
Date March 15, 2018, 6:35 p.m.
Message ID <19cfa25e5b44295e5b402eb0cd36bd78@localhost.localdomain>
Download mbox | patch
Permalink /patch/29550/
State Not Applicable
Headers show

Comments

phabricator - March 15, 2018, 6:35 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG2d5d3033ff4e: httppeer: consolidate _requestbuilder assignments and document (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2723?vs=7070&id=7072

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

AFFECTED FILES
  mercurial/httppeer.py

CHANGE DETAILS




To: indygreg, #hg-reviewers, pulkit
Cc: martinvonz, pulkit, mercurial-devel

Patch

diff --git a/mercurial/httppeer.py b/mercurial/httppeer.py
--- a/mercurial/httppeer.py
+++ b/mercurial/httppeer.py
@@ -138,7 +138,9 @@ 
         self._path = path
         self._caps = None
         self._urlopener = None
-        self._requestbuilder = None
+        # This is an its own attribute to facilitate extensions overriding
+        # the default type.
+        self._requestbuilder = urlreq.request
         u = util.url(path)
         if u.query or u.fragment:
             raise error.Abort(_('unsupported URL component: "%s"') %
@@ -151,7 +153,6 @@ 
         ui.debug('using %s\n' % self._url)
 
         self._urlopener = urlmod.opener(ui, authinfo)
-        self._requestbuilder = urlreq.request
 
     def __del__(self):
         urlopener = getattr(self, '_urlopener', None)