Fix deprecation warnings from latest JGit update
- FS is no longer required for LockFile constructor. - TestRepository#getClock was renamed getDate. - Replace usages of RefDatabase#getRef with either exactRef, when we know we can bypass the full lookup path, or findRef, where the input is user-provided and we might need to add an implicit prefix. Change-Id: I6309b91ccf99ffaa724be273ddae0d9857b825f9
This commit is contained in:
@@ -102,7 +102,7 @@ public class AccountIT extends AbstractDaemonTest {
|
||||
@After
|
||||
public void clearPublicKeyStore() throws Exception {
|
||||
try (Repository repo = repoManager.openRepository(allUsers)) {
|
||||
Ref ref = repo.getRef(REFS_GPG_KEYS);
|
||||
Ref ref = repo.exactRef(REFS_GPG_KEYS);
|
||||
if (ref != null) {
|
||||
RefUpdate ru = repo.updateRef(REFS_GPG_KEYS);
|
||||
ru.setForceUpdate(true);
|
||||
|
||||
@@ -106,7 +106,7 @@ public class ChangeIT extends AbstractDaemonTest {
|
||||
gApi.changes().id(changeId).get();
|
||||
|
||||
BranchInput b = new BranchInput();
|
||||
b.revision = repo().getRef("HEAD").getObjectId().name();
|
||||
b.revision = repo().exactRef("HEAD").getObjectId().name();
|
||||
gApi.projects()
|
||||
.name(project.get())
|
||||
.branch("other")
|
||||
|
||||
@@ -377,7 +377,7 @@ public class RevisionIT extends AbstractDaemonTest {
|
||||
|
||||
@Test
|
||||
public void mergeable() throws Exception {
|
||||
ObjectId initial = repo().getRef(HEAD).getLeaf().getObjectId();
|
||||
ObjectId initial = repo().exactRef(HEAD).getLeaf().getObjectId();
|
||||
|
||||
PushOneCommit push1 =
|
||||
pushFactory.create(db, admin.getIdent(), testRepo, PushOneCommit.SUBJECT,
|
||||
|
||||
Reference in New Issue
Block a user