Skip to content

Commit 7dd4a0e

Browse files
committed
Remove apply_patches
No longer needed with wagtail fork
1 parent 75ead5b commit 7dd4a0e

File tree

2 files changed

+0
-31
lines changed

2 files changed

+0
-31
lines changed

django_mongodb_cli/repo.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import click
55
from .config import test_settings_map
66
from .utils import (
7-
apply_patches,
87
copy_mongo_apps,
98
copy_mongo_migrations,
109
copy_mongo_settings,
@@ -368,7 +367,6 @@ def test(
368367
)
369368
return
370369
command = [test_settings_map[repo_name]["test_command"]]
371-
apply_patches(repo_name)
372370
copy_mongo_migrations(repo_name)
373371
copy_mongo_apps(repo_name)
374372

django_mongodb_cli/utils.py

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12,35 +12,6 @@
1212
from .config import test_settings_map
1313

1414

15-
def apply_patches(repo_name):
16-
"""Apply a patch file to the specified project directory."""
17-
repo_dir = test_settings_map[repo_name]["clone_dir"]
18-
patch_dir = os.path.join("patches", repo_name)
19-
if os.path.exists(patch_dir):
20-
for patch_file in os.listdir(patch_dir):
21-
shutil.copyfile(
22-
os.path.join(patch_dir, patch_file),
23-
os.path.join(repo_dir, patch_file),
24-
)
25-
click.echo(click.style(f"Applying patch {patch_file}", fg="blue"))
26-
# Ensure the repository is valid
27-
repo = git.Repo(repo_dir)
28-
if not repo.bare:
29-
try:
30-
# Apply the patch
31-
repo.git.apply(patch_file)
32-
click.echo(
33-
f"Patch {os.path.basename(patch_file)} applied successfully."
34-
)
35-
except Exception as e:
36-
click.echo(f"Failed to apply patch: {e}")
37-
return
38-
else:
39-
click.echo("Not a valid Git repository.")
40-
return
41-
click.echo(click.style("Patch applied", fg="green"))
42-
43-
4415
def copy_mongo_apps(repo_name):
4516
"""Copy the appropriate mongo_apps file based on the repo name."""
4617
if "apps_file" in test_settings_map[repo_name] and repo_name != "django":

0 commit comments

Comments
 (0)