Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Lay2010-07-29 03:18:02 -0400
committerStefan Lay2010-07-29 03:18:02 -0400
commitf1a567951bf1c9a0aca47afafffde930b9740cf3 (patch)
tree92ae6158afb8f6d3ad224ce5d2da68c4857b0423 /org.eclipse.egit.core.test
parentdf27ebc65d7eb50b3c8eae96155e58c865241b7e (diff)
downloadegit-f1a567951bf1c9a0aca47afafffde930b9740cf3.tar.gz
egit-f1a567951bf1c9a0aca47afafffde930b9740cf3.tar.xz
egit-f1a567951bf1c9a0aca47afafffde930b9740cf3.zip
Remove menu items "Track" and "Refresh"
Now the add command also adds new files to the repository. Additionally it takes into account .gitignore. Therefore there is no need anymore of the "Track" and "Refresh" menu items. Bug: 315306 Change-Id: I85ec194d0bb89a895a3ff459061ed6f3152b1943 Signed-off-by: Stefan Lay <stefan.lay@sap.com>
Diffstat (limited to 'org.eclipse.egit.core.test')
-rw-r--r--org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitResourceVariantTreeTest.java5
-rw-r--r--org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/PushOperationTest.java6
-rw-r--r--org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/TrackUntrackOperationTest.java9
3 files changed, 8 insertions, 12 deletions
diff --git a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitResourceVariantTreeTest.java b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitResourceVariantTreeTest.java
index 6ead88687..7d23d5f94 100644
--- a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitResourceVariantTreeTest.java
+++ b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/synchronize/GitResourceVariantTreeTest.java
@@ -25,10 +25,10 @@ import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.egit.core.op.AddToIndexOperation;
import org.eclipse.egit.core.op.BranchOperation;
import org.eclipse.egit.core.op.ConnectProviderOperation;
import org.eclipse.egit.core.op.DisconnectProviderOperation;
-import org.eclipse.egit.core.op.TrackOperation;
import org.eclipse.egit.core.project.RepositoryMapping;
import org.eclipse.egit.core.synchronize.dto.GitSynchronizeData;
import org.eclipse.egit.core.synchronize.dto.GitSynchronizeDataSet;
@@ -342,8 +342,7 @@ public class GitResourceVariantTreeTest extends GitTestCase {
throws Exception {
List<IResource> resources = new ArrayList<IResource>();
resources.add(mainJava.getResource());
- IResource[] track = resources.toArray(new IResource[resources.size()]);
- new TrackOperation(track).execute(null); // add resource to git
+ new AddToIndexOperation(resources).execute(null); // add resource to git
new Git(repo).commit().setMessage(commitMsg).call(); // make commit
}
diff --git a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/PushOperationTest.java b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/PushOperationTest.java
index 742d98d92..9432e2b81 100644
--- a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/PushOperationTest.java
+++ b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/PushOperationTest.java
@@ -26,13 +26,13 @@ import org.eclipse.core.resources.IResourceVisitor;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.egit.core.Activator;
+import org.eclipse.egit.core.op.AddToIndexOperation;
import org.eclipse.egit.core.op.BranchOperation;
import org.eclipse.egit.core.op.CloneOperation;
import org.eclipse.egit.core.op.CommitOperation;
import org.eclipse.egit.core.op.PushOperation;
import org.eclipse.egit.core.op.PushOperationResult;
import org.eclipse.egit.core.op.PushOperationSpecification;
-import org.eclipse.egit.core.op.TrackOperation;
import org.eclipse.egit.core.test.DualRepositoryTestCase;
import org.eclipse.egit.core.test.TestRepository;
import org.eclipse.egit.core.test.TestUtils;
@@ -40,8 +40,8 @@ import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.RefUpdate;
import org.eclipse.jgit.storage.file.FileRepository;
import org.eclipse.jgit.transport.RemoteRefUpdate;
-import org.eclipse.jgit.transport.URIish;
import org.eclipse.jgit.transport.RemoteRefUpdate.Status;
+import org.eclipse.jgit.transport.URIish;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -152,7 +152,7 @@ public class PushOperationTest extends DualRepositoryTestCase {
// java.io.File.lastModified.
Thread.sleep(1000);
- TrackOperation trop = new TrackOperation(fileArr);
+ AddToIndexOperation trop = new AddToIndexOperation(files);
trop.execute(null);
CommitOperation cop = new CommitOperation(fileArr, files, files,
TestUtils.AUTHOR, TestUtils.COMMITTER, "Added file");
diff --git a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/TrackUntrackOperationTest.java b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/TrackUntrackOperationTest.java
index fe54ae97e..24eae1e04 100644
--- a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/TrackUntrackOperationTest.java
+++ b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/TrackUntrackOperationTest.java
@@ -22,7 +22,7 @@ import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceVisitor;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.egit.core.op.TrackOperation;
+import org.eclipse.egit.core.op.AddToIndexOperation;
import org.eclipse.egit.core.op.UntrackOperation;
import org.eclipse.egit.core.project.RepositoryMapping;
import org.eclipse.egit.core.test.DualRepositoryTestCase;
@@ -83,7 +83,7 @@ public class TrackUntrackOperationTest extends DualRepositoryTestCase {
assertTrackedState(fileArr, false);
- TrackOperation trop = new TrackOperation(fileArr);
+ AddToIndexOperation trop = new AddToIndexOperation(files);
trop.execute(new NullProgressMonitor());
assertTrackedState(fileArr, true);
@@ -112,9 +112,6 @@ public class TrackUntrackOperationTest extends DualRepositoryTestCase {
final ArrayList<IContainer> containers = new ArrayList<IContainer>();
containers.add(project);
- IContainer[] projectArr = containers.toArray(new IContainer[containers
- .size()]);
-
final ArrayList<IFile> files = new ArrayList<IFile>();
project.accept(new IResourceVisitor() {
@@ -130,7 +127,7 @@ public class TrackUntrackOperationTest extends DualRepositoryTestCase {
assertTrackedState(fileArr, false);
- TrackOperation trop = new TrackOperation(projectArr);
+ AddToIndexOperation trop = new AddToIndexOperation(containers);
trop.execute(new NullProgressMonitor());
assertTrackedState(fileArr, true);

Back to the top