#NEWLINE# def __cmd_build_template( cfg , args , preview = False ) : #NEWLINE# #INDENT# '\n    Internal-only function used for avoiding code duplication between\n    template-operating functions.\n\n    See cmd_build_template and cmd_preview_template for the full docs.\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# next_custom = ( next_store . get ( last_tag ) if repo_info else None ) #NEWLINE# parse_templates ( cfg , args . templates , repo_info , next_custom , preview )