def find_repository(repository, user):
    user_base = os.path.join(os.sep, 'OpenMDAO', 'dev', user)
    shared_base = os.path.join(os.sep, 'OpenMDAO', 'dev', 'shared')

    if not repository:
        path = find_bzr()
        if path and platform.node() == 'torpedo.grc.nasa.gov' and \
           not path.startswith('/OpenMDAO'):
            # On OpenMDAO home use default search if not an OpenMDAO repository.
            path = ''
        if not path:
            # Use default if this user only has one.
            paths = glob.glob(os.path.join(user_base, '*'))
            if len(paths) == 1:
                repository = paths[0]
            elif len(paths) == 0:
                repository = 'working_main'  # Default shared if no user repo.
            else:
                print 'Default repository is ambiguous:'
                for path in paths:
                    print '   ', path
                sys.exit(1)
    path = find_bzr(repository)
    if not path:
        path = os.path.join(user_base, repository)
        path = find_bzr(path)
    if not path:
        path = os.path.join(shared_base, repository)
        path = find_bzr(path)
    return path
Return repository's root directory path, or None.
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/scripts/repo.py/find_repository