mercurial/merge.py
changeset 37762 7269b87f817c
parent 37172 daef13da66fe
child 37959 000039f6ca2d
child 38425 1322ae04d3d7
equal deleted inserted replaced
37761:ff6b0a20849d 37762:7269b87f817c
  1463             i += 1
  1463             i += 1
  1464     if i > 0:
  1464     if i > 0:
  1465         yield i, f
  1465         yield i, f
  1466 
  1466 
  1467 def _prefetchfiles(repo, ctx, actions):
  1467 def _prefetchfiles(repo, ctx, actions):
  1468     """Invoke ``scmutil.fileprefetchhooks()`` for the files relevant to the dict
  1468     """Invoke ``scmutil.prefetchfiles()`` for the files relevant to the dict
  1469     of merge actions.  ``ctx`` is the context being merged in."""
  1469     of merge actions.  ``ctx`` is the context being merged in."""
  1470 
  1470 
  1471     # Skipping 'a', 'am', 'f', 'r', 'dm', 'e', 'k', 'p' and 'pr', because they
  1471     # Skipping 'a', 'am', 'f', 'r', 'dm', 'e', 'k', 'p' and 'pr', because they
  1472     # don't touch the context to be merged in.  'cd' is skipped, because
  1472     # don't touch the context to be merged in.  'cd' is skipped, because
  1473     # changed/deleted never resolves to something from the remote side.
  1473     # changed/deleted never resolves to something from the remote side.
  1474     oplist = [actions[a] for a in (ACTION_GET, ACTION_DELETED_CHANGED,
  1474     oplist = [actions[a] for a in (ACTION_GET, ACTION_DELETED_CHANGED,
  1475                                    ACTION_LOCAL_DIR_RENAME_GET, ACTION_MERGE)]
  1475                                    ACTION_LOCAL_DIR_RENAME_GET, ACTION_MERGE)]
  1476     prefetch = scmutil.fileprefetchhooks
  1476     prefetch = scmutil.prefetchfiles
  1477     prefetch(repo, ctx, [f for sublist in oplist for f, args, msg in sublist])
  1477     matchfiles = scmutil.matchfiles
       
  1478     prefetch(repo, [ctx.rev()],
       
  1479              matchfiles(repo,
       
  1480                         [f for sublist in oplist for f, args, msg in sublist]))
  1478 
  1481 
  1479 @attr.s(frozen=True)
  1482 @attr.s(frozen=True)
  1480 class updateresult(object):
  1483 class updateresult(object):
  1481     updatedcount = attr.ib()
  1484     updatedcount = attr.ib()
  1482     mergedcount = attr.ib()
  1485     mergedcount = attr.ib()