changeset 27705 | 2380889f8f52 |
parent 26587 | 56b2bcea2529 |
child 28883 | 032c4c2f802a |
--- a/mercurial/statichttprepo.py Sat Jan 02 16:41:57 2016 -0800 +++ b/mercurial/statichttprepo.py Sat Jan 02 15:33:01 2016 -0800 @@ -35,6 +35,13 @@ self.pos = 0 self.opener = opener self.name = url + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + def seek(self, pos): self.pos = pos def read(self, bytes=None):