equal
deleted
inserted
replaced
176 % dest) |
176 % dest) |
177 raise |
177 raise |
178 |
178 |
179 for f in src_repo.store.copylist(): |
179 for f in src_repo.store.copylist(): |
180 src = os.path.join(src_repo.path, f) |
180 src = os.path.join(src_repo.path, f) |
|
181 dst = os.path.join(dest_path, f) |
|
182 dstbase = os.path.dirname(dst) |
|
183 if dstbase and not os.path.exists(dstbase): |
|
184 os.mkdir(dstbase) |
181 if os.path.exists(src): |
185 if os.path.exists(src): |
182 dst = os.path.join(dest_path, f) |
|
183 dstbase = os.path.dirname(dst) |
|
184 if not os.path.exists(dstbase): |
|
185 os.mkdir(dstbase) |
|
186 if dst.endswith('data'): |
186 if dst.endswith('data'): |
187 # lock to avoid premature writing to the target |
187 # lock to avoid premature writing to the target |
188 dest_lock = lock.lock(os.path.join(dstbase, "lock")) |
188 dest_lock = lock.lock(os.path.join(dstbase, "lock")) |
189 util.copyfiles(src, dst) |
189 util.copyfiles(src, dst) |
190 |
190 |