Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Review JENKINS-25546
  • Loading branch information
MadsNielsen authored and Bue Petersen committed Dec 7, 2014
1 parent ba9e785 commit c9e2801
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Expand Up @@ -14,7 +14,7 @@
public class UnsupportedConfigurationException extends IOException {

public static final String ILLEGAL_CONFIG_NO_REPO_NAME_DEFINED = String.format("You have multiple git repositories defined, but none of them matches your pretested integration repostiory. If using more than 1 repository, remotes must be explicitly named in the Git configuration");
public static final String AMBIGUIUTY_IN_REMOTE_NAMES = "Ambiguity detected in remote names. Please correct your git scm configuration";
public static final String AMBIGUIUTY_IN_REMOTE_NAMES = "You have multiple git repositories defined, and more than one have the same name (or defaults to the same name). Pretested Integration is unable to select the correct one.";

public UnsupportedConfigurationException(String message) {
super(message);
Expand Down
Expand Up @@ -252,9 +252,10 @@ public void isApplicable(AbstractBuild<?, ?> build, BuildListener listener) thro

//If no build data was contributed
if(bdata.isEmpty()) {
throw new NothingToDoException("Not triggered by Git");
throw new NothingToDoException("SCM change is not from Git");
}

//Get the build data...TODO: what about multiple-scm's. We need to select the correct one (The one that started the build)
BuildData gitBuildData = build.getAction(BuildData.class);

//Check to make sure that we do ONLY integrate to the branches specified.
Expand All @@ -268,6 +269,8 @@ public void isApplicable(AbstractBuild<?, ?> build, BuildListener listener) thro
public void deleteIntegratedBranch(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws DeleteIntegratedBranchException {
logger.entering("GitBridge", "deleteIntegratedBranch", new Object[] { build, listener, launcher });// Generated code DONT TOUCH! Bookmark: 111eed322ec80cb71cbb9dbb4ec42bac
BuildData gitBuildData = build.getAction(BuildData.class);

//At this point in time the lastBuild is also the latests. So thats what we use
Branch gitDataBranch = gitBuildData.lastBuild.revision.getBranches().iterator().next();
ByteArrayOutputStream out = new ByteArrayOutputStream();
int delRemote = -99999;
Expand Down

0 comments on commit c9e2801

Please sign in to comment.