def initialize_release(version, path, top_level):
    REMOTE_URL = "https://github.com/ClusterHQ/flocker"
    release_path = path.child("flocker-release-{}".format(version))
    sys.stdout.write("Cloning repo in {}...\n".format(release_path.path))

    release_repo = Repo.init(release_path.path)
    release_origin = release_repo.create_remote('origin', REMOTE_URL)
    release_origin.fetch()

    sys.stdout.write("Checking out master...\n")
    release_repo.git.checkout("master")

    sys.stdout.write("Updating repo...\n")
    release_repo.git.pull("origin", "master")

    sys.stdout.write(
        "Creating release branch for version {}...\n".format(version))
    release_repo.active_branch.checkout(b="release/flocker-{}".format(version))

    sys.stdout.write("Creating virtual environment...\n")
    virtualenv_path = release_path.child("flocker-{}".format(version))
    virtualenv.create_environment(
        virtualenv_path.path,
        site_packages=False
    )

    sys.stdout.write("Installing dependencies...\n")
    environment = {
        "PATH": os.environ["PATH"]
    }
    check_call(
        [virtualenv_path.descendant(["bin", "python"]).path,
         virtualenv_path.descendant(["bin", "pip"]).path,
         "install", "-e", ".[dev]"],
        stdout=open(os.devnull, 'w'),
        env=environment,
        cwd=release_path.path,
    )

    sys.stdout.write("Updating LICENSE file...\n")
    update_license_file(list(), top_level)

    sys.stdout.write("Committing result (no push)...\n")
    try:
        release_repo.git.commit(
            a=True, m="'Updated copyright in LICENSE file'"
        )
    except GitCommandError:
        # This will happen when the LICENSE file has not changed, so we'll
        # ignore the error.
        pass

    sys.stdout.write(
        "\nCompleted.\n\nPlease copy and paste the following commands "
        "in your shell to enter the release environment and continue "
        "the pre-tag release process:\n\n"
        "export VERSION={};\ncd {};\nsource flocker-{}/bin/activate;\n\n"
        .format(version, release_path.path, version)
    )
Clone the Flocker repo and install a new virtual environment for
dataset/ETHPy150Open ClusterHQ/flocker/admin/release.py/initialize_release