@classmethod<EOL><INDENT>def find_vcs_root(cls, path):<DEDENT>
if cls.search_parents_for_root():<EOL><INDENT>valid_dirs = walk_up_dirs(path)<EOL><DEDENT>else:<EOL><INDENT>valid_dirs = [path]<EOL><DEDENT>for i, current_path in enumerate(valid_dirs):<EOL><INDENT>if cls.is_valid_root(current_path):<EOL><INDENT>return current_path, i<EOL><DEDENT><DEDENT>return None<EOL>
Try to find a version control root directory of this type for the
        given path.

        If successful, returns (vcs_root, levels_up), where vcs_root is the
        path to the version control root directory it found, and levels_up is an
        integer indicating how many parent directories it had to search through
        to find it, where 0 means it was found in the indicated path, 1 means it
        was found in that path's parent, etc. If not sucessful, returns None