# HG changeset patch # User Martin Geisler # Date 1320399098 -3600 # Node ID 54c0517c0fe8af4f8851a1bbb5bb229f0e7dd853 # Parent e48f0913f018e8d24d7e75240ef7e0e36fb3d343# Parent db8b0ee74025f77c02b3cc9f183aca720f41a400 merge with main diff -r e48f0913f018 -r 54c0517c0fe8 hgext/largefiles/lfutil.py --- a/hgext/largefiles/lfutil.py Thu Nov 03 23:12:31 2011 -0400 +++ b/hgext/largefiles/lfutil.py Fri Nov 04 10:31:38 2011 +0100 @@ -110,7 +110,9 @@ repo.ui.note(_('Found %s in store\n') % hash) elif inusercache(repo.ui, hash): repo.ui.note(_('Found %s in system cache\n') % hash) - link(usercachepath(repo.ui, hash), storepath(repo, hash)) + path = storepath(repo, hash) + util.makedirs(os.path.dirname(path)) + link(usercachepath(repo.ui, hash), path) else: return None return storepath(repo, hash) diff -r e48f0913f018 -r 54c0517c0fe8 mercurial/ignore.py --- a/mercurial/ignore.py Thu Nov 03 23:12:31 2011 -0400 +++ b/mercurial/ignore.py Fri Nov 04 10:31:38 2011 +0100 @@ -78,6 +78,7 @@ pats[f] = [] fp = open(f) pats[f], warnings = ignorepats(fp) + fp.close() for warning in warnings: warn("%s: %s\n" % (f, warning)) except IOError, inst: diff -r e48f0913f018 -r 54c0517c0fe8 mercurial/revlog.py --- a/mercurial/revlog.py Thu Nov 03 23:12:31 2011 -0400 +++ b/mercurial/revlog.py Fri Nov 04 10:31:38 2011 +0100 @@ -800,6 +800,7 @@ readahead = max(65536, length) df.seek(offset) d = df.read(readahead) + df.close() self._addchunk(offset, d) if readahead > length: return d[:length] diff -r e48f0913f018 -r 54c0517c0fe8 mercurial/ui.py --- a/mercurial/ui.py Thu Nov 03 23:12:31 2011 -0400 +++ b/mercurial/ui.py Fri Nov 04 10:31:38 2011 +0100 @@ -79,6 +79,7 @@ try: cfg.read(filename, fp, sections=sections, remap=remap) + fp.close() except error.ConfigError, inst: if trusted: raise