diff -r fe4d9f7161ac -r 0d5d03844927 mercurial/hg.py --- a/mercurial/hg.py Thu Aug 16 08:23:14 2007 +0200 +++ b/mercurial/hg.py Fri Aug 17 00:43:49 2007 +0200 @@ -205,6 +205,9 @@ else: raise util.Abort(_("clone from remote to remote not supported")) + if dir_cleanup: + dir_cleanup.close() + if dest_repo.local(): fp = dest_repo.opener("hgrc", "w", text=True) fp.write("[paths]\n") @@ -217,8 +220,6 @@ except: checkout = dest_repo.changelog.tip() _update(dest_repo, checkout) - if dir_cleanup: - dir_cleanup.close() return src_repo, dest_repo finally: