mercurial/url.py
changeset 40034 393e44324037
parent 40031 f2dffa1359c6
child 40043 6509fcec830c
--- a/mercurial/url.py	Mon Oct 01 12:30:32 2018 -0700
+++ b/mercurial/url.py	Mon Oct 01 13:17:38 2018 -0700
@@ -555,6 +555,11 @@
     handlers.append(cookiehandler(ui))
     opener = urlreq.buildopener(*handlers)
 
+    # keepalive.py's handlers will populate these attributes if they exist.
+    opener.requestscount = 0
+    opener.sentbytescount = 0
+    opener.receivedbytescount = 0
+
     # The user agent should should *NOT* be used by servers for e.g.
     # protocol detection or feature negotiation: there are other
     # facilities for that.