# Path: vcs/exceptions.py
# class VCSError(Exception):
#     pass
# 
# Path: vcs/exceptions.py
# class RepositoryError(VCSError):
#     pass
# 
# Path: vcs/utils/paths.py
# def get_dirs_for_path(*paths):
# def get_dir_size(path):
# def get_user_home():


import re
import os
import time
import datetime
    import logging
        import pygments
from subprocess import Popen, PIPE
from vcs.exceptions import VCSError
from vcs.exceptions import RepositoryError
from vcs.utils.paths import abspath
    from vcs.backends import get_backend
    from pygments import highlight
    from pygments.lexers import guess_lexer_for_filename, ClassNotFound
    from pygments.formatters import TerminalFormatter
        path = path()
    if not os.path.isdir(path):
        raise VCSError("Given path %r is not a directory" % path)

    result = []
    for key in ALIASES:
        dirname = os.path.join(path, '.' + key)
        if os.path.isdir(dirname):
            result.append(key)
            continue
        # We still need to check if it's not bare repository as
        # bare repos don't have working directories
        try:
            get_backend(key)(path)
            result.append(key)
            continue
        except RepositoryError:
            # Wrong backend
            pass
        except VCSError:
            # No backend at all
            pass
    return result


def get_repo_paths(path):
    """
    Returns path's subdirectories which seems to be a repository.
    """
    repo_paths = []

# Path: vcs/exceptions.py
# class VCSError(Exception):
#     pass
# 
# Path: vcs/exceptions.py
# class RepositoryError(VCSError):
#     pass
# 
# Path: vcs/utils/paths.py
# def get_dirs_for_path(*paths):
# def get_dir_size(path):
# def get_user_home():


# Path: vcs/utils/helpers.py
import re
import os
import time
import datetime
    import logging
        import pygments
from subprocess import Popen, PIPE
from vcs.exceptions import VCSError
from vcs.exceptions import RepositoryError
from vcs.utils.paths import abspath
    from vcs.backends import get_backend
    from pygments import highlight
    from pygments.lexers import guess_lexer_for_filename, ClassNotFound
    from pygments.formatters import TerminalFormatter

        path = path()
    if not os.path.isdir(path):
        raise VCSError("Given path %r is not a directory" % path)

    result = []
    for key in ALIASES:
        dirname = os.path.join(path, '.' + key)
        if os.path.isdir(dirname):
            result.append(key)
            continue
        # We still need to check if it's not bare repository as
        # bare repos don't have working directories
        try:
            get_backend(key)(path)
            result.append(key)
            continue
        except RepositoryError:
            # Wrong backend
            pass
        except VCSError:
            # No backend at all
            pass
    return result


def get_repo_paths(path):
    """
    Returns path's subdirectories which seems to be a repository.
    """
    repo_paths = []

    dirnames = (os.path.abspath(dirname) for dirname in os.listdir(path))