close .hg/hgrc after writing the default values on clone
authorTK Soh <teekaysoh@yahoo.com>
Tue, 15 Nov 2005 20:35:10 +0100
changeset 1547 4dea10839201
parent 1546 487e256ad545
child 1548 18f3224da392
child 1550 ccb9b62de892
close .hg/hgrc after writing the default values on clone this fix a bug where Dircleanup did not work because the file was still open
mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -746,6 +746,7 @@ def clone(ui, source, dest=None, **opts)
     f = repo.opener("hgrc", "w", text=True)
     f.write("[paths]\n")
     f.write("default = %s\n" % abspath)
+    f.close()
 
     if not opts['noupdate']:
         update(ui, repo)