mercurial/httpconnection.py
changeset 30142 3dcaf1c4e90d
parent 29250 d6b9468eebee
child 31308 90e69badb125
equal deleted inserted replaced
30141:c01acee367ec 30142:3dcaf1c4e90d
    55         # once whether authentication will be required, just lie to
    55         # once whether authentication will be required, just lie to
    56         # the user and maybe the push succeeds suddenly at 50%.
    56         # the user and maybe the push succeeds suddenly at 50%.
    57         self.ui.progress(_('sending'), self._pos // 1024,
    57         self.ui.progress(_('sending'), self._pos // 1024,
    58                          unit=_('kb'), total=self._total)
    58                          unit=_('kb'), total=self._total)
    59         return ret
    59         return ret
       
    60 
       
    61     def __enter__(self):
       
    62         return self
       
    63 
       
    64     def __exit__(self, exc_type, exc_val, exc_tb):
       
    65         self.close()
    60 
    66 
    61 # moved here from url.py to avoid a cycle
    67 # moved here from url.py to avoid a cycle
    62 def readauthforuri(ui, uri, user):
    68 def readauthforuri(ui, uri, user):
    63     # Read configuration
    69     # Read configuration
    64     config = dict()
    70     config = dict()