Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2017-08-31 04:55:17 -0400
committerThomas Wolf2017-09-26 02:36:58 -0400
commit267a3261e56b87dce748edeaa9317721f8206479 (patch)
treebd40c2c30b88a7b9da32503352515998b6fd3004 /org.eclipse.egit.core.test/src
parent6a6d4ec1409c32f4c41d8eb96773a5a2a131097a (diff)
downloadegit-267a3261e56b87dce748edeaa9317721f8206479.tar.gz
egit-267a3261e56b87dce748edeaa9317721f8206479.tar.xz
egit-267a3261e56b87dce748edeaa9317721f8206479.zip
Partially revert "Remove repository from ListRemoteOperation"
This reverts commit f5264cfabfb2f921304536f4471bff469d9ba546. The repository, if available, provides additional context for running the ls-remote operation, such as http.* configuration settings in the repository config. Thus when we do have a repository, we should use it. Keep the good bits from commit f5264cf: add a new constructor to ListRemoteOperation that can work without repository, and use it in SourceBranchPage instead of creating an empty dummy repository (which may fail) there. Same in LocalRepositoryTestCase. Additionally remove the now unused message about not being able to create a temporary repository. Change-Id: I7128b3815d8b564a59fbe2a3bb4a21270b221fc4 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.egit.core.test/src')
-rw-r--r--org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/ListRemoteOperationTest.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/ListRemoteOperationTest.java b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/ListRemoteOperationTest.java
index 58a538dcc..ad3d5721e 100644
--- a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/ListRemoteOperationTest.java
+++ b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/ListRemoteOperationTest.java
@@ -103,14 +103,15 @@ public class ListRemoteOperationTest extends DualRepositoryTestCase {
URIish uri = new URIish("file:///"
+ repository2.getRepository().getDirectory().getPath());
- ListRemoteOperation lrop = new ListRemoteOperation(uri, 0);
+ ListRemoteOperation lrop = new ListRemoteOperation(repository1
+ .getRepository(), uri, 0);
lrop.run(null);
assertEquals(4, lrop.getRemoteRefs().size());
assertNotNull(lrop.getRemoteRef("refs/heads/test"));
uri = new URIish("file:///"
+ repository1.getRepository().getDirectory().getPath());
- lrop = new ListRemoteOperation(uri, 0);
+ lrop = new ListRemoteOperation(repository2.getRepository(), uri, 0);
lrop.run(new NullProgressMonitor());
assertEquals(2, lrop.getRemoteRefs().size());
assertNotNull(lrop.getRemoteRef("refs/heads/master"));
@@ -126,7 +127,8 @@ public class ListRemoteOperationTest extends DualRepositoryTestCase {
URIish uri = new URIish("file:///"
+ repository2.getRepository().getDirectory().getPath());
- ListRemoteOperation lrop = new ListRemoteOperation(uri, 0);
+ ListRemoteOperation lrop = new ListRemoteOperation(repository1
+ .getRepository(), uri, 0);
try {
lrop.getRemoteRefs();
fail("Expected Exception not thrown");
@@ -144,7 +146,8 @@ public class ListRemoteOperationTest extends DualRepositoryTestCase {
public void testIllegalURI() throws Exception {
URIish uri = new URIish("file:///" + "no/path");
- ListRemoteOperation lrop = new ListRemoteOperation(uri, 0);
+ ListRemoteOperation lrop = new ListRemoteOperation(repository1
+ .getRepository(), uri, 0);
try {
lrop.run(new NullProgressMonitor());
fail("Expected Exception not thrown");

Back to the top