Merged in bugfix/read_vcs_versions (pull request #178)

Fix class loader for creation of vcs version string
This commit is contained in:
Mohamed Karray
2019-02-06 09:04:04 +00:00
9 changed files with 26 additions and 16 deletions

View File

@@ -44,6 +44,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import sonia.scm.SCMContextProvider;
import sonia.scm.plugin.Extension;
import sonia.scm.plugin.PluginLoader;
import sonia.scm.repository.spi.GitRepositoryServiceProvider;
import sonia.scm.schedule.Scheduler;
import sonia.scm.schedule.Task;
@@ -103,9 +104,10 @@ public class GitRepositoryHandler
public GitRepositoryHandler(ConfigurationStoreFactory storeFactory,
Scheduler scheduler,
RepositoryLocationResolver repositoryLocationResolver,
GitWorkdirFactory workdirFactory)
GitWorkdirFactory workdirFactory,
PluginLoader pluginLoader)
{
super(storeFactory, repositoryLocationResolver);
super(storeFactory, repositoryLocationResolver, pluginLoader);
this.scheduler = scheduler;
this.workdirFactory = workdirFactory;
}

View File

@@ -94,7 +94,7 @@ public class GitRepositoryHandlerTest extends SimpleRepositoryHandlerTestBase {
RepositoryLocationResolver locationResolver,
File directory) {
GitRepositoryHandler repositoryHandler = new GitRepositoryHandler(factory,
scheduler, locationResolver, gitWorkdirFactory);
scheduler, locationResolver, gitWorkdirFactory, null);
repositoryHandler.init(contextProvider);
GitConfig config = new GitConfig();
@@ -108,7 +108,7 @@ public class GitRepositoryHandlerTest extends SimpleRepositoryHandlerTestBase {
@Test
public void getDirectory() {
GitRepositoryHandler repositoryHandler = new GitRepositoryHandler(factory,
scheduler, locationResolver, gitWorkdirFactory);
scheduler, locationResolver, gitWorkdirFactory, null);
GitConfig config = new GitConfig();
config.setDisabled(false);
config.setGcExpression("gc exp");