mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-01-01 21:29:47 +01:00
merge
This commit is contained in:
@@ -121,7 +121,7 @@ public class GitGcTask implements Runnable {
|
||||
}
|
||||
|
||||
private void gc(Repository repository){
|
||||
File file = repositoryHandler.getDirectory(repository);
|
||||
File file = repositoryHandler.getDirectory(repository.getId());
|
||||
Git git = null;
|
||||
try {
|
||||
git = open(file);
|
||||
|
||||
@@ -119,7 +119,7 @@ public abstract class AbstractGitIncomingOutgoingCommand
|
||||
|
||||
Git git = Git.wrap(open());
|
||||
|
||||
GitUtil.fetch(git, handler.getDirectory(remoteRepository), remoteRepository);
|
||||
GitUtil.fetch(git, handler.getDirectory(remoteRepository.getId()), remoteRepository);
|
||||
|
||||
ObjectId localId = getDefaultBranch(git.getRepository());
|
||||
ObjectId remoteId = null;
|
||||
|
||||
@@ -196,7 +196,7 @@ public abstract class AbstractGitPushOrPullCommand extends AbstractGitCommand
|
||||
*/
|
||||
protected String getRemoteUrl(sonia.scm.repository.Repository repository)
|
||||
{
|
||||
return getRemoteUrl(handler.getDirectory(repository));
|
||||
return getRemoteUrl(handler.getDirectory(repository.getId()));
|
||||
}
|
||||
|
||||
//~--- methods --------------------------------------------------------------
|
||||
|
||||
@@ -196,12 +196,12 @@ public class GitPullCommand extends AbstractGitPushOrPullCommand
|
||||
private PullResponse pullFromScmRepository(Repository sourceRepository)
|
||||
throws IOException
|
||||
{
|
||||
File sourceDirectory = handler.getDirectory(sourceRepository);
|
||||
File sourceDirectory = handler.getDirectory(sourceRepository.getId());
|
||||
|
||||
Preconditions.checkArgument(sourceDirectory.exists(),
|
||||
"source repository directory does not exists");
|
||||
|
||||
File targetDirectory = handler.getDirectory(repository);
|
||||
File targetDirectory = handler.getDirectory(repository.getId());
|
||||
|
||||
Preconditions.checkArgument(sourceDirectory.exists(),
|
||||
"target repository directory does not exists");
|
||||
|
||||
@@ -73,7 +73,7 @@ public class GitRepositoryServiceProvider extends RepositoryServiceProvider
|
||||
public GitRepositoryServiceProvider(GitRepositoryHandler handler, Repository repository) {
|
||||
this.handler = handler;
|
||||
this.repository = repository;
|
||||
this.context = new GitContext(handler.getDirectory(repository), repository);
|
||||
this.context = new GitContext(handler.getDirectory(repository.getId()), repository);
|
||||
}
|
||||
|
||||
//~--- methods --------------------------------------------------------------
|
||||
|
||||
@@ -106,7 +106,7 @@ public class GitRepositoryResolver implements RepositoryResolver<HttpServletRequ
|
||||
|
||||
if (config.isValid())
|
||||
{
|
||||
File gitdir = handler.getDirectory(repo);
|
||||
File gitdir = handler.getDirectory(repo.getId());
|
||||
if (gitdir == null) {
|
||||
throw new RepositoryNotFoundException(repositoryName);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user