summaryrefslogtreecommitdiff
path: root/find-missing-lorries
blob: a4036bc88fffb89720dac5cf9642ffb22c12962d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/python

# Usage:
#
#   ssh git@git.baserock.org ls | ./find-missing-lorries


import glob
import os
import sys
import json


repo_list = []
for line in sys.stdin:
    words = line.split()
    repo_list.append(words[1])


lorries = []
for filename in glob.glob('open-source-lorries/*.lorry'):
    with open(filename) as f:
        obj = json.load(f)
    for repo_basename in obj:
        repo_name = 'delta/%s' % repo_basename
        lorries.append(repo_name)


for repo in repo_list:
    if repo.startswith('delta/') and repo not in lorries:
        print 'MISSING', repo