Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Hohenegger2015-07-27 12:17:26 -0400
committerMatthias Sohn2015-09-07 07:55:39 -0400
commit00aaabadbcf41e3a1efe89e274d5d0d32f36dac9 (patch)
tree865153fba8cb63201c6194c8f392057fef70528a
parentfe7115a12667c31a66a8df347853561771d8a323 (diff)
downloadegit-00aaabadbcf41e3a1efe89e274d5d0d32f36dac9.tar.gz
egit-00aaabadbcf41e3a1efe89e274d5d0d32f36dac9.tar.xz
egit-00aaabadbcf41e3a1efe89e274d5d0d32f36dac9.zip
Fixed 'Finishing a release is tagging develop branch instead of master'
Bug: 473646 Change-Id: I776d07e90b114335776f243e46b917c31fbeb7eb Signed-off-by: Max Hohenegger <eclipse@hohenegger.eu> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.egit.gitflow.test/src/org/eclipse/egit/gitflow/op/HotfixFinishOperationTest.java8
-rw-r--r--org.eclipse.egit.gitflow.test/src/org/eclipse/egit/gitflow/op/ReleaseFinishOperationTest.java3
-rw-r--r--org.eclipse.egit.gitflow/src/org/eclipse/egit/gitflow/op/HotfixFinishOperation.java3
-rw-r--r--org.eclipse.egit.gitflow/src/org/eclipse/egit/gitflow/op/ReleaseFinishOperation.java3
4 files changed, 11 insertions, 6 deletions
diff --git a/org.eclipse.egit.gitflow.test/src/org/eclipse/egit/gitflow/op/HotfixFinishOperationTest.java b/org.eclipse.egit.gitflow.test/src/org/eclipse/egit/gitflow/op/HotfixFinishOperationTest.java
index 899c4139b..7678dc769 100644
--- a/org.eclipse.egit.gitflow.test/src/org/eclipse/egit/gitflow/op/HotfixFinishOperationTest.java
+++ b/org.eclipse.egit.gitflow.test/src/org/eclipse/egit/gitflow/op/HotfixFinishOperationTest.java
@@ -8,7 +8,7 @@
*******************************************************************************/
package org.eclipse.egit.gitflow.op;
-import static org.eclipse.egit.gitflow.GitFlowDefaults.*;
+import static org.eclipse.egit.gitflow.GitFlowDefaults.DEVELOP;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
@@ -49,6 +49,7 @@ public class HotfixFinishOperationTest extends AbstractGitFlowOperationTest {
assertEquals(findBranch(repository, branchName), null);
RevCommit developHead = gfRepo.findHead(DEVELOP);
+ //TODO: as soon as we start using NO_FF for all finish operations, this must be not equals.
assertEquals(branchCommit, developHead);
RevCommit masterHead = gfRepo.findHead(MY_MASTER);
@@ -92,8 +93,9 @@ public class HotfixFinishOperationTest extends AbstractGitFlowOperationTest {
gfRepo);
hotfixFinishOperation.execute(null);
- // tag not created?
- assertNotEquals(hotfixCommit, gfRepo.findCommitForTag(MY_HOTFIX));
+ // tag is created because of 473646
+ // TODO: check if the reference implementation cleans up in this case
+ assertEquals(hotfixCommit, gfRepo.findCommitForTag(MY_HOTFIX));
// branch not removed?
assertNotEquals(findBranch(repository, branchName), null);
diff --git a/org.eclipse.egit.gitflow.test/src/org/eclipse/egit/gitflow/op/ReleaseFinishOperationTest.java b/org.eclipse.egit.gitflow.test/src/org/eclipse/egit/gitflow/op/ReleaseFinishOperationTest.java
index 843bb6b84..c3073e7e0 100644
--- a/org.eclipse.egit.gitflow.test/src/org/eclipse/egit/gitflow/op/ReleaseFinishOperationTest.java
+++ b/org.eclipse.egit.gitflow.test/src/org/eclipse/egit/gitflow/op/ReleaseFinishOperationTest.java
@@ -61,7 +61,8 @@ public class ReleaseFinishOperationTest extends AbstractGitFlowOperationTest {
// branch removed?
assertEquals(findBranch(repository, branchName), null);
- RevCommit developHead = gfRepo.findHead();
+ RevCommit developHead = gfRepo.findHead(DEVELOP);
+ //TODO: as soon as we start using NO_FF for all finish operations, this must be not equals.
assertEquals(branchCommit, developHead);
RevCommit masterHead = gfRepo.findHead(MY_MASTER);
diff --git a/org.eclipse.egit.gitflow/src/org/eclipse/egit/gitflow/op/HotfixFinishOperation.java b/org.eclipse.egit.gitflow/src/org/eclipse/egit/gitflow/op/HotfixFinishOperation.java
index 8eb8f6ab3..c3ce12c06 100644
--- a/org.eclipse.egit.gitflow/src/org/eclipse/egit/gitflow/op/HotfixFinishOperation.java
+++ b/org.eclipse.egit.gitflow/src/org/eclipse/egit/gitflow/op/HotfixFinishOperation.java
@@ -54,9 +54,10 @@ public final class HotfixFinishOperation extends AbstractHotfixOperation {
return;
}
- finish(monitor, hotfixBranchName);
// this may result in conflicts, but that's ok
safeCreateTag(monitor, versionName,
NLS.bind(CoreText.HotfixFinishOperation_hotfix, versionName));
+
+ finish(monitor, hotfixBranchName);
}
}
diff --git a/org.eclipse.egit.gitflow/src/org/eclipse/egit/gitflow/op/ReleaseFinishOperation.java b/org.eclipse.egit.gitflow/src/org/eclipse/egit/gitflow/op/ReleaseFinishOperation.java
index 03cd25d45..575d51a89 100644
--- a/org.eclipse.egit.gitflow/src/org/eclipse/egit/gitflow/op/ReleaseFinishOperation.java
+++ b/org.eclipse.egit.gitflow/src/org/eclipse/egit/gitflow/op/ReleaseFinishOperation.java
@@ -55,9 +55,10 @@ public final class ReleaseFinishOperation extends AbstractReleaseOperation {
return;
}
- finish(monitor, releaseBranchName, false /* TODO: squash should also be supported for releases */);
// this may result in conflicts, but that's ok
safeCreateTag(monitor, repository.getConfig().getVersionTagPrefix() + versionName,
NLS.bind(CoreText.ReleaseFinishOperation_releaseOf, versionName));
+
+ finish(monitor, releaseBranchName, false /* TODO: squash should also be supported for releases */);
}
}

Back to the top