mercurial/hg.py
changeset 5179 156f4c8a12aa
parent 4635 63b9d2deed48
child 5180 0d5d03844927
child 5236 cbe6e263357b
child 5275 d3874a286b51
equal deleted inserted replaced
5177:ee6a6592c997 5179:156f4c8a12aa
   210             raise util.Abort(_("clone from remote to remote not supported"))
   210             raise util.Abort(_("clone from remote to remote not supported"))
   211 
   211 
   212     if src_lock:
   212     if src_lock:
   213         src_lock.release()
   213         src_lock.release()
   214 
   214 
       
   215     if dir_cleanup:
       
   216         dir_cleanup.close()
       
   217 
   215     if dest_repo.local():
   218     if dest_repo.local():
   216         fp = dest_repo.opener("hgrc", "w", text=True)
   219         fp = dest_repo.opener("hgrc", "w", text=True)
   217         fp.write("[paths]\n")
   220         fp.write("[paths]\n")
   218         fp.write("default = %s\n" % abspath)
   221         fp.write("default = %s\n" % abspath)
   219         fp.close()
   222         fp.close()
   225             try:
   228             try:
   226                 checkout = dest_repo.lookup("default")
   229                 checkout = dest_repo.lookup("default")
   227             except:
   230             except:
   228                 checkout = dest_repo.changelog.tip()
   231                 checkout = dest_repo.changelog.tip()
   229             _update(dest_repo, checkout)
   232             _update(dest_repo, checkout)
   230     if dir_cleanup:
       
   231         dir_cleanup.close()
       
   232 
   233 
   233     return src_repo, dest_repo
   234     return src_repo, dest_repo
   234 
   235 
   235 def _showstats(repo, stats):
   236 def _showstats(repo, stats):
   236     stats = ((stats[0], _("updated")),
   237     stats = ((stats[0], _("updated")),