# HG changeset patch # User Daniel Dourvaris # Date 2016-07-01 11:17:50 # Node ID e35f8ec4eb21564a23c574c9f82bc2912808b9b5 # Parent 96fcffda3ae2dbe31f48de7823b679a361e41af4 scm: clear the cs cache on delete/remap diff --git a/rhodecode/model/scm.py b/rhodecode/model/scm.py --- a/rhodecode/model/scm.py +++ b/rhodecode/model/scm.py @@ -279,11 +279,7 @@ class ScmModel(BaseModel): if repo: config = repo._config config.set('extensions', 'largefiles', '') - cs_cache = None - if delete: - # if we do a hard clear, reset last-commit to Empty - cs_cache = EmptyCommit() - repo.update_commit_cache(config=config, cs_cache=cs_cache) + repo.update_commit_cache(config=config, cs_cache=None) caches.clear_repo_caches(repo_name) def toggle_following_repo(self, follow_repo_id, user_id):