aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CherryPickCommandTest.java
diff options
context:
space:
mode:
authorPhilipp Thun <philipp.thun@sap.com>2011-03-21 09:40:14 +0100
committerPhilipp Thun <philipp.thun@sap.com>2011-03-21 09:40:14 +0100
commitdcefc660f15a85fcc2b4ca21ca5d12938b157e82 (patch)
tree89b3dfdcb01650aa0d2f8219eeeb010392a61f81 /org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CherryPickCommandTest.java
parenta62abbe180a6793adcc5a3db7a55c225066daf8d (diff)
downloadjgit-dcefc660f15a85fcc2b4ca21ca5d12938b157e82.tar.gz
jgit-dcefc660f15a85fcc2b4ca21ca5d12938b157e82.zip
Refactor test cases
This change moves commonly used methods into the RepositoryTestCase base class. Change-Id: I56a46c31ee1661c7ce22eb755ab23da8bc9f5da2 Signed-off-by: Philipp Thun <philipp.thun@sap.com>
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CherryPickCommandTest.java')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CherryPickCommandTest.java20
1 files changed, 0 insertions, 20 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CherryPickCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CherryPickCommandTest.java
index 6f57a62787..88bd6acfdf 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CherryPickCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CherryPickCommandTest.java
@@ -51,12 +51,8 @@ import java.util.Iterator;
import org.eclipse.jgit.api.errors.GitAPIException;
import org.eclipse.jgit.api.errors.JGitInternalException;
-import org.eclipse.jgit.dircache.DirCacheCheckout;
-import org.eclipse.jgit.lib.Constants;
-import org.eclipse.jgit.lib.RefUpdate;
import org.eclipse.jgit.lib.RepositoryTestCase;
import org.eclipse.jgit.revwalk.RevCommit;
-import org.eclipse.jgit.revwalk.RevWalk;
import org.junit.Test;
/**
@@ -103,20 +99,4 @@ public class CherryPickCommandTest extends RepositoryTestCase {
assertEquals("create a", history.next().getFullMessage());
assertFalse(history.hasNext());
}
-
- private void checkoutBranch(String branchName)
- throws IllegalStateException, IOException {
- RevWalk walk = new RevWalk(db);
- RevCommit head = walk.parseCommit(db.resolve(Constants.HEAD));
- RevCommit branch = walk.parseCommit(db.resolve(branchName));
- DirCacheCheckout dco = new DirCacheCheckout(db, head.getTree().getId(),
- db.lockDirCache(), branch.getTree().getId());
- dco.setFailOnConflict(true);
- dco.checkout();
- walk.release();
- // update the HEAD
- RefUpdate refUpdate = db.updateRef(Constants.HEAD);
- refUpdate.link(branchName);
- }
-
}