package com.atlassian.stash.hosting;

import com.atlassian.bitbucket.test.ProcessResult;

import java.io.File;
import java.io.IOException;
import java.util.Optional;

public interface ScmTransport {

    void clone(File repository, String projectKey, String repositorySlug, String... options) throws IOException;

    void clone(File repository, Optional<String> namespace, String projectKey, String repositorySlug, String... options) throws IOException;

    void fetch(File repository, String projectKey, String repositorySlug, String... options) throws IOException;

    void fetch(File repository, Optional<String> namespace, String projectKey, String repositorySlug, String... options) throws IOException;

    void fetchRefSpec(File repository, String projectKey, String repositorySlug, String refSpec, String... options) throws IOException;

    void fetchRefSpec(File repository, Optional<String> namespace, String projectKey, String repositorySlug, String refSpec, String... options) throws IOException;

    void init() throws IOException;

    void pull(File repository, String projectKey, String repositorySlug, String... options) throws IOException;

    void pull(File repository, Optional<String> namespace, String projectKey, String repositorySlug, String... options) throws IOException;

    ProcessResult pushAllRefs(File repository, String projectKey, String repositorySlug, String... options) throws IOException;

    ProcessResult pushAllRefs(File repository, Optional<String> namespace, String projectKey, String repositorySlug, String... options) throws IOException;
}
