diff -r 5e5b06087ec5 -r 393e44324037 mercurial/url.py --- 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.