361 repo.ui.warn(_("update failed to remove %s: %s!\n") % |
362 repo.ui.warn(_("update failed to remove %s: %s!\n") % |
362 (f, inst.strerror)) |
363 (f, inst.strerror)) |
363 else: |
364 else: |
364 repo.ui.note(_("getting %s\n") % f) |
365 repo.ui.note(_("getting %s\n") % f) |
365 repo.wwrite(f, mctx.filectx(f).data(), arg[2][0]) |
366 repo.wwrite(f, mctx.filectx(f).data(), arg[2][0]) |
|
367 if i == 100: |
|
368 yield i, f |
|
369 i = 0 |
|
370 i += 1 |
|
371 if i > 0: |
366 yield i, f |
372 yield i, f |
367 |
373 |
368 def applyupdates(repo, actions, wctx, mctx, actx, overwrite): |
374 def applyupdates(repo, actions, wctx, mctx, actx, overwrite): |
369 """apply the merge action list to the working directory |
375 """apply the merge action list to the working directory |
370 |
376 |
423 |
429 |
424 hgsub = [a[1] for a in workeractions if a[0] == '.hgsubstate'] |
430 hgsub = [a[1] for a in workeractions if a[0] == '.hgsubstate'] |
425 if hgsub and hgsub[0] == 'r': |
431 if hgsub and hgsub[0] == 'r': |
426 subrepo.submerge(repo, wctx, mctx, wctx, overwrite) |
432 subrepo.submerge(repo, wctx, mctx, wctx, overwrite) |
427 |
433 |
|
434 z = 0 |
428 for i, item in getremove(repo, mctx, overwrite, workeractions): |
435 for i, item in getremove(repo, mctx, overwrite, workeractions): |
429 repo.ui.progress(_('updating'), i + 1, item=item, total=numupdates, |
436 z += i |
|
437 repo.ui.progress(_('updating'), z, item=item, total=numupdates, |
430 unit=_('files')) |
438 unit=_('files')) |
431 |
439 |
432 if hgsub and hgsub[0] == 'g': |
440 if hgsub and hgsub[0] == 'g': |
433 subrepo.submerge(repo, wctx, mctx, wctx, overwrite) |
441 subrepo.submerge(repo, wctx, mctx, wctx, overwrite) |
434 |
|
435 z = len(workeractions) |
|
436 |
442 |
437 for i, a in enumerate(actions): |
443 for i, a in enumerate(actions): |
438 f, m, args, msg = a |
444 f, m, args, msg = a |
439 repo.ui.progress(_('updating'), z + i + 1, item=f, total=numupdates, |
445 repo.ui.progress(_('updating'), z + i + 1, item=f, total=numupdates, |
440 unit=_('files')) |
446 unit=_('files')) |