Exemplo n.º 1
0
def test_sync_with_no_update_manifest_flag_leaves_changes(
    tsrc_cli: CLI, git_server: GitServer, workspace_path: Path
) -> None:
    """
    Scenario:
    * Create a manifest with one repo, foo
    * Initialize a workspace from this manifest
    * Add repo bar and do not commit or push this change
    * Run tsrc sync --no-update-manifest
    * The manifest is not updated from the remote, and the change is left
    * Both foo and bar are present after the sync
    """
    git_server.add_repo("foo")
    git_server.push_file("foo", "foo.txt", contents="foo")
    tsrc_cli.run("init", git_server.manifest_url)

    git_server.add_repo("bar", add_to_manifest=False)
    git_server.push_file("bar", "bar.txt", contents="bar")
    add_repo_unstaged("bar", git_server, workspace_path)

    tsrc_cli.run("sync", "--no-update-manifest")

    bar_path = workspace_path / "bar"
    assert bar_path.exists(), "bar should have been synced"
    assert (
        bar_path / "bar.txt"
    ).read_text() == "bar", "bar should have the correct contents"
Exemplo n.º 2
0
def test_apply_manifest_adds_new_repo(tsrc_cli: CLI, git_server: GitServer,
                                      workspace_path: Path) -> None:
    """Scenario:

    * Create a manifest with one repo
    * Create a workspace using `tsrc init`
    * Copy the manifest file somewhere in the workspace
    * Create a new repo on the server
    * Edit the copied manifest to contain the new repo
    * Run `tsrc apply-manifest /path/to/copied_manifest`
    * Check that the new repo gets cloned

    """
    git_server.add_repo("foo")
    tsrc_cli.run("init", git_server.manifest_url)

    cloned_manifest_path = workspace_path / ".tsrc/manifest/manifest.yml"
    copied_manifest_path = workspace_path / "manifest.yml"
    shutil.copy(cloned_manifest_path, copied_manifest_path)

    bar_url = git_server.add_repo("bar", add_to_manifest=False)
    add_repo_to_manifest(copied_manifest_path, "bar", bar_url)

    tsrc_cli.run("apply-manifest", str(copied_manifest_path))

    assert (workspace_path /
            "bar").exists(), "bar repo should have been cloned"
Exemplo n.º 3
0
def test_set_project_dest_and_branch(
    tsrc_cli: CLI, git_server: GitServer, workspace_path: Path
) -> None:
    git_server.add_repo("foo")
    git_server.add_repo("bar", default_branch="devel")

    tsrc_cli.run("init", git_server.manifest_url)
    bar_path = workspace_path / "bar"
    run_git(bar_path, "checkout", "-b", "other")

    workspace = Workspace(workspace_path)
    manifest = workspace.get_manifest()
    env_setter = EnvSetter(workspace)

    workspace_vars = get_workspace_vars(workspace)
    assert workspace_vars["TSRC_MANIFEST_URL"] == git_server.manifest_url
    assert workspace_vars["TSRC_MANIFEST_BRANCH"] == "master"
    assert workspace_vars["TSRC_WORKSPACE_PATH"] == str(workspace_path)

    foo_repo = manifest.get_repo("foo")
    foo_env = env_setter.get_env_for_repo(foo_repo)
    # check that shared env is part of the result for foo
    assert foo_env["TSRC_MANIFEST_URL"] == git_server.manifest_url
    assert foo_env["TSRC_PROJECT_CLONE_URL"] == foo_repo.clone_url

    # check that bar and foo envs are different
    bar_repo = manifest.get_repo("bar")
    bar_env = env_setter.get_env_for_repo(bar_repo)
    assert bar_env["TSRC_PROJECT_DEST"] == "bar"
    assert bar_env["TSRC_PROJECT_MANIFEST_BRANCH"] == "devel"

    # check that git status is set
    assert bar_env["TSRC_PROJECT_STATUS_BRANCH"] == "other"
Exemplo n.º 4
0
def test_can_add_copies(workspace_path: Path, git_server: GitServer) -> None:
    git_server.add_repo("foo")
    git_server.manifest.set_file_copy("foo", "foo.txt", "top.txt")
    manifest = read_remote_manifest(workspace_path, git_server)
    assert manifest.file_system_operations == [
        tsrc.Copy("foo", "foo.txt", "top.txt")
    ]
Exemplo n.º 5
0
def test_sync_not_on_master(
    tsrc_cli: CLI,
    git_server: GitServer,
    workspace_path: Path,
    message_recorder: MessageRecorder,
) -> None:
    """ "
    Scenario:
    * Create a manifest with two repos, foo and bar
    * Initialize a workspace from this manifest
    * Checkout a different branch on foo, tracking an existing remote
    * Run `tsrc sync`
    * Check that:
       * foo is updated
       * but the command fails because foo was not an the expected branch
    """
    git_server.add_repo("foo")
    git_server.add_repo("bar")

    git_server.push_file("foo", "devel.txt", branch="devel")
    manifest_url = git_server.manifest_url
    tsrc_cli.run("init", manifest_url)

    foo_path = workspace_path / "foo"
    tsrc.git.run(foo_path, "checkout", "-B", "devel")
    tsrc.git.run(foo_path, "branch", "--set-upstream-to", "origin/devel")

    tsrc_cli.run_and_fail("sync")

    assert (foo_path / "devel.txt").exists(), "foo should have been updated"
    assert message_recorder.find("not on the correct branch")
Exemplo n.º 6
0
def test_sync_with_force(
    tsrc_cli: CLI, git_server: GitServer, workspace_path: Path
) -> None:
    """
    Scenario:
    * Create a manifest with one repo, foo
    * Create a tag `latest` on foo
    * Initialize a workspace from this manifest
    * Delete and re-create the `latest` tag
    * Run tsrc sync --force
    * Check that the clone was reset to the correct revision
      (aka, `git fetch --force` was called).
    """
    git_server.add_repo("foo")
    git_server.push_file("foo", "latest.txt", contents="1")
    git_server.tag("foo", "latest")
    tsrc_cli.run("init", git_server.manifest_url)

    git_server.push_file("foo", "latest.txt", contents="2")
    git_server.tag("foo", "latest", force=True)
    tsrc_cli.run("sync", "--force")

    foo_path = workspace_path / "foo"
    assert (
        foo_path / "latest.txt"
    ).read_text() == "2", "foo should have been reset to the latest tag"
Exemplo n.º 7
0
def test_sha1s_are_skipped_when_not_clean(
    tsrc_cli: CLI, git_server: GitServer, workspace_path: Path
) -> None:
    """Scenario:
    * Create a manifest with a foo repo, frozen at an initial revision
    * Initialize a workspace from this manifest
    * Push a new file to the foo repo
    * Configure the manifest so that foo is frozen at the new revision
    * Create an untracked file in the foo repo
    * Run `tsrc sync`
    * Check that `tsrc sync` fails and that foo is not updated
    """
    git_server.add_repo("foo")
    initial_sha1 = git_server.get_sha1("foo")
    git_server.manifest.set_repo_sha1("foo", initial_sha1)

    tsrc_cli.run("init", git_server.manifest_url)
    (workspace_path / "foo/untracked.txt").write_text("")

    git_server.push_file("foo", "new.txt")
    new_sha1 = git_server.get_sha1("foo")
    git_server.manifest.set_repo_sha1("foo", new_sha1)

    tsrc_cli.run_and_fail("sync")

    foo_path = workspace_path / "foo"
    assert not (
        foo_path / "new.txt"
    ).exists(), "foo should not have been updated (untracked files)"
Exemplo n.º 8
0
def test_clone_submodules(tsrc_cli: CLI, git_server: GitServer,
                          workspace_path: Path) -> None:
    """
    Scenario:
    * Create repo 'sub1' containing a 'sub2' submodule
    * Create a repo 'top' containing the 'sub1' submodule
    * Add 'top' to the manifest
    * Run `tsrc init`
    * Check that both submodules where cloned properly
    """

    git_server.add_repo("top")
    sub1_url = git_server.add_repo("sub1", add_to_manifest=False)
    sub2_url = git_server.add_repo("sub2", add_to_manifest=False)
    git_server.add_submodule("sub1", url=sub2_url, path=Path("sub2"))
    git_server.add_submodule("top", url=sub1_url, path=Path("sub1"))

    tsrc_cli.run("init", git_server.manifest_url, "-r", "origin")

    clone_path = workspace_path / "top"

    sub1_readme = clone_path / "sub1" / "README"
    assert sub1_readme.exists(), "sub1 was not cloned"

    sub2_readme = clone_path / "sub1" / "sub2" / "README"
    assert sub2_readme.exists(), "sub2 was not cloned"
Exemplo n.º 9
0
def test_empty_repo(tsrc_cli: CLI, git_server: GitServer,
                    workspace_path: Path) -> None:
    git_server.add_repo("foo", empty=True)
    git_server.add_repo("bar")

    manifest_url = git_server.manifest_url
    tsrc_cli.run("init", manifest_url, expect_fail=True)
Exemplo n.º 10
0
def test_tags_are_updated_when_clean(
    tsrc_cli: CLI, git_server: GitServer, workspace_path: Path
) -> None:
    """Scenario:
    * Create a manifest with a foo repo, frozen at the v0.1 tag
    * Initialize a workspace from this manifest
    * Push a new file to the foo repo
    * Create a new v0.2 tag on the foo repo
    * Configure the manifest so that `foo` is frozen at the v0.2 tag
    * Run `tsrc sync`
    * Check that foo has been updated to the `v0.2` tag
    """
    git_server.add_repo("foo")
    git_server.tag("foo", "v0.1")
    git_server.manifest.set_repo_tag("foo", "v0.1")

    tsrc_cli.run("init", git_server.manifest_url)

    git_server.push_file("foo", "new.txt")
    git_server.tag("foo", "v0.2")
    git_server.manifest.set_repo_tag("foo", "v0.2")

    tsrc_cli.run("sync")

    foo_path = workspace_path / "foo"
    assert (
        foo_path / "new.txt"
    ).exists(), "foo should have been updated to the v0.2 tag"
Exemplo n.º 11
0
def test_status_incorrect_branch(
    tsrc_cli: CLI,
    git_server: GitServer,
    workspace_path: Path,
    message_recorder: MessageRecorder,
) -> None:
    """Scenario:
    * Create a workspace with  one repo
    * Create and checkout an 'other' branch
    * Run `tsrc status`
    * Check that the repo is shown as not being
      on the correct branch
    """
    git_server.add_repo("foo")

    manifest_url = git_server.manifest_url
    tsrc_cli.run("init", manifest_url)

    foo_path = workspace_path / "foo"
    run_git(foo_path, "checkout", "-b", "other")
    run_git(foo_path, "push", "--set-upstream", "origin", "other:other")

    tsrc_cli.run("status")

    assert message_recorder.find(r"\* foo\s+other\s+\(expected: master\)")
Exemplo n.º 12
0
def test_status_not_on_any_branch(
    tsrc_cli: CLI,
    git_server: GitServer,
    workspace_path: Path,
    message_recorder: MessageRecorder,
) -> None:
    """Scenario:
    * Create a workspace with one repo
    * Make sure the repo is not an any branch
    * Run `tsrc status`
    * Check that the output contains a sha1
    """
    git_server.add_repo("foo")
    # we need more that one commit
    # to be in 'detached HEAD':
    git_server.push_file("foo", "new.txt")

    git_server.add_repo("bar")

    tsrc_cli.run("init", git_server.manifest_url)

    # detach HEAD on foo repo
    foo_path = workspace_path / "foo"
    run_git(foo_path, "checkout", "HEAD~1")

    tsrc_cli.run("status")

    assert message_recorder.find(r"\* foo [a-f0-9]{7}")
Exemplo n.º 13
0
def test_status_with_missing_repos(
    tsrc_cli: CLI,
    git_server: GitServer,
    workspace_path: Path,
    message_recorder: MessageRecorder,
) -> None:
    """Scenario:
    * Create a manifest with two repos, foo and bar
    * Initialize a workspace from this manifest
    * Remove the `foo` clone
    * Run `tsrc status`
    * Check that it does not crash
    """
    git_server.add_repo("foo")
    git_server.add_repo("bar")

    manifest_url = git_server.manifest_url
    tsrc_cli.run("init", manifest_url)

    # shutil.rmtree has trouble removing read-only
    # files in the .git repo, but this won't affect
    # the outcome of the test anyway
    shutil.rmtree(workspace_path / "foo", ignore_errors=True)

    tsrc_cli.run("status")
Exemplo n.º 14
0
def test_init_with_args(
    tsrc_cli: CLI, git_server: GitServer, monkeypatch: Any, tmp_path: Path
) -> None:
    git_server.add_repo("foo")
    work2_path = (tmp_path / "work2").mkdir()
    tsrc_cli.run("init", "--workspace", work2_path, git_server.manifest_url)
    assert_cloned(work2_path, "foo")
Exemplo n.º 15
0
def test_use_specific_groups(
    tsrc_cli: CLI, git_server: GitServer, workspace_path: Path
) -> None:
    """ Scenario:
    * the manifest contains two groups, 'foo' and 'spam'
    * the manifest contains one repo 'other'
    * the 'other' repo is configured with a file copy

    * the user runs `init --group foo, spam`

    * we don't want 'other' to be cloned
    * we don't want the file copy to be attempted
    """
    git_server.add_group("foo", ["bar", "baz"])
    git_server.add_group("spam", ["eggs", "beacon"])
    git_server.add_repo("other")
    git_server.push_file("other", "THANKS")
    git_server.manifest.set_repo_file_copies("other", [("THANKS", "THANKS.copy")])

    manifest_url = git_server.manifest_url
    tsrc_cli.run("init", manifest_url, "--groups", "foo", "spam")

    assert_cloned(workspace_path, "bar")
    assert_cloned(workspace_path, "eggs")
    assert_not_cloned(workspace_path, "other")
Exemplo n.º 16
0
def test_update_symlink(
    tsrc_cli: CLI, git_server: GitServer, workspace_path: Path
) -> None:
    """Scenario:
    * Crate a manifest with a 'foo' repo
    * Push 'foo.txt' to the 'foo' repo
    * Configure the 'foo' repo with a symlink copy from 'foo.link' to 'foo/foo.txt'
    * Run `tsrc init`
    * Update the link in the manifest
    * Push 'bar.txt' to the 'foo' repo
    * Run `tsrc sync`
    * Update the 'foo' repo with a symlink from 'foo.link' to 'foo/bar.txt'
    * Check that the link in <workspace>/foo.link was updated to point to foo/bar.txt
    """
    manifest_url = git_server.manifest_url
    git_server.add_repo("foo")
    git_server.push_file("foo", "foo.txt")
    git_server.manifest.set_symlink("foo", "foo.link", "foo/foo.txt")
    tsrc_cli.run("init", manifest_url)
    git_server.push_file("foo", "bar.txt")
    git_server.manifest.set_symlink("foo", "foo.link", "foo/bar.txt")

    tsrc_cli.run("sync")

    actual_link = workspace_path / "foo.link"
    assert actual_link.exists()
    assert os.readlink(str(actual_link)) == os.path.normpath("foo/bar.txt")
Exemplo n.º 17
0
def test_foreach_with_groups_from_config(
    tsrc_cli: CLI, git_server: GitServer, message_recorder: MessageRecorder
) -> None:
    """
    * Create a manifest containing:
       * a group named `foo` with repos `bar` and `baz`,
       * a group named `spam` with repos `eggs` and `beacon`
       * a repo named `other`, not part of any group
    * Initialize a workspace from this manifest, using the `foo`
      and `spam` groups
    * Check that `tsrc foreach ---group "foo" --ls README` works and
      runs `ls` only on everything but `other`
    """
    git_server.add_group("foo", ["bar", "baz"])
    git_server.add_group("spam", ["eggs", "beacon"])
    git_server.add_repo("other")

    manifest_url = git_server.manifest_url
    tsrc_cli.run("init", manifest_url, "--groups", "foo", "spam")

    message_recorder.reset()
    tsrc_cli.run("foreach", "ls")

    assert message_recorder.find("bar\n")
    assert message_recorder.find("baz\n")
    assert message_recorder.find("eggs\n")
    assert not message_recorder.find("other\n")
Exemplo n.º 18
0
def test_sync_with_errors(
    tsrc_cli: CLI,
    git_server: GitServer,
    workspace_path: Path,
    message_recorder: MessageRecorder,
) -> None:
    """ " Scenario:
    * Create a manifest with two repos (foo and bar)
    * Initialize a workspace from this manifest
    * Push a new file to the foo repo
    * Create a merge conflict in the foo repo
    * Run `tsrc sync`
    * Check that it fails and contains the proper
      error message
    """
    git_server.add_repo("foo")
    git_server.add_repo("bar")
    manifest_url = git_server.manifest_url
    tsrc_cli.run("init", manifest_url)
    git_server.push_file("foo", "conflict.txt", contents="this is red")

    foo_src = workspace_path / "foo"
    (foo_src / "conflict.txt").write_text("this is green")

    tsrc_cli.run_and_fail("sync")

    assert message_recorder.find("Failed to synchronize workspace")
    assert message_recorder.find(r"\* foo")
Exemplo n.º 19
0
def test_happy(tsrc_cli: CLI, git_server: GitServer,
               message_recorder: MessageRecorder) -> None:
    """
    Scenario:
    * Create a manifest with two repos, foo and bar
    * Initialize a workspace from this manifest
    * Create a tag named v0.1 on foo and bar
    * Run `tsrc log --from v0.1
    """
    git_server.add_repo("foo")
    git_server.add_repo("spam")
    git_server.push_file("foo", "bar.txt", message="boring bar")
    git_server.tag("foo", "v0.1")
    git_server.tag("spam", "v0.1")
    manifest_url = git_server.manifest_url
    tsrc_cli.run("init", manifest_url)
    git_server.push_file("foo", "foo.txt", message="new foo!")
    tsrc_cli.run("sync")
    message_recorder.reset()

    tsrc_cli.run("log", "--from", "v0.1")

    assert message_recorder.find("new foo!")

    message_recorder.reset()
    tsrc_cli.run("log", "--from", "v0.1", "--to", "v0.1")
    assert not message_recorder.find("new foo!")
Exemplo n.º 20
0
def test_sha1s_are_updated_when_clean(
    tsrc_cli: CLI, git_server: GitServer, workspace_path: Path
) -> None:
    """Scenario:
    * Create a manifest with a foo repo, frozen at an initial revision
    * Initialize a workspace from this manifest
    * Push a new file to the foo repo
    * Configure the manifest so that `foo` is frozen at the new revision
    * Run `tsrc sync`
    * Check that foo has been updated to the new revision
    """
    git_server.add_repo("foo")
    initial_sha1 = git_server.get_sha1("foo")
    git_server.manifest.set_repo_sha1("foo", initial_sha1)

    tsrc_cli.run("init", git_server.manifest_url)

    git_server.push_file("foo", "new.txt")
    new_sha1 = git_server.get_sha1("foo")
    git_server.manifest.set_repo_sha1("foo", new_sha1)

    tsrc_cli.run("sync")

    foo_path = workspace_path / "foo"
    assert (
        foo_path / "new.txt"
    ).exists(), f"foo should have been updated to the {new_sha1} revision"
Exemplo n.º 21
0
def test_switching_manifest_branch(
    tsrc_cli: CLI, git_server: GitServer, workspace_path: Path
) -> None:
    """Scenario:
    * Initialize a new workspace with a manifest on the master branch
    * Create a new repo bar, on the 'devel' branch of the manifest
    * Run `tsrc sync`: bar should not get cloned
    * Configure the workspace to use the `devel` branch of the manifest
    * Run `tsrc sync` again
    * Check that bar is cloned
    """

    git_server.add_repo("foo")
    tsrc_cli.run("init", git_server.manifest_url)

    git_server.manifest.change_branch("devel")
    git_server.add_repo("bar")
    bar_path = workspace_path / "bar"

    tsrc_cli.run("sync")
    assert not bar_path.exists(), "bar should not have been cloned"

    change_workspace_manifest_branch(workspace_path, "devel")

    tsrc_cli.run("sync")
    assert bar_path.exists(), "bar should have been cloned"
Exemplo n.º 22
0
def test_sync_uses_group_from_config_by_default(
    tsrc_cli: CLI, git_server: GitServer, workspace_path: Path
) -> None:
    """Scenario:
    * Create a manifest containing:
      * a group named 'foo'  containing the repos 'bar'  and 'baz'
      * a repo named 'other' not in any group
    * Initialize a workspace from this manifest using the `foo` group
    * Check that bar and baz are cloned
    * Check that `other` is not cloned
    """
    git_server.add_group("foo", ["bar", "baz"])
    git_server.add_repo("other")

    tsrc_cli.run("init", git_server.manifest_url, "--group", "foo")

    tsrc_cli.run("sync")

    assert (
        workspace_path / "bar"
    ).exists(), "bar should have been cloned (in foo group)"
    assert (
        workspace_path / "baz"
    ).exists(), "baz should have been cloned (in foo group)"
    assert not (
        workspace_path / "other"
    ).exists(), "other should not have been cloned (not in foo group)"
Exemplo n.º 23
0
def test_copies_are_up_to_date(
    tsrc_cli: CLI, git_server: GitServer, workspace_path: Path
) -> None:
    """
    Scenario:
    * Create a manifest with one repo, foo
    * Configure a copy from foo/foo.txt to top.txt
    * Initialize a workspace from this manifest
    * Push a new version of `foo.txt` to the foo repo
    * Run `tsrc sync`
    * Check that `top.txt` has been updated

    """
    manifest_url = git_server.manifest_url
    git_server.add_repo("foo")
    git_server.push_file("foo", "foo.txt", contents="v1")
    git_server.manifest.set_file_copy("foo", "foo.txt", "top.txt")
    tsrc_cli.run("init", manifest_url)
    git_server.push_file("foo", "foo.txt", contents="v2")

    tsrc_cli.run("sync")

    assert (
        workspace_path / "top.txt"
    ).read_text() == "v2", "copy should have been updated"
    assert (workspace_path / "top.txt").read_text() == "v2"
Exemplo n.º 24
0
def test_can_set_remote_head(tmp_path: Path, git_server: GitServer) -> None:
    git_server.add_repo("foo")
    git_server.manifest.change_branch("main")
    git_server.manifest.set_head("main")

    run_git(tmp_path, "clone", git_server.manifest_url, "manifest")

    assert get_current_branch(tmp_path / "manifest") == "main"
Exemplo n.º 25
0
def test_repo_default_branch_not_master(tsrc_cli: CLI, git_server: GitServer,
                                        workspace_path: Path) -> None:
    git_server.add_repo("foo", default_branch="devel")

    tsrc_cli.run("init", git_server.manifest_url)

    foo_path = workspace_path / "foo"
    assert tsrc.git.get_current_branch(foo_path) == "devel"
Exemplo n.º 26
0
def test_init_simple(tsrc_cli: CLI, git_server: GitServer,
                     workspace_path: Path) -> None:
    git_server.add_repo("foo/bar")
    git_server.add_repo("spam/eggs")
    manifest_url = git_server.manifest_url
    tsrc_cli.run("init", manifest_url)
    assert_cloned(workspace_path, "foo/bar")
    assert_cloned(workspace_path, "spam/eggs")
Exemplo n.º 27
0
def test_clone_destination_is_a_file(tsrc_cli: CLI, git_server: GitServer,
                                     workspace_path: Path) -> None:
    manifest_url = git_server.manifest_url
    git_server.add_repo("foo")

    with (workspace_path / "foo").open("w") as f:
        f.write("this is a file")

    tsrc_cli.run_and_fail_with(ClonerError, "init", manifest_url)
Exemplo n.º 28
0
def test_sync_with_force(tsrc_cli: CLI, git_server: GitServer,
                         workspace_path: Path) -> None:
    git_server.add_repo("foo")
    git_server.push_file("foo", "latest.txt", contents="1")
    git_server.tag("foo", "latest")
    tsrc_cli.run("init", git_server.manifest_url)
    git_server.push_file("foo", "latest.txt", contents="2")
    git_server.tag("foo", "latest", force=True)
    tsrc_cli.run("sync", "--force")
Exemplo n.º 29
0
def test_no_remote_named_origin(tsrc_cli: CLI, git_server: GitServer,
                                workspace_path: Path) -> None:
    git_server.add_repo("foo")

    tsrc_cli.run("init", git_server.manifest_url)
    foo_path = workspace_path / "foo"
    tsrc.git.run(foo_path, "remote", "rename", "origin", "upstream")

    tsrc_cli.run("sync")
Exemplo n.º 30
0
def repo_path(monkeypatch: Any, git_server: GitServer, tsrc_cli: CLI,
              workspace_path: Path) -> Path:
    """ Path to a freshly cloned repository """
    git_server.add_repo("owner/project")
    manifest_url = git_server.manifest_url
    tsrc_cli.run("init", manifest_url)
    repo_path = workspace_path / "owner/project"
    monkeypatch.chdir(repo_path)
    return repo_path