def get_versions(default=DEFAULT, verbose=False):
<EOL>assert versionfile_source is not None, "<STR_LIT>"<EOL>assert tag_prefix is not None, "<STR_LIT>"<EOL>assert parentdir_prefix is not None, "<STR_LIT>"<EOL>assert VCS is not None, "<STR_LIT>"<EOL>root = get_root()<EOL>versionfile_abs = os.path.join(root, versionfile_source)<EOL>get_keywords_f = vcs_function(VCS, "<STR_LIT>")<EOL>versions_from_keywords_f = vcs_function(VCS, "<STR_LIT>")<EOL>if get_keywords_f and versions_from_keywords_f:<EOL><INDENT>vcs_keywords = get_keywords_f(versionfile_abs)<EOL>ver = versions_from_keywords_f(vcs_keywords, tag_prefix)<EOL>if ver:<EOL><INDENT>if verbose: print("<STR_LIT>" % ver)<EOL>return ver<EOL><DEDENT><DEDENT>ver = versions_from_file(versionfile_abs)<EOL>if ver:<EOL><INDENT>if verbose: print("<STR_LIT>" % (versionfile_abs,ver))<EOL>return ver<EOL><DEDENT>versions_from_vcs_f = vcs_function(VCS, "<STR_LIT>")<EOL>if versions_from_vcs_f:<EOL><INDENT>ver = versions_from_vcs_f(tag_prefix, root, verbose)<EOL>if ver:<EOL><INDENT>if verbose: print("<STR_LIT>" % ver)<EOL>return ver<EOL><DEDENT><DEDENT>ver = versions_from_parentdir(parentdir_prefix, root, verbose)<EOL>if ver:<EOL><INDENT>if verbose: print("<STR_LIT>" % ver)<EOL>return ver<EOL><DEDENT>if verbose: print("<STR_LIT>" % default)<EOL>return default<EOL>
This variation of get_versions() will be used in versioneer.py .