diff -r 5b77847bdf09 -r b74ef67573e5 mercurial/debugcommands.py --- a/mercurial/debugcommands.py Thu Mar 14 10:58:53 2019 +0000 +++ b/mercurial/debugcommands.py Thu Mar 14 09:12:46 2019 +0000 @@ -1478,7 +1478,8 @@ if opts.get(r'clear'): with repo.lock(): cache = getcache() - cache.clear() + cache.clear(clear_persisted_data=True) + return if add: with repo.lock():