summaryrefslogtreecommitdiffstats
path: root/scripts/lib/bsp/kernel.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/bsp/kernel.py')
-rw-r--r--scripts/lib/bsp/kernel.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/lib/bsp/kernel.py b/scripts/lib/bsp/kernel.py
index 8b3aa72c9c..e9bc2e87af 100644
--- a/scripts/lib/bsp/kernel.py
+++ b/scripts/lib/bsp/kernel.py
@@ -711,6 +711,16 @@ def all_branches(context):
711 tmp = os.popen(gitcmd).read() 711 tmp = os.popen(gitcmd).read()
712 712
713 branches = [] 713 branches = []
714 base_prefixes = None
715
716 try:
717 branches_base = context["branches_base"]
718 if branches_base:
719 base_prefixes = branches_base.split(":")
720 except KeyError:
721 pass
722
723 arch = context["arch"]
714 724
715 if tmp: 725 if tmp:
716 tmpline = tmp.split("\n") 726 tmpline = tmp.split("\n")
@@ -719,6 +729,14 @@ def all_branches(context):
719 break; 729 break;
720 idx = line.find("refs/heads/") 730 idx = line.find("refs/heads/")
721 kbranch = line[idx + len("refs/heads/"):] 731 kbranch = line[idx + len("refs/heads/"):]
732 kbranch_prefix = kbranch.rsplit("/", 1)[0]
733
734 if base_prefixes:
735 for base_prefix in base_prefixes:
736 if kbranch_prefix == base_prefix:
737 branches.append(kbranch)
738 continue
739
722 if (kbranch.find("/") != -1 and 740 if (kbranch.find("/") != -1 and
723 (kbranch.find("standard") != -1 or kbranch.find("base") != -1) or 741 (kbranch.find("standard") != -1 or kbranch.find("base") != -1) or
724 kbranch == "base"): 742 kbranch == "base"):