Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311151 - Attempting to open a branch that was created from a committed branch generates an exception
Summary: Attempting to open a branch that was created from a committed branch generate...
Status: CLOSED FIXED
Alias: None
Product: OSEE
Classification: Technology
Component: OSEE Application Framework (show other bugs)
Version: 0.9.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 0.9.4   Edit
Assignee: Ryan Brooks CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-30 06:10 EDT by Mark D-B CLA
Modified: 2010-12-14 14:05 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark D-B CLA 2010-04-30 06:10:51 EDT
1. Create a branch (using right-click->Branch in the Branch Manager) from a branch with state "COMMITTED"
2. Select that new branch branch in Artifact Explorer
3. The following exception results:

org.eclipse.osee.framework.core.exception.ArtifactDoesNotExist: Artifact of type RootArtifact with name Default Hierarchy Root does not exist on branch MDB_MergeKevinChangeToGMD
at org.eclipse.osee.framework.skynet.core.OseeSystemArtifacts.getOrCreateCachedArtifact(OseeSystemArtifacts.java:72)
at org.eclipse.osee.framework.skynet.core.OseeSystemArtifacts.getCachedArtifact(OseeSystemArtifacts.java:61)
at org.eclipse.osee.framework.skynet.core.OseeSystemArtifacts.getDefaultHierarchyRootArtifact(OseeSystemArtifacts.java:40)
at org.eclipse.osee.framework.ui.skynet.ArtifactExplorer$1.handleEvent(ArtifactExplorer.java:293)
at org.eclipse.osee.framework.ui.skynet.widgets.XBranchSelectWidget.notifyListeners(XBranchSelectWidget.java:187)
at org.eclipse.osee.framework.ui.skynet.widgets.XBranchSelectWidget.handleEvent(XBranchSelectWidget.java:174)
at org.eclipse.osee.framework.ui.skynet.branch.BranchSelectComposite.notifyListener(BranchSelectComposite.java:139)
at org.eclipse.osee.framework.ui.skynet.branch.BranchSelectComposite.handleEvent(BranchSelectComposite.java:108)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
Comment 1 Ryan Brooks CLA 2010-05-18 15:03:21 EDT
The situation where the Default Hierarchy Root does not exist is a sign that the branch is completely empty.  I believe this would happen if the branch was created from an archived branch.  This is because archiving a branch moves all of its addressing from osee_txs to osee_txs_archived, and since the branch creation uses the osee_txs table nothing no addressing is found to copy to the new branch.

In short, if you unarchive the branch first, then you can create a new branch.
Comment 2 Mark D-B CLA 2010-05-18 17:53:07 EDT
Thanks Ryan. I hadn't realised that a branch in the COMMITTED state still has the ability to have the archived flag set or cleared.

Unfortunately, that's not the whole story here though because of the following

1. Find a branch that is in the COMMITTED state and has archived set
2. From branch manager, showing archived branches, unarchive this branch
3. Create a sub-branch (using right-click->Branch in the Branch Manager) from the unarchived branch
4. Select that new branch branch in Artifact Explorer
5. The same exception results as if is archived

Also, even selecting the committed, unarchived, branch yields no useful content. There isn't an exception, but a long list of errors indicating that the artifacts don't exist.

It would still seem to be that something happens on going to the COMMITTED state, independent of archived state.
Comment 3 Mark D-B CLA 2010-05-18 18:04:37 EDT
Sorry Ryan, there's something else going on here.

I went through exactly the same process as in comment 2, but using a branch committed much longer ago as my starting point.

This did exactly what comment 1 suggests should happen. The unarchived branch had visible content, and the branch created from it did not generate an exception when opened.

So, in terms of this bug, I guess the only action would be to modify the code to prevent the creation of a branch from an archived branch.

Tomorrow, I'll start to look into what is different about the more recent committed branches that makes them go wrong but whatever it is will be raised as a separate bugzilla.

Apologies for not trying more cases before making comment 2.
Comment 4 Ryan Brooks CLA 2010-05-19 17:24:09 EDT
Mark,

Thanks for tracking this one down.  I have fixed the code so the menu item for branch creation is now disabled for an archived branch.  The fix was committed to trunk in revision 27753.  It has also been applied to the 0.9.4 branch.

Thanks,
Ryan Brooks
Comment 5 Ryan Brooks CLA 2010-12-14 14:05:03 EST
OSEE 0.9.4 has been released.