D5268: shelve: use matcher to restrict prefetch to just the modified files
spectral (Kyle Lippincott)
phabricator at mercurial-scm.org
Wed Nov 14 08:02:50 EST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG29e4a77b5305: shelve: use matcher to restrict prefetch to just the modified files (authored by spectral, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D5268?vs=12530&id=12535
REVISION DETAIL
https://phab.mercurial-scm.org/D5268
AFFECTED FILES
hgext/shelve.py
CHANGE DETAILS
diff --git a/hgext/shelve.py b/hgext/shelve.py
--- a/hgext/shelve.py
+++ b/hgext/shelve.py
@@ -430,8 +430,12 @@
shelvedfile(repo, name, 'shelve').writeinfo(info)
bases = list(mutableancestors(repo[node]))
shelvedfile(repo, name, 'hg').writebundle(bases, node)
+ # 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)
def _includeunknownfiles(repo, pats, opts, extra):
s = repo.status(match=scmutil.match(repo[None], pats, opts),
To: spectral, #hg-reviewers
Cc: yuja, mercurial-devel
More information about the Mercurial-devel
mailing list