Show More
@@ -342,10 +342,9 b' def manifestmerge(repo, wctx, p2, pa, br' | |||
|
342 | 342 | def actionkey(a): |
|
343 | 343 | return a[1] == "r" and -1 or 0, a |
|
344 | 344 | |
|
345 |
def getremove(repo |
|
|
345 | def getremove(repo, mctx, overwrite, args): | |
|
346 | 346 | """apply usually-non-interactive updates to the working directory |
|
347 | 347 | |
|
348 | wctx is the working copy context | |
|
349 | 348 | mctx is the context to be merged into the working copy |
|
350 | 349 | |
|
351 | 350 | yields tuples for progress updates |
@@ -355,8 +354,6 b' def getremove(repo, wctx, mctx, overwrit' | |||
|
355 | 354 | f = arg[0] |
|
356 | 355 | if arg[1] == 'r': |
|
357 | 356 | repo.ui.note(_("removing %s\n") % f) |
|
358 | if f == '.hgsubstate': # subrepo states need updating | |
|
359 | subrepo.submerge(repo, wctx, mctx, wctx, overwrite) | |
|
360 | 357 | audit(f) |
|
361 | 358 | try: |
|
362 | 359 | util.unlinkpath(repo.wjoin(f), ignoremissing=True) |
@@ -366,8 +363,6 b' def getremove(repo, wctx, mctx, overwrit' | |||
|
366 | 363 | else: |
|
367 | 364 | repo.ui.note(_("getting %s\n") % f) |
|
368 | 365 | repo.wwrite(f, mctx.filectx(f).data(), arg[2][0]) |
|
369 | if f == '.hgsubstate': # subrepo states need updating | |
|
370 | subrepo.submerge(repo, wctx, mctx, wctx, overwrite) | |
|
371 | 366 | yield i, f |
|
372 | 367 | |
|
373 | 368 | def applyupdates(repo, actions, wctx, mctx, actx, overwrite): |
@@ -426,10 +421,17 b' def applyupdates(repo, actions, wctx, mc' | |||
|
426 | 421 | removed = len([a for a in workeractions if a[1] == 'r']) |
|
427 | 422 | actions = [a for a in actions if a[1] not in 'gr'] |
|
428 | 423 | |
|
429 | for i, item in getremove(repo, wctx, mctx, overwrite, workeractions): | |
|
424 | hgsub = [a[1] for a in workeractions if a[0] == '.hgsubstate'] | |
|
425 | if hgsub and hgsub[0] == 'r': | |
|
426 | subrepo.submerge(repo, wctx, mctx, wctx, overwrite) | |
|
427 | ||
|
428 | for i, item in getremove(repo, mctx, overwrite, workeractions): | |
|
430 | 429 | repo.ui.progress(_('updating'), i + 1, item=item, total=numupdates, |
|
431 | 430 | unit=_('files')) |
|
432 | 431 | |
|
432 | if hgsub and hgsub[0] == 'g': | |
|
433 | subrepo.submerge(repo, wctx, mctx, wctx, overwrite) | |
|
434 | ||
|
433 | 435 | z = len(workeractions) |
|
434 | 436 | |
|
435 | 437 | for i, a in enumerate(actions): |
General Comments 0
You need to be logged in to leave comments.
Login now