comparison mercurial/hg.py @ 5187:c1dbc9ae8f2b

Merge with crew
author Matt Mackall <mpm@selenic.com>
date Fri, 17 Aug 2007 00:35:16 -0500
parents 92236732d5a1 0d5d03844927
children 60acf1432ee0
comparison
equal deleted inserted replaced
5186:2da57dc04aa8 5187:c1dbc9ae8f2b
212 elif src_repo.local(): 212 elif src_repo.local():
213 src_repo.push(dest_repo, revs=revs) 213 src_repo.push(dest_repo, revs=revs)
214 else: 214 else:
215 raise util.Abort(_("clone from remote to remote not supported")) 215 raise util.Abort(_("clone from remote to remote not supported"))
216 216
217 if dir_cleanup:
218 dir_cleanup.close()
219
217 if dest_repo.local(): 220 if dest_repo.local():
218 fp = dest_repo.opener("hgrc", "w", text=True) 221 fp = dest_repo.opener("hgrc", "w", text=True)
219 fp.write("[paths]\n") 222 fp.write("[paths]\n")
220 fp.write("default = %s\n" % abspath) 223 fp.write("default = %s\n" % abspath)
221 fp.close() 224 fp.close()
224 try: 227 try:
225 checkout = dest_repo.lookup("default") 228 checkout = dest_repo.lookup("default")
226 except: 229 except:
227 checkout = dest_repo.changelog.tip() 230 checkout = dest_repo.changelog.tip()
228 _update(dest_repo, checkout) 231 _update(dest_repo, checkout)
229 if dir_cleanup:
230 dir_cleanup.close()
231 232
232 return src_repo, dest_repo 233 return src_repo, dest_repo
233 finally: 234 finally:
234 del src_lock, dest_lock, dir_cleanup 235 del src_lock, dest_lock, dir_cleanup
235 236