Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn O. Pearce2010-08-23 17:15:37 +0000
committerShawn O. Pearce2010-08-23 18:09:56 +0000
commitf01b3b007c43adc1ac7c9b3c876453a868f85bbe (patch)
tree002f2f37e9b35411ba474651ad281d78d5687489
parent30157f169e58566f526b33f86032125ad82d75a4 (diff)
downloadegit-f01b3b007c43adc1ac7c9b3c876453a868f85bbe.tar.gz
egit-f01b3b007c43adc1ac7c9b3c876453a868f85bbe.tar.xz
egit-f01b3b007c43adc1ac7c9b3c876453a868f85bbe.zip
Adapt to JGit's CommitBuilder, TagBuilder API change
Change-Id: I5d69fca2b8a168b68df7d93b23f5705c49638011 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rw-r--r--org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/internal/mapping/HistoryTest.java6
-rw-r--r--org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/ConnectProviderOperationTest.java4
-rw-r--r--org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/TagOperationTest.java4
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/op/BranchOperation.java3
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/op/CommitOperation.java4
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/op/TagOperation.java8
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/BranchAndResetActionTest.java4
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CommitActionTest.java4
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/TagActionTest.java4
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/TagActionHandler.java4
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/CreateTagOnCommitHandler.java4
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/command/CreateTagCommand.java4
12 files changed, 26 insertions, 27 deletions
diff --git a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/internal/mapping/HistoryTest.java b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/internal/mapping/HistoryTest.java
index 85ea43f9a..9113b8cd9 100644
--- a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/internal/mapping/HistoryTest.java
+++ b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/internal/mapping/HistoryTest.java
@@ -23,7 +23,7 @@ import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.egit.core.GitProvider;
import org.eclipse.egit.core.op.ConnectProviderOperation;
import org.eclipse.egit.core.test.GitTestCase;
-import org.eclipse.jgit.lib.Commit;
+import org.eclipse.jgit.lib.CommitBuilder;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.FileTreeEntry;
import org.eclipse.jgit.lib.ObjectId;
@@ -78,7 +78,7 @@ public class HistoryTest extends GitTestCase {
addFile(projectTree,project1_b_txt);
projectTree.setId(objectWriter.writeTree(projectTree));
tree.setId(objectWriter.writeTree(tree));
- Commit commit = new Commit();
+ CommitBuilder commit = new CommitBuilder();
commit.setAuthor(new PersonIdent(jauthor, new Date(0L), TimeZone
.getTimeZone("GMT+1")));
commit.setCommitter(new PersonIdent(jcommitter, new Date(0L), TimeZone
@@ -95,7 +95,7 @@ public class HistoryTest extends GitTestCase {
addFile(projectTree,project1_b_v2_txt);
projectTree.setId(objectWriter.writeTree(projectTree));
tree.setId(objectWriter.writeTree(tree));
- commit = new Commit();
+ commit = new CommitBuilder();
commit.setAuthor(new PersonIdent(jauthor, new Date(0L), TimeZone
.getTimeZone("GMT+1")));
commit.setCommitter(new PersonIdent(jcommitter, new Date(0L), TimeZone
diff --git a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/ConnectProviderOperationTest.java b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/ConnectProviderOperationTest.java
index 73289a298..312bc0ce8 100644
--- a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/ConnectProviderOperationTest.java
+++ b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/ConnectProviderOperationTest.java
@@ -24,7 +24,7 @@ import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.egit.core.op.ConnectProviderOperation;
import org.eclipse.egit.core.test.GitTestCase;
-import org.eclipse.jgit.lib.Commit;
+import org.eclipse.jgit.lib.CommitBuilder;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.FileTreeEntry;
import org.eclipse.jgit.lib.ObjectId;
@@ -84,7 +84,7 @@ public class ConnectProviderOperationTest extends GitTestCase {
srcTree.setId(writer.writeTree(srcTree));
prjTree.setId(writer.writeTree(prjTree));
rootTree.setId(writer.writeTree(rootTree));
- Commit commit = new Commit();
+ CommitBuilder commit = new CommitBuilder();
commit.setTreeId(rootTree.getTreeId());
commit.setAuthor(new PersonIdent("J. Git", "j.git@egit.org", new Date(
60876075600000L), TimeZone.getTimeZone("GMT+1")));
diff --git a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/TagOperationTest.java b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/TagOperationTest.java
index 56efa3984..ed6248b76 100644
--- a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/TagOperationTest.java
+++ b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/TagOperationTest.java
@@ -30,7 +30,7 @@ import org.eclipse.egit.core.test.TestUtils;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.PersonIdent;
import org.eclipse.jgit.lib.Ref;
-import org.eclipse.jgit.lib.Tag;
+import org.eclipse.jgit.lib.TagBuilder;
import org.eclipse.jgit.revwalk.RevTag;
import org.eclipse.jgit.revwalk.RevWalk;
import org.junit.After;
@@ -91,7 +91,7 @@ public class TagOperationTest extends DualRepositoryTestCase {
public void addTag() throws Exception {
assertTrue("Tags should be empty", repository1.getRepository()
.getTags().isEmpty());
- Tag newTag = new Tag();
+ TagBuilder newTag = new TagBuilder();
newTag.setTag("TheNewTag");
newTag.setMessage("Well, I'm the tag");
newTag.setTagger(new PersonIdent(TestUtils.AUTHOR));
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/BranchOperation.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/BranchOperation.java
index f32d29d0a..ca12db9d0 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/BranchOperation.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/BranchOperation.java
@@ -23,7 +23,6 @@ import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.egit.core.CoreText;
import org.eclipse.egit.core.internal.util.ProjectUtil;
import org.eclipse.jgit.errors.CheckoutConflictException;
-import org.eclipse.jgit.lib.Commit;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.GitIndex;
import org.eclipse.jgit.lib.ObjectId;
@@ -62,7 +61,7 @@ public class BranchOperation implements IEGitOperation {
}
/**
- * Construct a {@link BranchOperation} object for a {@link Commit}.
+ * Construct a {@link BranchOperation} object for a commit.
* @param repository
* @param commit
*/
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/CommitOperation.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/CommitOperation.java
index 2c251fe57..901ab7b4e 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/CommitOperation.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/CommitOperation.java
@@ -37,7 +37,7 @@ import org.eclipse.jgit.api.NoHeadException;
import org.eclipse.jgit.api.NoMessageException;
import org.eclipse.jgit.api.WrongRepositoryStateException;
import org.eclipse.jgit.errors.UnmergedPathException;
-import org.eclipse.jgit.lib.Commit;
+import org.eclipse.jgit.lib.CommitBuilder;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.GitIndex;
import org.eclipse.jgit.lib.GitIndex.Entry;
@@ -318,7 +318,7 @@ public class CommitOperation implements IEGitOperation {
if (changeId != null)
commitMessage = commitMessage.replaceAll("\nChange-Id: I0000000000000000000000000000000000000000\n", "\nChange-Id: I" + changeId.getName() + "\n"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
}
- Commit commit = new Commit();
+ CommitBuilder commit = new CommitBuilder();
commit.setTreeId(tree.getTreeId());
commit.setParentIds(parentIds);
commit.setMessage(commitMessage);
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/TagOperation.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/TagOperation.java
index 605fdfbd7..d8c8711d8 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/TagOperation.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/TagOperation.java
@@ -20,17 +20,17 @@ import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.ObjectWriter;
import org.eclipse.jgit.lib.RefUpdate;
import org.eclipse.jgit.lib.Repository;
-import org.eclipse.jgit.lib.Tag;
+import org.eclipse.jgit.lib.TagBuilder;
import org.eclipse.jgit.lib.RefUpdate.Result;
import org.eclipse.osgi.util.NLS;
import org.eclipse.team.core.TeamException;
/**
- * Tags repository with given {@link Tag} object.
+ * Tags repository with given {@link TagBuilder} object.
*/
public class TagOperation implements IEGitOperation {
- private final Tag tag;
+ private final TagBuilder tag;
private final Repository repo;
private final boolean shouldMoveTag;
@@ -41,7 +41,7 @@ public class TagOperation implements IEGitOperation {
* @param tag
* @param shouldMoveTag if <code>true</code> it will replace tag with same name
*/
- public TagOperation(Repository repo, Tag tag, boolean shouldMoveTag) {
+ public TagOperation(Repository repo, TagBuilder tag, boolean shouldMoveTag) {
this.tag = tag;
this.repo = repo;
this.shouldMoveTag = shouldMoveTag;
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/BranchAndResetActionTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/BranchAndResetActionTest.java
index a3280c14c..da5f68384 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/BranchAndResetActionTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/BranchAndResetActionTest.java
@@ -33,7 +33,7 @@ import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.PersonIdent;
import org.eclipse.jgit.lib.Repository;
-import org.eclipse.jgit.lib.Tag;
+import org.eclipse.jgit.lib.TagBuilder;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotPerspective;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
@@ -66,7 +66,7 @@ public class BranchAndResetActionTest extends LocalRepositoryTestCase {
perspective = bot.activePerspective();
bot.perspectiveById("org.eclipse.pde.ui.PDEPerspective").activate();
- Tag tag = new Tag();
+ TagBuilder tag = new TagBuilder();
tag.setTag("SomeTag");
tag.setTagger(new PersonIdent(TestUtil.TESTAUTHOR));
tag.setMessage("I'm just a little tag");
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CommitActionTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CommitActionTest.java
index 5f8bb068c..0c279db73 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CommitActionTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CommitActionTest.java
@@ -26,7 +26,7 @@ import org.eclipse.egit.ui.test.TestUtil;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.PersonIdent;
import org.eclipse.jgit.lib.Repository;
-import org.eclipse.jgit.lib.Tag;
+import org.eclipse.jgit.lib.TagBuilder;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotPerspective;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
@@ -55,7 +55,7 @@ public class CommitActionTest extends LocalRepositoryTestCase {
ResourcesPlugin.getWorkspace().getRoot().getProject(PROJ2).delete(
false, null);
- Tag tag = new Tag();
+ TagBuilder tag = new TagBuilder();
tag.setTag("SomeTag");
tag.setTagger(new PersonIdent(TestUtil.TESTAUTHOR));
tag.setMessage("I'm just a little tag");
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/TagActionTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/TagActionTest.java
index 0191ffce1..682d0824c 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/TagActionTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/TagActionTest.java
@@ -27,7 +27,7 @@ import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.PersonIdent;
import org.eclipse.jgit.lib.Repository;
-import org.eclipse.jgit.lib.Tag;
+import org.eclipse.jgit.lib.TagBuilder;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotPerspective;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
@@ -56,7 +56,7 @@ public class TagActionTest extends LocalRepositoryTestCase {
repositoryFile = createProjectAndCommitToRepository();
Repository repo = lookupRepository(repositoryFile);
- Tag tag = new Tag();
+ TagBuilder tag = new TagBuilder();
tag.setTag("SomeTag");
tag.setTagger(new PersonIdent(TestUtil.TESTAUTHOR));
tag.setMessage("I'm just a little tag");
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/TagActionHandler.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/TagActionHandler.java
index 82bda59a4..12a958129 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/TagActionHandler.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/TagActionHandler.java
@@ -32,7 +32,7 @@ import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.PersonIdent;
import org.eclipse.jgit.lib.Repository;
-import org.eclipse.jgit.lib.Tag;
+import org.eclipse.jgit.lib.TagBuilder;
import org.eclipse.jgit.revwalk.RevObject;
import org.eclipse.jgit.revwalk.RevSort;
import org.eclipse.jgit.revwalk.RevTag;
@@ -86,7 +86,7 @@ public class TagActionHandler extends RepositoryActionHandler {
if (dialog.open() != IDialogConstants.OK_ID)
return null;
- final Tag tag = new Tag();
+ final TagBuilder tag = new TagBuilder();
PersonIdent personIdent = new PersonIdent(repo);
String tagName = dialog.getTagName();
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/CreateTagOnCommitHandler.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/CreateTagOnCommitHandler.java
index bb81f70b7..7035bb793 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/CreateTagOnCommitHandler.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/CreateTagOnCommitHandler.java
@@ -21,7 +21,7 @@ import org.eclipse.jface.window.Window;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.PersonIdent;
import org.eclipse.jgit.lib.Repository;
-import org.eclipse.jgit.lib.Tag;
+import org.eclipse.jgit.lib.TagBuilder;
import org.eclipse.jgit.revplot.PlotCommit;
import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.ui.handlers.HandlerUtil;
@@ -43,7 +43,7 @@ public class CreateTagOnCommitHandler extends AbstractHistoryCommanndHandler {
if (dialog.open() != Window.OK)
return null;
- final Tag tag = new Tag();
+ final TagBuilder tag = new TagBuilder();
PersonIdent personIdent = new PersonIdent(repo);
String tagName = dialog.getTagName();
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/command/CreateTagCommand.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/command/CreateTagCommand.java
index e3062fd55..74f0706b4 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/command/CreateTagCommand.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/command/CreateTagCommand.java
@@ -38,7 +38,7 @@ import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.PersonIdent;
import org.eclipse.jgit.lib.Ref;
import org.eclipse.jgit.lib.Repository;
-import org.eclipse.jgit.lib.Tag;
+import org.eclipse.jgit.lib.TagBuilder;
import org.eclipse.jgit.revwalk.RevObject;
import org.eclipse.jgit.revwalk.RevSort;
import org.eclipse.jgit.revwalk.RevTag;
@@ -86,7 +86,7 @@ public class CreateTagCommand extends RepositoriesViewCommandHandler<RepositoryT
if (dialog.open() != IDialogConstants.OK_ID)
return null;
- final Tag tag = new Tag();
+ final TagBuilder tag = new TagBuilder();
PersonIdent personIdent = new PersonIdent(repo);
String tagName = dialog.getTagName();

Back to the top