##// END OF EJS Templates
Clean up local clone file list...
mpm@selenic.com -
r1208:4644df49 default
parent child Browse files
Show More
@@ -604,17 +604,17 b' def clone(ui, source, dest=None, **opts)'
604 and getattr(os, 'link', None) or shutil.copy2)
604 and getattr(os, 'link', None) or shutil.copy2)
605 if copyfile is not shutil.copy2:
605 if copyfile is not shutil.copy2:
606 ui.note("cloning by hardlink\n")
606 ui.note("cloning by hardlink\n")
607
607 # we use a lock here because because we're not nicely ordered
608 # we use a lock here because because we're not nicely ordered
608 l = lock.lock(os.path.join(source, ".hg", "lock"))
609 l = lock.lock(os.path.join(source, ".hg", "lock"))
609
610
610 util.copyfiles(os.path.join(source, ".hg"), os.path.join(dest, ".hg"),
611 os.mkdir(os.path.join(dest, ".hg"))
611 copyfile)
612
612
613 for fn in "dirstate", "lock", "hgrc", "localtags":
613 files = "data 00manifest.d 00manifest.i 00changelog.d 00changelog.i"
614 try:
614 for f in files.split():
615 os.unlink(os.path.join(dest, ".hg", fn))
615 src = os.path.join(source, ".hg", f)
616 except OSError:
616 dst = os.path.join(dest, ".hg", f)
617 pass
617 util.copyfiles(src, dst, copyfile)
618
618
619 repo = hg.repository(ui, dest)
619 repo = hg.repository(ui, dest)
620
620
General Comments 0
You need to be logged in to leave comments. Login now