Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/tutorials/adopt-existing.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ copier copy https://github.com/DiamondLightSource/python-copier-template.git --t
git diff
# Examine the changes, put back anything you want to keep
git commit -m "Adopt python-copier-template 1.0.0"
copier update /path/to/existing-project
copier update /path/to/existing-project --trust
git diff
# Examine the changes, resolve any merge conflicts
git commit -m "Update to python-copier-template x.x.x"
Expand Down
7 changes: 3 additions & 4 deletions tests/test_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
TOP = Path(__file__).absolute().parent.parent


def copy_project(project_path: Path, trust: bool = False, **kwargs):
def copy_project(project_path: Path, **kwargs):
with open(TOP / "example-answers.yml") as f:
answers = yaml.safe_load(f)
answers.update(kwargs)
Expand All @@ -20,7 +20,6 @@ def copy_project(project_path: Path, trust: bool = False, **kwargs):
dst_path=project_path,
data=answers,
vcs_ref="HEAD",
unsafe=trust,
)
run_pipe("git add .", cwd=str(project_path))

Expand Down Expand Up @@ -160,7 +159,7 @@ def test_example_repo_updates(tmp_path: Path):
"https://github.com/DiamondLightSource/python-copier-template-example.git"
)
example_path = tmp_path / "example"
copy_project(generated_path, trust=True)
copy_project(generated_path)
run_pipe(f"git clone {example_url} {example_path}")
with open(example_path / ".copier-answers.yml") as f:
d = yaml.safe_load(f)
Expand All @@ -171,7 +170,7 @@ def test_example_repo_updates(tmp_path: Path):
run("git config user.email '[email protected]'")
run("git config user.name 'Your Name'")
run("git commit -am 'Update src'")
run(f"copier update --trust --vcs-ref=HEAD --data-file {TOP}/example-answers.yml")
run(f"copier update --vcs-ref=HEAD --data-file {TOP}/example-answers.yml")
output = run(
# Git directory expected to be different
"diff -ur --exclude=.git "
Expand Down