D5268: shelve: use matcher to restrict prefetch to just the modified files

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Wed Nov 14 08:02:41 EST 2018


yuja added a comment.


  > +    # Create a matcher so that prefetch doesn't attempt to fetch the entire
  >  +    # repository pointlessly.
  >  +    match = scmutil.matchfiles(repo, repo[node].files())
  > 
  >   with shelvedfile(repo, name, patchextension).opener('wb') as fp:
  > 
  > - cmdutil.exportfile(repo, [node], fp, opts=mdiff.diffopts(git=True)) +        cmdutil.exportfile(repo, [node], fp, opts=mdiff.diffopts(git=True), +                           match=match)
  
  Seems fine as the temporary commit shouldn't be a merge, so the .files()
  should include all changes.
  
  Queued, thanks.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5268

To: spectral, #hg-reviewers
Cc: yuja, mercurial-devel


More information about the Mercurial-devel mailing list