本文整理汇总了Java中jetbrains.buildServer.vcs.SelectPrevBuildPolicy类的典型用法代码示例。如果您正苦于以下问题:Java SelectPrevBuildPolicy类的具体用法?Java SelectPrevBuildPolicy怎么用?Java SelectPrevBuildPolicy使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SelectPrevBuildPolicy类属于jetbrains.buildServer.vcs包,在下文中一共展示了SelectPrevBuildPolicy类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getLastChange
import jetbrains.buildServer.vcs.SelectPrevBuildPolicy; //导入依赖的package包/类
/**
* This is a less glorious method than getListFromBuildType() but it's useful when all you need is to find the last
* change for a build. For that job, calling getListFromBuildType() would be an overkill because
* 1) it iterates the full history and this is not needed (as explained by JetBrains in
* https://devnet.jetbrains.com/message/5561032)
* 2) it also collects the changeDeltas which is more expensive (it requires that you *finish* the iteration of the
* full history - whereas finding the last change can terminate the iteration prematurely)
* @param build the build for which to find the last change
* @return the last change that went into the build
*/
static SVcsModification getLastChange(SFinishedBuild build) {
BuildPromotion buildPromotion = build.getBuildPromotion();
while (buildPromotion != null && buildPromotion.getContainingChanges().isEmpty())
buildPromotion = buildPromotion.getPreviousBuildPromotion(SelectPrevBuildPolicy.SINCE_LAST_BUILD);
if (buildPromotion == null)
return null;
return buildPromotion.getContainingChanges().get(0);
}
示例2: changesInBuild
import jetbrains.buildServer.vcs.SelectPrevBuildPolicy; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private List<? extends VcsModification> changesInBuild(Optional<? extends Build> latestBuild) {
if (latestBuild.isPresent()) {
return latestBuild.get().getChanges(SelectPrevBuildPolicy.SINCE_LAST_SUCCESSFULLY_FINISHED_BUILD, true);
} else {
return Lists.newArrayList();
}
}
示例3: getChanges
import jetbrains.buildServer.vcs.SelectPrevBuildPolicy; //导入依赖的package包/类
public List<SVcsModification> getChanges(SelectPrevBuildPolicy arg0,
boolean arg1) {
// TODO Auto-generated method stub
return null;
}
示例4: getCommitters
import jetbrains.buildServer.vcs.SelectPrevBuildPolicy; //导入依赖的package包/类
public UserSet<SUser> getCommitters(SelectPrevBuildPolicy arg0) {
// TODO Auto-generated method stub
return null;
}
示例5: getChanges
import jetbrains.buildServer.vcs.SelectPrevBuildPolicy; //导入依赖的package包/类
private List<SVcsModification> getChanges() throws Exception {
// use a linked set to avoid duplicates and to keep the changes in descending order
Set<SVcsModification> changeList = new LinkedHashSet<SVcsModification>();
BuildPromotion buildPromotion = newBuild.getBuildPromotion();
// find oldBuildchange, the changelist of oldBuild; in the while loop below, reaching oldBuildChange will be our
// terminating condition
// NB: oldBuildChange will be null if oldBuild was executed before any VCS was attached to the build
// configuration; otherwise oldBuild really should have a change associated with it
SVcsModification oldBuildChange = null;
if (oldBuild != null) {
oldBuildChange = FinishedBuildWithChanges.getLastChange(oldBuild);
}
while (true) {
if (oldBuildChange == null) {
// we are supposed to search all the way to Big Bang
if (buildPromotion == null) {
// we have reached Big Bang
return new ArrayList<SVcsModification>(changeList);
}
else {
// keep going; we haven't reached Big Bang yet
}
}
else {
// we should only go as far as oldBuildChange
if (buildPromotion == null) {
// we have reached Big Bang and never found oldBuildChange
throw new Exception("Could not find changes between " + oldBuild + " and " + newBuild);
}
else if (buildPromotion.getContainingChanges().contains(oldBuildChange)) {
// we have reached oldBuildChange
changeList.addAll(buildPromotion.getContainingChanges().subList(0, buildPromotion.getContainingChanges().indexOf(oldBuildChange)));
return new ArrayList<SVcsModification>(changeList);
}
else {
// keep going; we haven't seen oldBuildChange yet
}
}
Loggers.SERVER.debug("[SinCity] build promotion " + buildPromotion);
Loggers.SERVER.debug("[SinCity] changes " + buildPromotion.getContainingChanges());
changeList.addAll(buildPromotion.getContainingChanges());
buildPromotion = buildPromotion.getPreviousBuildPromotion(SelectPrevBuildPolicy.SINCE_LAST_BUILD);
}
}
示例6: changesInBuild
import jetbrains.buildServer.vcs.SelectPrevBuildPolicy; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private List<? extends VcsModification> changesInBuild(Build latestBuild) {
return latestBuild.getChanges(SelectPrevBuildPolicy.SINCE_LAST_SUCCESSFULLY_FINISHED_BUILD, true);
}
示例7: getChanges
import jetbrains.buildServer.vcs.SelectPrevBuildPolicy; //导入依赖的package包/类
@NotNull
@Override
public List<SVcsModification> getChanges(SelectPrevBuildPolicy selectPrevBuildPolicy, boolean b) {
return null;
}
示例8: getCommitters
import jetbrains.buildServer.vcs.SelectPrevBuildPolicy; //导入依赖的package包/类
@Override
public UserSet<SUser> getCommitters(SelectPrevBuildPolicy selectPrevBuildPolicy) {
return null;
}
示例9: getBuildChanges
import jetbrains.buildServer.vcs.SelectPrevBuildPolicy; //导入依赖的package包/类
public List<SVcsModification> getBuildChanges() {
buildInfo.getChanges(SelectPrevBuildPolicy.SINCE_LAST_BUILD, true);
return buildInfo.getContainingChanges();
}