diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -990,7 +990,7 @@ def walkchangerevs(ui, repo, pats, chang defrange = '-1:0' revs = revrange(repo, opts['rev'] or [defrange]) wanted = {} - slowpath = m.anypats() or opts.get('removed') + slowpath = m.anypats() or (m.files() and opts.get('removed')) fncache = {} if not slowpath and not m.files():