equal
deleted
inserted
replaced
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 # we use a lock here because because we're not nicely ordered |
607 # we use a lock here because because we're not nicely ordered |
608 l = lock.lock(os.path.join(source, ".hg", "lock")) |
608 l = lock.lock(os.path.join(source, ".hg", "lock")) |
609 |
609 |
610 util.copytree(os.path.join(source, ".hg"), os.path.join(dest, ".hg"), |
610 util.copyfiles(os.path.join(source, ".hg"), os.path.join(dest, ".hg"), |
611 copyfile) |
611 copyfile) |
612 |
612 |
613 for fn in "dirstate", "lock", "hgrc", "localtags": |
613 for fn in "dirstate", "lock", "hgrc", "localtags": |
614 try: |
614 try: |
615 os.unlink(os.path.join(dest, ".hg", fn)) |
615 os.unlink(os.path.join(dest, ".hg", fn)) |