forked from Praqma/pretested-integration-plugin
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a bug that prevented repository walking when used on a remote machine. This broke builds on all slaves.
- Loading branch information
1 parent
97713c7
commit 38f8335
Showing
6 changed files
with
77 additions
and
215 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...in/java/org/jenkinsci/plugins/pretestedintegration/scm/git/FindCommitMessageCallback.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* To change this license header, choose License Headers in Project Properties. | ||
* To change this template file, choose Tools | Templates | ||
* and open the template in the editor. | ||
*/ | ||
package org.jenkinsci.plugins.pretestedintegration.scm.git; | ||
|
||
import hudson.model.TaskListener; | ||
import hudson.remoting.VirtualChannel; | ||
import java.io.IOException; | ||
import org.eclipse.jgit.lib.ObjectId; | ||
import org.eclipse.jgit.lib.Repository; | ||
import org.eclipse.jgit.revwalk.RevCommit; | ||
import org.eclipse.jgit.revwalk.RevWalk; | ||
|
||
/** | ||
* | ||
* @author Mads | ||
* | ||
* Used in con | ||
*/ | ||
public class FindCommitMessageCallback extends RepositoryListenerAwareCallback<String> { | ||
|
||
public final ObjectId id; | ||
|
||
public FindCommitMessageCallback(TaskListener listener, final ObjectId id) { | ||
super(listener); | ||
this.id = id; | ||
} | ||
|
||
@Override | ||
public String invoke(Repository repo, VirtualChannel channel) throws IOException, InterruptedException { | ||
RevWalk walk = new RevWalk(repo); | ||
RevCommit commit = walk.parseCommit(id); | ||
walk.dispose(); | ||
return commit.getFullMessage(); | ||
} | ||
} |
57 changes: 0 additions & 57 deletions
57
src/main/java/org/jenkinsci/plugins/pretestedintegration/scm/git/GitUtils.java
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
...a/org/jenkinsci/plugins/pretestedintegration/scm/git/RepositoryListenerAwareCallback.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* To change this license header, choose License Headers in Project Properties. | ||
* To change this template file, choose Tools | Templates | ||
* and open the template in the editor. | ||
*/ | ||
package org.jenkinsci.plugins.pretestedintegration.scm.git; | ||
|
||
import hudson.model.TaskListener; | ||
import hudson.remoting.VirtualChannel; | ||
import java.io.IOException; | ||
import org.eclipse.jgit.lib.Repository; | ||
import org.jenkinsci.plugins.gitclient.RepositoryCallback; | ||
|
||
/** | ||
* | ||
* @author Mads | ||
*/ | ||
public abstract class RepositoryListenerAwareCallback<T> implements RepositoryCallback<T> { | ||
|
||
public final TaskListener listener; | ||
|
||
public RepositoryListenerAwareCallback(TaskListener listener) { | ||
this.listener = listener; | ||
} | ||
|
||
public abstract T invoke(Repository repo, VirtualChannel channel) throws IOException, InterruptedException; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
154 changes: 0 additions & 154 deletions
154
src/test/java/org/jenkinsci/plugins/pretestedintegration/unit/scm/git/GitUtilsTest.java
This file was deleted.
Oops, something went wrong.