use of org.apache.maven.scm.command.tag.TagScmResult in project maven-scm by apache.
the class StarteamScmProvider method tag.
/**
* {@inheritDoc}
*/
public TagScmResult tag(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException {
fileSet = fixUpScmFileSetAbsoluteFilePath(fileSet);
StarteamTagCommand command = new StarteamTagCommand();
command.setLogger(getLogger());
return (TagScmResult) command.execute(repository, fileSet, parameters);
}
use of org.apache.maven.scm.command.tag.TagScmResult in project maven-scm by apache.
the class AccuRevTagCommandTest method testTag.
@Test
public void testTag() throws Exception {
final ScmFileSet testFileSet = new ScmFileSet(new File("/my/workspace/project/dir"));
final File basedir = testFileSet.getBasedir();
final String basisStream = "basisStream";
final AccuRevInfo info = new AccuRevInfo(basedir);
info.setBasis(basisStream);
AccuRevScmProviderRepository repo = new AccuRevScmProviderRepository();
repo.setStreamName("myStream");
repo.setAccuRev(accurev);
repo.setProjectPath("/project/dir");
when(accurev.info(basedir)).thenReturn(info);
when(accurev.mksnap("theTagName", basisStream)).thenReturn(Boolean.TRUE);
List<File> taggedFiles = Collections.singletonList(new File("tagged/file"));
when(accurev.statTag("theTagName")).thenReturn(taggedFiles);
AccuRevTagCommand command = new AccuRevTagCommand(getLogger());
CommandParameters commandParameters = new CommandParameters();
commandParameters.setString(CommandParameter.TAG_NAME, "theTagName");
TagScmResult result = command.tag(repo, testFileSet, commandParameters);
assertThat(result.isSuccess(), is(true));
assertThat(result.getTaggedFiles().size(), is(1));
assertHasScmFile(result.getTaggedFiles(), "tagged/file", ScmFileStatus.TAGGED);
}
use of org.apache.maven.scm.command.tag.TagScmResult in project maven-scm by apache.
the class AccuRevTagCommandTckTest method testReleasePluginStyleTagThenCheckout.
@SuppressWarnings("deprecation")
@Test
public void testReleasePluginStyleTagThenCheckout() throws Exception {
String tag = "test-tag";
makeFile(getWorkingCopy(), ".acignore", "target/*\ntarget\n");
ScmRepository scmRepository = getScmRepository();
addToWorkingTree(getWorkingCopy(), new File(".acignore"), scmRepository);
CheckInScmResult checkinResult = getScmManager().checkIn(scmRepository, new ScmFileSet(getWorkingCopy()), "add acignore");
assertResultIsSuccess(checkinResult);
TagScmResult tagResult = getScmManager().getProviderByUrl(getScmUrl()).tag(scmRepository, new ScmFileSet(getWorkingCopy()), tag);
assertResultIsSuccess(tagResult);
scmRepository.getProviderRepository().setPersistCheckout(false);
CheckOutScmResult checkoutResult = getScmManager().checkOut(scmRepository, new ScmFileSet(new File(getWorkingCopy(), "target/checkout")), new ScmTag(tag));
assertResultIsSuccess(checkoutResult);
}
use of org.apache.maven.scm.command.tag.TagScmResult in project maven-scm by apache.
the class BazaarScmProvider method tag.
/**
* {@inheritDoc}
*/
public TagScmResult tag(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException {
BazaarTagCommand command = new BazaarTagCommand();
command.setLogger(getLogger());
return (TagScmResult) command.execute(repository, fileSet, parameters);
}
use of org.apache.maven.scm.command.tag.TagScmResult in project maven-scm by apache.
the class VssScmProvider method tag.
public TagScmResult tag(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException {
VssTagCommand command = new VssTagCommand();
command.setLogger(getLogger());
return (TagScmResult) command.execute(repository, fileSet, parameters);
}
Aggregations