diff -r 9294c0158c42 -r 998fc8f62539 mercurial/httprepo.py --- a/mercurial/httprepo.py Tue Feb 10 13:57:34 2009 +0800 +++ b/mercurial/httprepo.py Wed Jan 28 20:06:59 2009 -0600 @@ -38,6 +38,12 @@ self.urlopener = url.opener(ui, authinfo) + def __del__(self): + for h in self.urlopener.handlers: + h.close() + if hasattr(h, "close_all"): + h.close_all() + def url(self): return self.path