- Mark PathBasedRepositoryLocationResolver as singleton so that other
  users will get the same instance and will not overwrite the paths
  set by migration.
- Set path kept by InlineMigrationStrategy in location resolver to
  store the path.
- Add logging
- Add type of repository to migration web page
This commit is contained in:
René Pfeuffer
2019-06-05 08:21:37 +02:00
parent b253cd110d
commit e52518a12b
11 changed files with 93 additions and 17 deletions

View File

@@ -1,7 +1,6 @@
package sonia.scm;
import sonia.scm.repository.BasicRepositoryLocationResolver;
import sonia.scm.repository.RepositoryLocationResolver;
import java.io.File;
import java.nio.file.Path;
@@ -16,6 +15,16 @@ public class TempDirRepositoryLocationResolver extends BasicRepositoryLocationRe
@Override
protected <T> RepositoryLocationResolverInstance<T> create(Class<T> type) {
return repositoryId -> (T) tempDirectory.toPath();
return new RepositoryLocationResolverInstance<T>() {
@Override
public T getLocation(String repositoryId) {
return (T) tempDirectory.toPath();
}
@Override
public void setLocation(String repositoryId, T location) {
throw new UnsupportedOperationException("not implemented for tests");
}
};
}
}