Remove GitRepositoryManager#openMetadataRepository
We were originally going to use this for a less-risky migration of googlesource.com data. Our current migration plan no longer calls for this, so let's get rid of the complexity. As far as LocalDiskRepositoryManager goes, we don't expect anybody to need to enable this before we feel pretty good about the behavior in the same repo. Change-Id: I99c7218a190d634ff31e8293f592f75f47a50724
This commit is contained in:
@@ -160,7 +160,7 @@ public class RepoSequenceTest {
|
||||
|
||||
@Test
|
||||
public void failOnWrongType() throws Exception {
|
||||
try (Repository repo = repoManager.openMetadataRepository(project)) {
|
||||
try (Repository repo = repoManager.openRepository(project)) {
|
||||
TestRepository<Repository> tr = new TestRepository<>(repo);
|
||||
tr.branch(RefNames.REFS_SEQUENCES + "id").commit().create();
|
||||
try {
|
||||
@@ -206,7 +206,7 @@ public class RepoSequenceTest {
|
||||
|
||||
private ObjectId writeBlob(String sequenceName, String value) {
|
||||
String refName = RefNames.REFS_SEQUENCES + sequenceName;
|
||||
try (Repository repo = repoManager.openMetadataRepository(project);
|
||||
try (Repository repo = repoManager.openRepository(project);
|
||||
ObjectInserter ins = repo.newObjectInserter()) {
|
||||
ObjectId newId = ins.insert(OBJ_BLOB, value.getBytes(UTF_8));
|
||||
ins.flush();
|
||||
@@ -222,7 +222,7 @@ public class RepoSequenceTest {
|
||||
|
||||
private String readBlob(String sequenceName) throws Exception {
|
||||
String refName = RefNames.REFS_SEQUENCES + sequenceName;
|
||||
try (Repository repo = repoManager.openMetadataRepository(project);
|
||||
try (Repository repo = repoManager.openRepository(project);
|
||||
RevWalk rw = new RevWalk(repo)) {
|
||||
ObjectId id = repo.exactRef(refName).getObjectId();
|
||||
return new String(rw.getObjectReader().open(id).getCachedBytes(), UTF_8);
|
||||
|
Reference in New Issue
Block a user