forked from benedikt-schesch/AST-Merging-Evaluation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
18aaf2c
commit 48642bb
Showing
2 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# -*- coding: utf-8 -*- | ||
""" Delete all entries that finish with "intellimerge" in the | ||
cache/sha_cache_entry directory and subdirectories. | ||
""" | ||
|
||
import json | ||
from pathlib import Path | ||
|
||
base_path = Path("cache/sha_cache_entry") | ||
# Iterate over all json files in the directory and subdirectories | ||
for json_file in base_path.glob("**/*.json"): | ||
# Load json file | ||
with json_file.open() as f: | ||
data = json.load(f) | ||
# Delete all entries that finish with "intellimerge" | ||
for key in list(data.keys()): | ||
if key.endswith("intellimerge"): | ||
del data[key] | ||
# Save json file | ||
with json_file.open("w") as f: | ||
json.dump(data, f) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters