From 6abe8bdf28b74afa7a64bdcc8f58bcbb138e8cfd Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 10 Aug 2015 09:13:24 -0400 Subject: [PATCH] branches-local: filter branches by list in 'filter-branches', if it exists If it doesn't exist, behave as before. Signed-off-by: Sage Weil --- branches-local | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/branches-local b/branches-local index fb90cd4..6dc2b0f 100755 --- a/branches-local +++ b/branches-local @@ -437,10 +437,20 @@ def separate_priority_branches(branches): ignore = ['origin/{0}'.format(b) for b in IGNORE] ignore_prefix = ['origin/{0}'.format(b) for b in IGNORE_PREFIX] + require = [] + try: + f = open('/srv/autobuild-ceph/filter-branches') + require = f.read().splitlines() + except: + pass + priority = [] normal = [] for obj, ref in branches: + if require and not any(str in ref for str in require): + continue + if ref in prioritize: priority.append((obj, ref)) continue -- 2.39.5