Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoberto E. Escobar2012-09-19 22:01:50 +0000
committerRoberto E. Escobar2012-09-19 22:50:25 +0000
commit998affa1ca0544b4be92061bf7920574611ecd06 (patch)
tree527e47b3cdf7b7e1e1d2eb5429a9b8232b6524ab
parent69c9d9d025ce646d19c983853550baae8c8c5fc7 (diff)
downloadorg.eclipse.osee-998affa1ca0544b4be92061bf7920574611ecd06.tar.gz
org.eclipse.osee-998affa1ca0544b4be92061bf7920574611ecd06.tar.xz
org.eclipse.osee-998affa1ca0544b4be92061bf7920574611ecd06.zip
bug: Fix exceptions when branch has no parent branch0.10.2.v201209241920_REL0.10.2.v201209192316_RC
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/commit/CommitIntoParentCompoundContributionItem.java8
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeBranchDatabaseCallable.java4
2 files changed, 8 insertions, 4 deletions
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/commit/CommitIntoParentCompoundContributionItem.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/commit/CommitIntoParentCompoundContributionItem.java
index ca53f369ee8..82c7adce4b3 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/commit/CommitIntoParentCompoundContributionItem.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/commit/CommitIntoParentCompoundContributionItem.java
@@ -72,10 +72,12 @@ public class CommitIntoParentCompoundContributionItem extends CompoundContributi
Command command = configCommandParameter(commandId);
CommandContributionItem contributionItem = null;
- contributionItem = createCommand(selectedBranch, commandId);
+ if (selectedBranch.hasParentBranch()) {
+ contributionItem = createCommand(selectedBranch, commandId);
- if (command != null && command.isEnabled()) {
- contributionItems.add(contributionItem);
+ if (command != null && command.isEnabled()) {
+ contributionItems.add(contributionItem);
+ }
}
} catch (OseeCoreException ex) {
OseeLog.log(Activator.class, Level.SEVERE, ex);
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeBranchDatabaseCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeBranchDatabaseCallable.java
index 0fc7a1d1530..c3f511beaa4 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeBranchDatabaseCallable.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeBranchDatabaseCallable.java
@@ -62,7 +62,9 @@ public class PurgeBranchDatabaseCallable extends DatabaseTxCallable<Branch> {
purgeFromTable(connection, DELETE_FROM_TX_DETAILS, 0.09, branchId);
purgeFromTable(connection, DELETE_FROM_CONFLICT, 0.01, branchId);
- purgeFromTable(connection, DELETE_FROM_MERGE, 0.01, branchId, branch.getParentBranch().getId());
+ if (branch.hasParentBranch()) {
+ purgeFromTable(connection, DELETE_FROM_MERGE, 0.01, branchId, branch.getParentBranch().getId());
+ }
purgeFromTable(connection, DELETE_FROM_BRANCH_TABLE, 0.01, branchId);
purgeAccessControlTables(branchId);

Back to the top