Show More
@@ -243,6 +243,12 b' def copystore(ui, srcrepo, destpath):' | |||||
243 | try: |
|
243 | try: | |
244 | hardlink = None |
|
244 | hardlink = None | |
245 | num = 0 |
|
245 | num = 0 | |
|
246 | closetopic = [None] | |||
|
247 | def prog(topic, pos): | |||
|
248 | if pos is None: | |||
|
249 | closetopic[0] = topic | |||
|
250 | else: | |||
|
251 | ui.progress(topic, pos + num) | |||
246 | srcpublishing = srcrepo.ui.configbool('phases', 'publish', True) |
|
252 | srcpublishing = srcrepo.ui.configbool('phases', 'publish', True) | |
247 | srcvfs = scmutil.vfs(srcrepo.sharedpath) |
|
253 | srcvfs = scmutil.vfs(srcrepo.sharedpath) | |
248 | dstvfs = scmutil.vfs(destpath) |
|
254 | dstvfs = scmutil.vfs(destpath) | |
@@ -259,12 +265,16 b' def copystore(ui, srcrepo, destpath):' | |||||
259 | # lock to avoid premature writing to the target |
|
265 | # lock to avoid premature writing to the target | |
260 | destlock = lock.lock(dstvfs, lockfile) |
|
266 | destlock = lock.lock(dstvfs, lockfile) | |
261 | hardlink, n = util.copyfiles(srcvfs.join(f), dstvfs.join(f), |
|
267 | hardlink, n = util.copyfiles(srcvfs.join(f), dstvfs.join(f), | |
262 | hardlink) |
|
268 | hardlink, progress=prog) | |
263 | num += n |
|
269 | num += n | |
264 | if hardlink: |
|
270 | if hardlink: | |
265 | ui.debug("linked %d files\n" % num) |
|
271 | ui.debug("linked %d files\n" % num) | |
|
272 | if closetopic[0]: | |||
|
273 | ui.progress(closetopic[0], None) | |||
266 | else: |
|
274 | else: | |
267 | ui.debug("copied %d files\n" % num) |
|
275 | ui.debug("copied %d files\n" % num) | |
|
276 | if closetopic[0]: | |||
|
277 | ui.progress(closetopic[0], None) | |||
268 | return destlock |
|
278 | return destlock | |
269 | except: # re-raises |
|
279 | except: # re-raises | |
270 | release(destlock) |
|
280 | release(destlock) |
@@ -65,6 +65,14 b' No update, with debug option:' | |||||
65 |
|
65 | |||
66 | #if hardlink |
|
66 | #if hardlink | |
67 | $ hg --debug clone -U . ../c |
|
67 | $ hg --debug clone -U . ../c | |
|
68 | linking: 1 | |||
|
69 | linking: 2 | |||
|
70 | linking: 3 | |||
|
71 | linking: 4 | |||
|
72 | linking: 5 | |||
|
73 | linking: 6 | |||
|
74 | linking: 7 | |||
|
75 | linking: 8 | |||
68 | linked 8 files |
|
76 | linked 8 files | |
69 | #else |
|
77 | #else | |
70 | $ hg --debug clone -U . ../c |
|
78 | $ hg --debug clone -U . ../c |
@@ -58,6 +58,13 b' Prepare repo r1:' | |||||
58 | Create hardlinked clone r2: |
|
58 | Create hardlinked clone r2: | |
59 |
|
59 | |||
60 | $ hg clone -U --debug r1 r2 |
|
60 | $ hg clone -U --debug r1 r2 | |
|
61 | linking: 1 | |||
|
62 | linking: 2 | |||
|
63 | linking: 3 | |||
|
64 | linking: 4 | |||
|
65 | linking: 5 | |||
|
66 | linking: 6 | |||
|
67 | linking: 7 | |||
61 | linked 7 files |
|
68 | linked 7 files | |
62 |
|
69 | |||
63 | Create non-hardlinked clone r3: |
|
70 | Create non-hardlinked clone r3: |
@@ -342,6 +342,16 b' Test archiving a revision that reference' | |||||
342 | cloned: |
|
342 | cloned: | |
343 |
|
343 | |||
344 | $ hg clone -U . ../empty |
|
344 | $ hg clone -U . ../empty | |
|
345 | \r (no-eol) (esc) | |||
|
346 | linking [ <=> ] 1\r (no-eol) (esc) | |||
|
347 | linking [ <=> ] 2\r (no-eol) (esc) | |||
|
348 | linking [ <=> ] 3\r (no-eol) (esc) | |||
|
349 | linking [ <=> ] 4\r (no-eol) (esc) | |||
|
350 | linking [ <=> ] 5\r (no-eol) (esc) | |||
|
351 | linking [ <=> ] 6\r (no-eol) (esc) | |||
|
352 | linking [ <=> ] 7\r (no-eol) (esc) | |||
|
353 | linking [ <=> ] 8\r (no-eol) (esc) | |||
|
354 | \r (no-eol) (esc) | |||
345 | $ cd ../empty |
|
355 | $ cd ../empty | |
346 | $ hg archive --subrepos -r tip ../archive.tar.gz |
|
356 | $ hg archive --subrepos -r tip ../archive.tar.gz | |
347 | \r (no-eol) (esc) |
|
357 | \r (no-eol) (esc) | |
@@ -355,6 +365,16 b' cloned:' | |||||
355 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
365 | archiving [==========================================>] 3/3\r (no-eol) (esc) | |
356 | \r (no-eol) (esc) |
|
366 | \r (no-eol) (esc) | |
357 | \r (no-eol) (esc) |
|
367 | \r (no-eol) (esc) | |
|
368 | linking [ <=> ] 1\r (no-eol) (esc) | |||
|
369 | linking [ <=> ] 2\r (no-eol) (esc) | |||
|
370 | linking [ <=> ] 3\r (no-eol) (esc) | |||
|
371 | linking [ <=> ] 4\r (no-eol) (esc) | |||
|
372 | linking [ <=> ] 5\r (no-eol) (esc) | |||
|
373 | linking [ <=> ] 6\r (no-eol) (esc) | |||
|
374 | linking [ <=> ] 7\r (no-eol) (esc) | |||
|
375 | linking [ <=> ] 8\r (no-eol) (esc) | |||
|
376 | \r (no-eol) (esc) | |||
|
377 | \r (no-eol) (esc) | |||
358 | archiving (foo) [ ] 0/3\r (no-eol) (esc) |
|
378 | archiving (foo) [ ] 0/3\r (no-eol) (esc) | |
359 | archiving (foo) [ ] 0/3\r (no-eol) (esc) |
|
379 | archiving (foo) [ ] 0/3\r (no-eol) (esc) | |
360 | archiving (foo) [===========> ] 1/3\r (no-eol) (esc) |
|
380 | archiving (foo) [===========> ] 1/3\r (no-eol) (esc) | |
@@ -365,6 +385,14 b' cloned:' | |||||
365 | archiving (foo) [====================================>] 3/3\r (no-eol) (esc) |
|
385 | archiving (foo) [====================================>] 3/3\r (no-eol) (esc) | |
366 | \r (no-eol) (esc) |
|
386 | \r (no-eol) (esc) | |
367 | \r (no-eol) (esc) |
|
387 | \r (no-eol) (esc) | |
|
388 | linking [ <=> ] 1\r (no-eol) (esc) | |||
|
389 | linking [ <=> ] 2\r (no-eol) (esc) | |||
|
390 | linking [ <=> ] 3\r (no-eol) (esc) | |||
|
391 | linking [ <=> ] 4\r (no-eol) (esc) | |||
|
392 | linking [ <=> ] 5\r (no-eol) (esc) | |||
|
393 | linking [ <=> ] 6\r (no-eol) (esc) | |||
|
394 | \r (no-eol) (esc) | |||
|
395 | \r (no-eol) (esc) | |||
368 | archiving (foo/bar) [ ] 0/1\r (no-eol) (glob) (esc) |
|
396 | archiving (foo/bar) [ ] 0/1\r (no-eol) (glob) (esc) | |
369 | archiving (foo/bar) [ ] 0/1\r (no-eol) (glob) (esc) |
|
397 | archiving (foo/bar) [ ] 0/1\r (no-eol) (glob) (esc) | |
370 | archiving (foo/bar) [================================>] 1/1\r (no-eol) (glob) (esc) |
|
398 | archiving (foo/bar) [================================>] 1/1\r (no-eol) (glob) (esc) |
General Comments 0
You need to be logged in to leave comments.
Login now