Skip to content

Commit 2a37f94

Browse files
committed
Switch to a newer branch in CPython repository
1 parent 9b7930d commit 2a37f94

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

generate.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ def get_completion_progress() -> Iterator[LanguageProjectData]:
3737
branch=latest_branch,
3838
)
3939
else:
40-
Repo(cpython_dir).git.pull()
40+
(cpython_repo := Repo(cpython_dir)).git.fetch()
41+
cpython_repo.git.switch(latest_branch)
42+
cpython_repo.git.pull()
4143
subprocess.run(['make', '-C', cpython_dir / 'Doc', 'venv'], check=True)
4244
try:
4345
subprocess.run(['make', '-C', cpython_dir / 'Doc', 'gettext'], check=True)

0 commit comments

Comments
 (0)