482 orig, repo, actions, wctx, mctx, overwrite, wantfiledata, **opts |
483 orig, repo, actions, wctx, mctx, overwrite, wantfiledata, **opts |
483 ): |
484 ): |
484 if isenabled(repo): |
485 if isenabled(repo): |
485 manifest = mctx.manifest() |
486 manifest = mctx.manifest() |
486 files = [] |
487 files = [] |
487 for f, args, msg in actions[b'g']: |
488 for f, args, msg in actions[mergestatemod.ACTION_GET]: |
488 files.append((f, hex(manifest[f]))) |
489 files.append((f, hex(manifest[f]))) |
489 # batch fetch the needed files from the server |
490 # batch fetch the needed files from the server |
490 repo.fileservice.prefetch(files) |
491 repo.fileservice.prefetch(files) |
491 return orig(repo, actions, wctx, mctx, overwrite, wantfiledata, **opts) |
492 return orig(repo, actions, wctx, mctx, overwrite, wantfiledata, **opts) |
492 |
493 |
497 files = [] |
498 files = [] |
498 sparsematch = repo.maybesparsematch(mctx.rev()) |
499 sparsematch = repo.maybesparsematch(mctx.rev()) |
499 for f, (m, actionargs, msg) in pycompat.iteritems(mresult.actions): |
500 for f, (m, actionargs, msg) in pycompat.iteritems(mresult.actions): |
500 if sparsematch and not sparsematch(f): |
501 if sparsematch and not sparsematch(f): |
501 continue |
502 continue |
502 if m in (b'c', b'dc', b'cm'): |
503 if m in ( |
|
504 mergestatemod.ACTION_CREATED, |
|
505 mergestatemod.ACTION_DELETED_CHANGED, |
|
506 mergestatemod.ACTION_CREATED_MERGE, |
|
507 ): |
503 files.append((f, hex(mctx.filenode(f)))) |
508 files.append((f, hex(mctx.filenode(f)))) |
504 elif m == b'dg': |
509 elif m == mergestatemod.ACTION_LOCAL_DIR_RENAME_GET: |
505 f2 = actionargs[0] |
510 f2 = actionargs[0] |
506 files.append((f2, hex(mctx.filenode(f2)))) |
511 files.append((f2, hex(mctx.filenode(f2)))) |
507 # batch fetch the needed files from the server |
512 # batch fetch the needed files from the server |
508 repo.fileservice.prefetch(files) |
513 repo.fileservice.prefetch(files) |
509 return orig(repo, wctx, mctx, force, mresult, *args, **kwargs) |
514 return orig(repo, wctx, mctx, force, mresult, *args, **kwargs) |