diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -163,6 +163,20 @@ subrepoopts = cmdutil.subrepoopts debugrevlogopts = cmdutil.debugrevlogopts + +def _maybeunfilteredrepo(repo, commandname, args, kwargs): + """decides if we can optimize by using an unfiltered repo + + Extracted to a function so extensions can override it. + """ + use_unfiltered = False + if commandname == b'status': + if not kwargs.get(b'rev') and not kwargs.get(b'change'): + use_unfiltered = True + + return repo.unfiltered() if use_unfiltered else repo + + # Commands start here, listed alphabetically @@ -6790,6 +6804,8 @@ else: terse = ui.config(b'commands', b'status.terse') + repo = _maybeunfilteredrepo(repo, b'status', pats, opts) + if revs and change: msg = _(b'cannot specify --rev and --change at the same time') raise error.Abort(msg)