Mercurial > public > mercurial-scm > hg
diff mercurial/localrepo.py @ 13400:14f3795a5ed7
explicitly close files
Add missing calls to close() to many places where files are
opened. Relying on reference counting to catch them soon-ish is not
portable and fails in environments with a proper GC, such as PyPy.
author | Dan Villiom Podlaski Christiansen <danchr@gmail.com> |
---|---|
date | Fri, 24 Dec 2010 15:23:01 +0100 |
parents | d00bbff8600e |
children | d4de90a612f7 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Fri Feb 11 22:24:10 2011 +0800 +++ b/mercurial/localrepo.py Fri Dec 24 15:23:01 2010 +0100 @@ -283,6 +283,8 @@ # committed tags are stored in UTF-8 writetags(fp, names, encoding.fromlocal, prevtags) + fp.close() + if '.hgtags' not in self.dirstate: self[None].add(['.hgtags'])