Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Keppler2018-10-16 17:17:36 +0000
committerMichael Keppler2018-11-21 09:32:06 +0000
commit5f2871d24fcbe3f6c618d009b85d83b508d2c91e (patch)
treec84d5693bab30ddaba47c219073f32dae44331f0 /org.eclipse.egit.ui.test/src/org
parentc0ec915e73313c04f6bdd9fd7030abddae00b587 (diff)
downloadegit-5f2871d24fcbe3f6c618d009b85d83b508d2c91e.tar.gz
egit-5f2871d24fcbe3f6c618d009b85d83b508d2c91e.tar.xz
egit-5f2871d24fcbe3f6c618d009b85d83b508d2c91e.zip
Remove deprecated Repository.getAllRefs() calls
Inline the code of the deprecated method at all places where it was called in egit. Also fix some typos around the deprecated calls. Change-Id: I388fca20b66356fbf61096e8557cf535c7ecd3b0 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
Diffstat (limited to 'org.eclipse.egit.ui.test/src/org')
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/clone/GitCloneWizardTest.java8
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/clone/GitCloneWizardTestBase.java4
2 files changed, 8 insertions, 4 deletions
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/clone/GitCloneWizardTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/clone/GitCloneWizardTest.java
index cb1258ef5a..f7b4a4ff99 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/clone/GitCloneWizardTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/clone/GitCloneWizardTest.java
@@ -26,6 +26,7 @@ import org.eclipse.egit.ui.common.RepoRemoteBranchesPage;
import org.eclipse.egit.ui.common.WorkingCopyPage;
import org.eclipse.egit.ui.internal.UIText;
import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.lib.RefDatabase;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.storage.file.FileRepositoryBuilder;
import org.eclipse.osgi.util.NLS;
@@ -259,11 +260,12 @@ public class GitCloneWizardTest extends GitCloneWizardTestBase {
// A well known tag
assertNotNull(repository.resolve(Constants.R_TAGS + SampleTestRepository.v2_0_name).name());
// lots of refs
- assertTrue(repository.getAllRefs().size() >= 4);
+ assertTrue(repository.getRefDatabase().getRefsByPrefix(RefDatabase.ALL)
+ .size() >= 4);
bot.button("Cancel").click();
}
- // TODO network timeouts seem to be longer on cental EGit build
+ // TODO network timeouts seem to be longer on central EGit build
// Test is ignored to fix the build
@Ignore
@Test
@@ -280,7 +282,7 @@ public class GitCloneWizardTest extends GitCloneWizardTestBase {
remoteBranches.cancel();
}
- // TODO network timeouts seem to be longer on cental EGit build
+ // TODO network timeouts seem to be longer on central EGit build
// Test is ignored to fix the build
@Ignore
@Test
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/clone/GitCloneWizardTestBase.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/clone/GitCloneWizardTestBase.java
index fdc4e22b13..dc89cdebf6 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/clone/GitCloneWizardTestBase.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/clone/GitCloneWizardTestBase.java
@@ -31,6 +31,7 @@ import org.eclipse.equinox.internal.security.storage.friends.IStorageConstants;
import org.eclipse.jgit.dircache.DirCache;
import org.eclipse.jgit.dircache.DirCacheEntry;
import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.lib.RefDatabase;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.storage.file.FileRepositoryBuilder;
import org.eclipse.jgit.util.FileUtils;
@@ -86,7 +87,8 @@ public abstract class GitCloneWizardTestBase extends LocalRepositoryTestCase {
assertNotNull(repository.resolve(
Constants.R_TAGS + SampleTestRepository.v1_0_name).name());
// lots of refs
- int refs = repository.getAllRefs().size();
+ int refs = repository.getRefDatabase().getRefsByPrefix(RefDatabase.ALL)
+ .size();
assertTrue(refs >= 4);
// and a known file in the working dir
assertTrue(new File(destinationRepo, SampleTestRepository.A_txt_name)

Back to the top