Show More
@@ -605,10 +605,14 b' def clone(ui, source, dest=None, **opts)' | |||||
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 | |||
608 |
# we use a lock here because |
|
608 | # we use a lock here because if we race with commit, we can | |
609 | l = lock.lock(os.path.join(source, ".hg", "lock")) |
|
609 | # end up with extra data in the cloned revlogs that's not | |
|
610 | # pointed to by changesets, thus causing verify to fail | |||
|
611 | l1 = lock.lock(os.path.join(source, ".hg", "lock")) | |||
610 |
|
612 | |||
|
613 | # and here to avoid premature writing to the target | |||
611 | os.mkdir(os.path.join(dest, ".hg")) |
|
614 | os.mkdir(os.path.join(dest, ".hg")) | |
|
615 | l2 = lock.lock(os.path.join(dest, ".hg", "lock")) | |||
612 |
|
616 | |||
613 | files = "data 00manifest.d 00manifest.i 00changelog.d 00changelog.i" |
|
617 | files = "data 00manifest.d 00manifest.i 00changelog.d 00changelog.i" | |
614 | for f in files.split(): |
|
618 | for f in files.split(): |
General Comments 0
You need to be logged in to leave comments.
Login now