mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 16:31:02 +03:00
fastannotate: fix perfhack with the new annotate wrapper
The new wrapper may pass aopts=None, which could be troublesome if perfhack is enabled. Fix it by using the default aopts instead.
This commit is contained in:
parent
d93c9f9d97
commit
fdfba9b17d
@ -29,7 +29,7 @@ from . import (
|
||||
cmdtable = {}
|
||||
command = cmdutil.command(cmdtable)
|
||||
|
||||
def _matchpaths(repo, rev, pats, opts, aopts):
|
||||
def _matchpaths(repo, rev, pats, opts, aopts=facontext.defaultopts):
|
||||
"""generate paths matching given patterns"""
|
||||
perfhack = repo.ui.configbool('fastannotate', 'perfhack')
|
||||
|
||||
@ -204,7 +204,7 @@ def _annotatewrapper(orig, ui, repo, *pats, **opts):
|
||||
# check if we need to do prefetch (client-side)
|
||||
rev = opts.get('rev')
|
||||
if util.safehasattr(repo, 'prefetchfastannotate') and rev is not None:
|
||||
paths = list(_matchpaths(repo, rev, pats, opts, aopts=None))
|
||||
paths = list(_matchpaths(repo, rev, pats, opts))
|
||||
repo.prefetchfastannotate(paths)
|
||||
|
||||
return orig(ui, repo, *pats, **opts)
|
||||
|
Loading…
Reference in New Issue
Block a user