232
232
return latest_ver, best_tag
235
def _report_freshness(latest_ver, branch_latest_ver, place, verbosity):
235
def _report_freshness(latest_ver, branch_latest_ver, place, verbosity,
236
237
"""Report if the branch is up-to-date."""
237
238
if latest_ver is None:
238
239
if verbosity == 'all':
239
trace.note('Most recent %s version: MISSING' % (place,))
240
report_func('Most recent %s version: MISSING' % (place,))
240
241
elif verbosity == 'short':
241
trace.note('%s is MISSING a version' % (place,))
242
report_func('%s is MISSING a version' % (place,))
243
244
elif latest_ver == branch_latest_ver:
244
245
if verbosity == 'minimal':
246
247
elif verbosity == 'short':
247
trace.note('%s is CURRENT in %s' % (latest_ver, place))
248
report_func('%s is CURRENT in %s' % (latest_ver, place))
249
trace.note('Most recent %s version: %s\n'
250
report_func('Most recent %s version: %s\n'
250
251
'Packaging branch status: CURRENT'
251
252
% (place, latest_ver))
253
254
if verbosity in ('minimal', 'short'):
254
255
if branch_latest_ver is None:
255
256
branch_latest_ver = 'Branch'
256
trace.warning('%s is OUT-OF-DATE, %s has %s'
257
% (branch_latest_ver, place, latest_ver))
257
report_func('%s is OUT-OF-DATE, %s has %s'
258
% (branch_latest_ver, place, latest_ver))
259
trace.warning('Most recent %s version: %s\n'
260
'Packaging branch version: %s\n'
261
'Packaging branch status: OUT-OF-DATE'
262
% (place, latest_ver, branch_latest_ver))
260
report_func('Most recent %s version: %s\n'
261
'Packaging branch version: %s\n'
262
'Packaging branch status: OUT-OF-DATE'
263
% (place, latest_ver, branch_latest_ver))
265
266
def report_freshness(the_branch, verbosity, latest_pub):
281
282
verbosity = 'all'
282
283
latest_ver, branch_ver = _get_newest_versions(the_branch, latest_pub)
283
284
place = latest_pub.place()
284
_report_freshness(latest_ver, branch_ver, place, verbosity)
285
_report_freshness(latest_ver, branch_ver, place, verbosity,