summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorMathias Kinzler2010-12-01 09:08:07 (EST)
committer Mathias Kinzler2010-12-01 09:08:07 (EST)
commit7aa1b85821e007c0243772273960069497284290 (patch)
treebb8876529c5aa31b912998db555787510d6d15fe
parentb4359cb8294de1e80147f00caabad9ebd6b7bce1 (diff)
downloadjgit-7aa1b85821e007c0243772273960069497284290.zip
jgit-7aa1b85821e007c0243772273960069497284290.tar.gz
jgit-7aa1b85821e007c0243772273960069497284290.tar.bz2
Rebase Interoperability first part: write "interactive" filerefs/changes/84/1984/1
The Repository is then in state "Rebase interactive". Change-Id: I5d2de57f8670e1d4c71ed22509ab17f04e2561b5 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RebaseCommandTest.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java1
2 files changed, 5 insertions, 2 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RebaseCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RebaseCommandTest.java
index 2e04cdb..d1d3480 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RebaseCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RebaseCommandTest.java
@@ -322,7 +322,8 @@ public class RebaseCommandTest extends RepositoryTestCase {
checkFile(theFile,
"<<<<<<< OURS\n1master\n=======\n1topic\n>>>>>>> THEIRS\n2\n3\ntopic4\n");
- assertEquals(RepositoryState.REBASING_MERGE, db.getRepositoryState());
+ assertEquals(RepositoryState.REBASING_INTERACTIVE, db
+ .getRepositoryState());
assertTrue(new File(db.getDirectory(), "rebase-merge").exists());
// the first one should be included, so we should have left two picks in
// the file
@@ -410,7 +411,8 @@ public class RebaseCommandTest extends RepositoryTestCase {
assertEquals(Status.STOPPED, res.getStatus());
assertEquals(conflicting, res.getCurrentCommit());
- assertEquals(RepositoryState.REBASING_MERGE, db.getRepositoryState());
+ assertEquals(RepositoryState.REBASING_INTERACTIVE, db
+ .getRepositoryState());
assertTrue(new File(db.getDirectory(), "rebase-merge").exists());
// the first one should be included, so we should have left two picks in
// the file
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
index f924590..45c66e5 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
@@ -325,6 +325,7 @@ public class RebaseCommand extends GitCommand<RebaseResult> {
createFile(rebaseDir, "head", headId.name());
createFile(rebaseDir, "head-name", headName);
createFile(rebaseDir, "onto", upstreamCommit.name());
+ createFile(rebaseDir, "interactive", "");
BufferedWriter fw = new BufferedWriter(new OutputStreamWriter(
new FileOutputStream(new File(rebaseDir, "git-rebase-todo")),
"UTF-8"));