From: Sage Weil Date: Mon, 10 Aug 2015 13:13:24 +0000 (-0400) Subject: branches-local: filter branches by list in 'filter-branches', if it exists X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F58%2Fhead;p=autobuild-ceph.git 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 --- 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