use of org.apache.maven.scm.ScmRevision in project maven-scm by apache.
the class SvnCheckOutCommandTest method testCommandLine.
// ----------------------------------------------------------------------
//
// ----------------------------------------------------------------------
private void testCommandLine(ScmManager scmManager, String scmUrl, String revision, String commandLine) throws Exception {
ScmRepository repository = scmManager.makeScmRepository(scmUrl);
SvnScmProviderRepository svnRepository = (SvnScmProviderRepository) repository.getProviderRepository();
Commandline cl = cl = SvnCheckOutCommand.createCommandLine(svnRepository, workingDirectory, new ScmRevision(revision), svnRepository.getUrl(), recursive);
assertCommandLine(commandLine, workingDirectory.getParentFile(), cl);
}
use of org.apache.maven.scm.ScmRevision in project maven-scm by apache.
the class StarteamCheckInCommandTest method testGetCommandLineWithWorkingDirectory.
public void testGetCommandLineWithWorkingDirectory() throws Exception {
ScmFileSet fileSet = new ScmFileSet(getWorkingCopy());
String workingCopy = StarteamCommandLineUtils.toJavaPath(getWorkingCopy().getPath());
String starteamUrl = "user:password@host:1234/project/view";
String mavenUrl = "scm:starteam:" + starteamUrl;
String expectedCmd = "stcmd ci -x -nologo -stop" + " -p " + starteamUrl + " -fp " + workingCopy + " -is -f NCI -eol on";
testCommandLine(mavenUrl, fileSet, "", new ScmRevision(""), "", "", expectedCmd);
}
use of org.apache.maven.scm.ScmRevision in project maven-scm by apache.
the class StarteamCheckInCommandTest method testGetCommandLineWithEmptyIssueValue.
public void testGetCommandLineWithEmptyIssueValue() throws Exception {
ScmFileSet fileSet = new ScmFileSet(getWorkingCopy(), new File("test.txt"));
String workingCopy = StarteamCommandLineUtils.toJavaPath(getWorkingCopy().getPath());
String starteamUrl = "user:password@host:1234/project/view";
String mavenUrl = "scm:starteam:" + starteamUrl;
String expectedCmd = "stcmd ci -x -nologo -stop" + " -p " + starteamUrl + " -fp " + workingCopy + " -active -eol on test.txt";
testCommandLine(mavenUrl, fileSet, null, new ScmRevision(""), "active", " ", expectedCmd);
}
use of org.apache.maven.scm.ScmRevision in project maven-scm by apache.
the class StarteamCheckInCommandTest method testGetCommandLineWithDirInWorkingDirectory.
public void testGetCommandLineWithDirInWorkingDirectory() throws Exception {
// physically create dir so that cmd can be generated correctly
new File(getWorkingCopy(), "src").mkdirs();
ScmFileSet fileSet = new ScmFileSet(getWorkingCopy(), new File("src"));
String workingCopy = StarteamCommandLineUtils.toJavaPath(getWorkingCopy().getPath());
String starteamUrl = "user:password@host:1234/project/view";
String mavenUrl = "scm:starteam:" + starteamUrl;
String expectedCmd = "stcmd ci -x -nologo -stop" + " -p " + starteamUrl + "/src" + " -fp " + workingCopy + "/src" + " -is -f NCI -eol on";
testCommandLine(mavenUrl, fileSet, "", new ScmRevision(""), "", "", expectedCmd);
}
use of org.apache.maven.scm.ScmRevision in project maven-scm by apache.
the class StarteamCheckInCommandTest method testGetCommandLineWithFileOnRoot.
public void testGetCommandLineWithFileOnRoot() throws Exception {
ScmFileSet fileSet = new ScmFileSet(getWorkingCopy(), new File("test.txt"));
String workingCopy = StarteamCommandLineUtils.toJavaPath(getWorkingCopy().getPath());
String starteamUrl = "user:password@host:1234/project/view";
String mavenUrl = "scm:starteam:" + starteamUrl;
String expectedCmd = "stcmd ci -x -nologo -stop" + " -p " + starteamUrl + " -fp " + workingCopy + " -eol on test.txt";
testCommandLine(mavenUrl, fileSet, "", new ScmRevision(""), "", "", expectedCmd);
}
Aggregations