mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-18 03:01:05 +01:00
Store repository id in git config for each repository
This is needed after migration from v1 to v2 and is done in GitV1UpdateStep.java. Therefore we hat to make the 'forAllPaths' method in PathBasedRepositoryLocationResolver available in the interface of RepositoryLocationResolver.
This commit is contained in:
@@ -4,6 +4,7 @@ import sonia.scm.repository.BasicRepositoryLocationResolver;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.file.Path;
|
||||
import java.util.function.BiConsumer;
|
||||
|
||||
public class TempDirRepositoryLocationResolver extends BasicRepositoryLocationResolver {
|
||||
private final File tempDirectory;
|
||||
@@ -30,6 +31,11 @@ public class TempDirRepositoryLocationResolver extends BasicRepositoryLocationRe
|
||||
public void setLocation(String repositoryId, T location) {
|
||||
throw new UnsupportedOperationException("not implemented for tests");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void forAllLocations(BiConsumer<String, T> consumer) {
|
||||
consumer.accept("id", (T) tempDirectory.toPath());
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user