From: Ian Jackson Subject: [OSSTEST PATCH 07/11] mg-list-all-branches: New script. Date: Mon, 30 Jun 2014 11:21:45 +0100 Message-ID: <1404123709-32332-8-git-send-email-ian.jackson@eu.citrix.com> References: <1404123709-32332-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X1YjC-0001rP-1s for xen-devel@lists.xenproject.org; Mon, 30 Jun 2014 10:22:26 +0000 In-Reply-To: <1404123709-32332-1-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org The approach here is a little unpleasant but it has the virtue of getting the ones out of crontab too, and of not depending on the production database (which will in any case contain obsolete flights). Signed-off-by: Ian Jackson --- mg-list-all-branches | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 mg-list-all-branches diff --git a/mg-list-all-branches b/mg-list-all-branches new file mode 100755 index 0000000..c968a99 --- /dev/null +++ b/mg-list-all-branches @@ -0,0 +1,18 @@ +#!/usr/bin/perl -w +# prints on stdout a list of all the "branches" +# mentioned in cr-daily-branch or crontab + +use strict; + +our %branches; + +foreach my $f (qw(cr-for-branches crontab)) { + open C, $f or die $!; + while () { + next unless m/(?:EXTRA_)?BRANCHES[:+]?='?([-.0-9a-z ]+)/; + $branches{$_}=1 foreach split /\s+/, $1; + } + close C or die $!; +} + +print $_,"\n" or die $! foreach sort keys %branches; -- 1.7.10.4