Skip to content

Commit 576b13d

Browse files
author
Erlend Egeberg Aasland
authored
Always use git clean -fdx (#275)
* Always use git clean -fdx * Address review: Put common Git/GitHub kwargs in a variable
1 parent cd4712d commit 576b13d

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

master/master.cfg

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,14 @@ git_branches = [
129129
# ("https://hg.python.org/buildbot/empty", "3.4", "empty"),
130130
]
131131

132+
# common Git() and GitHub() keyword arguments
133+
GIT_KWDS = {
134+
"timeout": 3600,
135+
# "git clean -fdx": remove all files which are not tracked by Git,
136+
# ignoring the .gitignore rules (ex: remove also ".o" files).
137+
"mode": "full",
138+
"method": "fresh",
139+
}
132140

133141
c["builders"] = []
134142
c["schedulers"] = []
@@ -223,15 +231,7 @@ for branch_num, (git_url, branchname, git_branch) in enumerate(git_branches):
223231
continue
224232

225233
buildername = name + " " + branchname
226-
source = Git(
227-
repourl=git_url,
228-
branch=git_branch,
229-
timeout=3600,
230-
# "git clean -fdx": remove all files which are not tracked by Git,
231-
# ignoring the .gitignore rules (ex: remove also ".o" files).
232-
mode="full",
233-
method="fresh",
234-
)
234+
source = Git(repourl=git_url, branch=git_branch, **GIT_KWDS)
235235
f = buildfactory(
236236
source,
237237
parallel=parallel.get(worker),
@@ -309,7 +309,7 @@ for name, worker, buildfactory, stability in BUILDERS:
309309

310310
pull_request_builders.append(buildername)
311311

312-
source = GitHub(repourl=git_url, timeout=3600, mode="full", method="clean",)
312+
source = GitHub(repourl=git_url, **GIT_KWDS)
313313

314314
f = buildfactory(
315315
source,

0 commit comments

Comments
 (0)