small fixes

This commit is contained in:
Eduard Heimbuch
2019-10-08 15:46:56 +02:00
parent 76c7821ed2
commit 416eccacc8
4 changed files with 11 additions and 24 deletions

View File

@@ -92,7 +92,7 @@ public class HgModifyCommand implements ModifyCommand {
return pullCommand.execute(workingCopy.getDirectory().getAbsolutePath());
} catch (Exception e) {
throw new IntegrateChangesFromWorkdirException(context.getScmRepository(),
String.format("Could not pull modify changes from working copy to central repository", request.getBranch()),
String.format("Could not pull modify changes from working copy to central repository for branch %s", request.getBranch()),
e);
}
}

View File

@@ -78,11 +78,10 @@ public class HgRepositoryServiceProvider extends RepositoryServiceProvider
//~--- constructors ---------------------------------------------------------
HgRepositoryServiceProvider(HgRepositoryHandler handler,
HgHookManager hookManager, Repository repository, HgWorkdirFactory workdirFactory)
HgHookManager hookManager, Repository repository)
{
this.repository = repository;
this.handler = handler;
this.workdirFactory = workdirFactory;
this.repositoryDirectory = handler.getDirectory(repository.getId());
this.context = new HgCommandContext(hookManager, handler, repository,
repositoryDirectory);
@@ -294,6 +293,4 @@ public class HgRepositoryServiceProvider extends RepositoryServiceProvider
/** Field description */
private File repositoryDirectory;
private final HgWorkdirFactory workdirFactory;
}

View File

@@ -49,15 +49,13 @@ public class HgRepositoryServiceResolver implements RepositoryServiceResolver
private final HgRepositoryHandler handler;
private final HgHookManager hookManager;
private final HgWorkdirFactory workdirFactory;
@Inject
public HgRepositoryServiceResolver(HgRepositoryHandler handler,
HgHookManager hookManager, HgWorkdirFactory workdirFactory)
HgHookManager hookManager)
{
this.handler = handler;
this.hookManager = hookManager;
this.workdirFactory = workdirFactory;
}
@Override
@@ -65,7 +63,7 @@ public class HgRepositoryServiceResolver implements RepositoryServiceResolver
HgRepositoryServiceProvider provider = null;
if (HgRepositoryHandler.TYPE_NAME.equalsIgnoreCase(repository.getType())) {
provider = new HgRepositoryServiceProvider(handler, hookManager, repository, workdirFactory);
provider = new HgRepositoryServiceProvider(handler, hookManager, repository);
}
return provider;