mercurial/commands.py
changeset 1207 a7b8812973d9
parent 1206 6512d352d6c1
child 1208 4644df4944ff
equal deleted inserted replaced
1206:6512d352d6c1 1207:a7b8812973d9
   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))