Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit 89cd94c

Browse files
author
Anselm Kruis
committed
Stackless issue #161: Add Stackless support to patchcheck.py
Now Tools/scripts/patchcheck.py uses Stackless specific git base branches for Stackless source trees (i.e. "master-slp" instead of "master") (cherry picked from commit a4e7d75)
1 parent 3980538 commit 89cd94c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Tools/scripts/patchcheck.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
import reindent
1111
import untabify
1212

13+
try:
14+
import stackless
15+
except ImportError:
16+
stackless = None
1317

1418
# Excluded directories which are copies of external libraries:
1519
# don't check their coding style
@@ -44,6 +48,12 @@ def call_fxn(*args, **kwargs):
4448
return decorated_fxn
4549

4650

51+
def is_stackless():
52+
"""Check if this is a Stackless Python source"""
53+
return (stackless is not None and
54+
os.path.exists(os.path.join(SRCDIR, 'Stackless')))
55+
56+
4757
def mq_patches_applied():
4858
"""Check if there are any applied MQ patches."""
4959
cmd = 'hg qapplied'
@@ -87,6 +97,8 @@ def get_base_branch():
8797
base_branch = "master"
8898
else:
8999
base_branch = "{0.major}.{0.minor}".format(version)
100+
if is_stackless():
101+
base_branch += "-slp"
90102
this_branch = get_git_branch()
91103
if this_branch is None or this_branch == base_branch:
92104
# Not on a git PR branch, so there's no base branch

0 commit comments

Comments
 (0)