comparison mercurial/hg.py @ 5180:0d5d03844927

merge with -stable
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Fri, 17 Aug 2007 00:43:49 +0200
parents 126f527b3ba3 156f4c8a12aa
children c1dbc9ae8f2b
comparison
equal deleted inserted replaced
5178:fe4d9f7161ac 5180:0d5d03844927
203 elif src_repo.local(): 203 elif src_repo.local():
204 src_repo.push(dest_repo, revs=revs) 204 src_repo.push(dest_repo, revs=revs)
205 else: 205 else:
206 raise util.Abort(_("clone from remote to remote not supported")) 206 raise util.Abort(_("clone from remote to remote not supported"))
207 207
208 if dir_cleanup:
209 dir_cleanup.close()
210
208 if dest_repo.local(): 211 if dest_repo.local():
209 fp = dest_repo.opener("hgrc", "w", text=True) 212 fp = dest_repo.opener("hgrc", "w", text=True)
210 fp.write("[paths]\n") 213 fp.write("[paths]\n")
211 fp.write("default = %s\n" % abspath) 214 fp.write("default = %s\n" % abspath)
212 fp.close() 215 fp.close()
215 try: 218 try:
216 checkout = dest_repo.lookup("default") 219 checkout = dest_repo.lookup("default")
217 except: 220 except:
218 checkout = dest_repo.changelog.tip() 221 checkout = dest_repo.changelog.tip()
219 _update(dest_repo, checkout) 222 _update(dest_repo, checkout)
220 if dir_cleanup:
221 dir_cleanup.close()
222 223
223 return src_repo, dest_repo 224 return src_repo, dest_repo
224 finally: 225 finally:
225 del src_lock, dest_lock, dir_cleanup 226 del src_lock, dest_lock, dir_cleanup
226 227