Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/debugcommands.py @ 41952:b74ef67573e5
manifestcache: actually honor --clear
Before this change, the --clear flag was not clearing the on disk cache.
(We also remove the extra verbosity when using --clear. Same as what we did for --add)
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 14 Mar 2019 09:12:46 +0000 |
parents | 1e75311d78f7 |
children | 1fe278aa4ad5 |
comparison
equal
deleted
inserted
replaced
41951:5b77847bdf09 | 41952:b74ef67573e5 |
---|---|
1476 raise error.Abort(msg) | 1476 raise error.Abort(msg) |
1477 | 1477 |
1478 if opts.get(r'clear'): | 1478 if opts.get(r'clear'): |
1479 with repo.lock(): | 1479 with repo.lock(): |
1480 cache = getcache() | 1480 cache = getcache() |
1481 cache.clear() | 1481 cache.clear(clear_persisted_data=True) |
1482 return | |
1482 | 1483 |
1483 if add: | 1484 if add: |
1484 with repo.lock(): | 1485 with repo.lock(): |
1485 try: | 1486 try: |
1486 m = repo.manifestlog | 1487 m = repo.manifestlog |