Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/cmdutil.py @ 35966:264b90a060b7
cat: call the storage prefetch hook
It's not important to call in the case of a single file, but maybe it's better
to do so for consistency.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 04 Feb 2018 15:26:49 -0500 |
parents | efbd04238029 |
children | 386c1e45e671 |
comparison
equal
deleted
inserted
replaced
35965:533f04d4cb6d | 35966:264b90a060b7 |
---|---|
2186 file = matcher.files()[0] | 2186 file = matcher.files()[0] |
2187 mfl = repo.manifestlog | 2187 mfl = repo.manifestlog |
2188 mfnode = ctx.manifestnode() | 2188 mfnode = ctx.manifestnode() |
2189 try: | 2189 try: |
2190 if mfnode and mfl[mfnode].find(file)[0]: | 2190 if mfnode and mfl[mfnode].find(file)[0]: |
2191 _prefetchfiles(repo, ctx, [file]) | |
2191 write(file) | 2192 write(file) |
2192 return 0 | 2193 return 0 |
2193 except KeyError: | 2194 except KeyError: |
2194 pass | 2195 pass |
2195 | 2196 |
2196 for abs in ctx.walk(matcher): | 2197 files = [f for f in ctx.walk(matcher)] |
2198 _prefetchfiles(repo, ctx, files) | |
2199 | |
2200 for abs in files: | |
2197 write(abs) | 2201 write(abs) |
2198 err = 0 | 2202 err = 0 |
2199 | 2203 |
2200 for subpath in sorted(ctx.substate): | 2204 for subpath in sorted(ctx.substate): |
2201 sub = ctx.sub(subpath) | 2205 sub = ctx.sub(subpath) |