#NEWLINE# def cmd_list_next( cfg , args ) : #NEWLINE# #INDENT# '\n    Generates a list of all user-defined next stable versions and prints them\n    to the stdout.\n    ' #NEWLINE# next_store = KVStore ( NEXT_STORE_FILE ) #NEWLINE# repo_info = get_repo_info ( ) #NEWLINE# last_tag = repo_info [ 'last-tag' ] #NEWLINE# has_next_custom = next_store . has ( last_tag ) #NEWLINE# if ( not next_store . empty ( ) ) : #NEWLINE# #INDENT# def print_item( k , v ) : #NEWLINE# #INDENT# term . out ( ( ( '    %s => %s' % ( term . tag ( k ) , term . next ( v ) ) ) + ( ' (*)' if ( k == last_tag ) else '' ) ) ) #NEWLINE# #UNINDENT# term . out ( 'Currently set NEXT custom strings (*=most recent and reachable tag):' ) #NEWLINE# for ( tag , vstring ) in sorted ( next_store . items ( ) ) : #NEWLINE# #INDENT# print_item ( tag , vstring ) #NEWLINE# #UNINDENT# if ( not print_item ) : #NEWLINE# #INDENT# print_item ( last_tag , '<undefined>' ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# term . out ( 'No NEXT custom strings set.' )