Search in sources :

Example 1 with TfsScmProviderRepository

use of org.apache.maven.scm.provider.tfs.TfsScmProviderRepository in project maven-scm by apache.

the class TfsTagCommand method createCommand.

public TfsCommand createCommand(ScmProviderRepository r, ScmFileSet f, String tag, ScmTagParameters scmTagParameters) {
    TfsScmProviderRepository tfsRepo = (TfsScmProviderRepository) r;
    String url = tfsRepo.getServerPath();
    TfsCommand command = new TfsCommand("label", r, f, getLogger());
    command.addArgument(tag);
    command.addArgument(url);
    command.addArgument("-recursive");
    command.addArgument("-child:replace");
    String message = scmTagParameters.getMessage();
    if (message != null && !message.equals("")) {
        command.addArgument("-comment:" + message);
    }
    return command;
}
Also used : TfsScmProviderRepository(org.apache.maven.scm.provider.tfs.TfsScmProviderRepository)

Example 2 with TfsScmProviderRepository

use of org.apache.maven.scm.provider.tfs.TfsScmProviderRepository in project maven-scm by apache.

the class TfsCheckInCommand method createCommand.

public TfsCommand createCommand(ScmProviderRepository r, ScmFileSet f, String m) {
    TfsCommand command = new TfsCommand("checkin", r, f, getLogger());
    command.addArgument("-noprompt");
    if (StringUtils.isNotBlank(m)) {
        command.addArgument("-comment:" + m);
    }
    command.addArgument(f);
    TfsScmProviderRepository tfsScmProviderRepo = (TfsScmProviderRepository) r;
    if (tfsScmProviderRepo.isUseCheckinPolicies()) {
        // handle TFS-policies (by adding "/override:";Auto-Build: Version Update";)
        command.addArgument("/override:checkin_policy");
    }
    return command;
}
Also used : TfsScmProviderRepository(org.apache.maven.scm.provider.tfs.TfsScmProviderRepository)

Example 3 with TfsScmProviderRepository

use of org.apache.maven.scm.provider.tfs.TfsScmProviderRepository in project maven-scm by apache.

the class TfsUnEditCommandTest method testCommandline.

public void testCommandline() throws Exception {
    TfsScmProviderRepository repo = getScmProviderRepository();
    Commandline cmd = new TfsUnEditCommand().createCommand(repo, getScmFileSet()).getCommandline();
    String expected = "tf undo -login:user,password " + getFileList();
    assertCommandLine(expected, getWorkingDirectory(), cmd);
}
Also used : Commandline(org.codehaus.plexus.util.cli.Commandline) TfsScmProviderRepository(org.apache.maven.scm.provider.tfs.TfsScmProviderRepository)

Example 4 with TfsScmProviderRepository

use of org.apache.maven.scm.provider.tfs.TfsScmProviderRepository in project maven-scm by apache.

the class TfsEditCommandTest method testCommandline.

public void testCommandline() throws Exception {
    TfsScmProviderRepository repo = getScmProviderRepository();
    Commandline cmd = new TfsEditCommand().createCommand(repo, getScmFileSet()).getCommandline();
    String expected = "tf checkout -login:user,password " + getFileList();
    assertCommandLine(expected, getWorkingDirectory(), cmd);
}
Also used : Commandline(org.codehaus.plexus.util.cli.Commandline) TfsScmProviderRepository(org.apache.maven.scm.provider.tfs.TfsScmProviderRepository)

Example 5 with TfsScmProviderRepository

use of org.apache.maven.scm.provider.tfs.TfsScmProviderRepository in project maven-scm by apache.

the class TfsBranchCommandTest method testCommandline.

public void testCommandline() throws Exception {
    TfsScmProviderRepository repo = getScmProviderRepository();
    Commandline cmd = new TfsBranchCommand().createCommand(repo, getScmFileSet(), "branch").getCommandline();
    String serverPath = "serverpath";
    String expected = "tf branch -login:user,password " + serverPath + " -checkin branch";
    assertCommandLine(expected, getWorkingDirectory(), cmd);
}
Also used : Commandline(org.codehaus.plexus.util.cli.Commandline) TfsScmProviderRepository(org.apache.maven.scm.provider.tfs.TfsScmProviderRepository)

Aggregations

TfsScmProviderRepository (org.apache.maven.scm.provider.tfs.TfsScmProviderRepository)16 Commandline (org.codehaus.plexus.util.cli.Commandline)11 ErrorStreamConsumer (org.apache.maven.scm.provider.tfs.command.consumer.ErrorStreamConsumer)3 ScmFile (org.apache.maven.scm.ScmFile)2 ScmRevision (org.apache.maven.scm.ScmRevision)2 File (java.io.File)1 ScmTagParameters (org.apache.maven.scm.ScmTagParameters)1 CheckOutScmResult (org.apache.maven.scm.command.checkout.CheckOutScmResult)1 StatusScmResult (org.apache.maven.scm.command.status.StatusScmResult)1 ChangedFileConsumer (org.apache.maven.scm.provider.tfs.command.consumer.ChangedFileConsumer)1 FileListConsumer (org.apache.maven.scm.provider.tfs.command.consumer.FileListConsumer)1