Process merge files in order.

This commit is contained in:
Michael Still 2014-05-26 16:19:37 +10:00
parent dca00fc757
commit 06bc1c3a7f
1 changed files with 15 additions and 1 deletions

View File

@ -105,7 +105,21 @@ if True:
print 'Processing changed merge files'
patches = {}
for filename in changed_merge_files:
def ninety_days_of_filenames():
dt = datetime.datetime.now()
dt -= datetime.timedelta(days=90)
while dt < datetime.datetime.now():
yield 'merged/%s/%s/%s' % (dt.year, dt.month, dt.day)
dt += datetime.timedelta(days=1)
yield 'merged/%s/%s/%s' % (dt.year, dt.month, dt.day)
for filename in ninety_days_of_filenames():
if not filename in changed_merge_files:
continue
print '... %s' % filename
with open(filename, 'r') as f:
reviews = {}