mercurial/httppeer.py
branchstable
changeset 40426 588f1e9a4d16
parent 40171 dac438b7346e
child 41315 a9b609fbe39c
equal deleted inserted replaced
40422:7e4ffe2719e4 40426:588f1e9a4d16
   403 
   403 
   404     def canpush(self):
   404     def canpush(self):
   405         return True
   405         return True
   406 
   406 
   407     def close(self):
   407     def close(self):
       
   408         try:
       
   409             reqs, sent, recv = (self._urlopener.requestscount,
       
   410                                 self._urlopener.sentbytescount,
       
   411                                 self._urlopener.receivedbytescount)
       
   412         except AttributeError:
       
   413             return
   408         self.ui.note(_('(sent %d HTTP requests and %d bytes; '
   414         self.ui.note(_('(sent %d HTTP requests and %d bytes; '
   409                        'received %d bytes in responses)\n') %
   415                        'received %d bytes in responses)\n') %
   410                      (self._urlopener.requestscount,
   416                      (reqs, sent, recv))
   411                       self._urlopener.sentbytescount,
       
   412                       self._urlopener.receivedbytescount))
       
   413 
   417 
   414     # End of ipeerconnection interface.
   418     # End of ipeerconnection interface.
   415 
   419 
   416     # Begin of ipeercommands interface.
   420     # Begin of ipeercommands interface.
   417 
   421