# HG changeset patch # User Marcin Kuzminski # Date 2018-04-18 15:19:59 # Node ID 33739db875cfba76d6b1eb570c0f59841489a5e8 # Parent 33ef995f9be083e3518fb709ab09b7cbddf6ef57 diff-cache: remove diff cache dir on repository removal. diff --git a/rhodecode/model/repo.py b/rhodecode/model/repo.py --- a/rhodecode/model/repo.py +++ b/rhodecode/model/repo.py @@ -919,6 +919,11 @@ class RepoModel(BaseModel): if os.path.isdir(rm_path): shutil.move(rm_path, os.path.join(self.repos_path, _d)) + # finally cleanup diff-cache if it exists + cached_diffs_dir = repo.cached_diffs_dir + if os.path.isdir(cached_diffs_dir): + shutil.rmtree(cached_diffs_dir) + class ReadmeFinder: """