hgext/shelve.py
changeset 40628 29e4a77b5305
parent 40366 b14fdf1fb615
child 40853 d7e44da4dc70
equal deleted inserted replaced
40627:e9293c5f8bb9 40628:29e4a77b5305
   428 def _shelvecreatedcommit(repo, node, name):
   428 def _shelvecreatedcommit(repo, node, name):
   429     info = {'node': nodemod.hex(node)}
   429     info = {'node': nodemod.hex(node)}
   430     shelvedfile(repo, name, 'shelve').writeinfo(info)
   430     shelvedfile(repo, name, 'shelve').writeinfo(info)
   431     bases = list(mutableancestors(repo[node]))
   431     bases = list(mutableancestors(repo[node]))
   432     shelvedfile(repo, name, 'hg').writebundle(bases, node)
   432     shelvedfile(repo, name, 'hg').writebundle(bases, node)
       
   433     # Create a matcher so that prefetch doesn't attempt to fetch the entire
       
   434     # repository pointlessly.
       
   435     match = scmutil.matchfiles(repo, repo[node].files())
   433     with shelvedfile(repo, name, patchextension).opener('wb') as fp:
   436     with shelvedfile(repo, name, patchextension).opener('wb') as fp:
   434         cmdutil.exportfile(repo, [node], fp, opts=mdiff.diffopts(git=True))
   437         cmdutil.exportfile(repo, [node], fp, opts=mdiff.diffopts(git=True),
       
   438                            match=match)
   435 
   439 
   436 def _includeunknownfiles(repo, pats, opts, extra):
   440 def _includeunknownfiles(repo, pats, opts, extra):
   437     s = repo.status(match=scmutil.match(repo[None], pats, opts),
   441     s = repo.status(match=scmutil.match(repo[None], pats, opts),
   438                     unknown=True)
   442                     unknown=True)
   439     if s.unknown:
   443     if s.unknown: