Skip to content
Open
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
compile: read git_remote from the [scm] section
The example configuration (`doc/benchmark.conf.sample`) and the
configuration in `test_commands.py` both expect it to be there.

Add a fallback in case anyone has existing configurations with it set
under `[config]`.
  • Loading branch information
nelhage committed Feb 11, 2025
commit 6881f415a9a20321af7c809080fc0469e27079db
7 changes: 6 additions & 1 deletion pyperformance/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,12 @@ def getint(section, key, default=None):
# [scm]
conf.repo_dir = getfile('scm', 'repo_dir')
conf.update = getboolean('scm', 'update', True)
conf.git_remote = getstr('config', 'git_remote', default='remotes/origin')
try:
conf.git_remote = getstr('scm', 'git_remote')
except KeyError:
# This key used to live under `config`. Fall back there
# for backwards-compatibility.
conf.git_remote = getstr('config', 'git_remote', default='remotes/origin')

# [compile]
conf.directory = getfile('compile', 'bench_dir')
Expand Down