Bug 410675 - [regression] patch set section shows duplicate files when restarting with review editor open
Summary: [regression] patch set section shows duplicate files when restarting with rev...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P2 major (vote)
Target Milestone: 2.0.1   Edit
Assignee: Miles Parker CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 411180 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-06-12 20:29 EDT by Sam Davis CLA
Modified: 2013-06-19 20:25 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Davis CLA 2013-06-12 20:29:22 EDT
* with a review editor open, restart eclipse
* close and reopen the editor
* duplicate files are shown in the patch set section
* repeat the process and get another set of duplicates
Comment 1 Sam Davis CLA 2013-06-12 20:33:39 EDT
A workaround is to delete the <workspace>\.metadata\.mylyn\reviews_xml\org.eclipse.mylyn.gerrit-<repository_url>-\Review\<review_id>.reviews file to remove the duplciates for the affected review.
Comment 2 Miles Parker CLA 2013-06-12 20:53:49 EDT
https://git.eclipse.org/r/#/c/13784/

This is in some sense a quick fix, because I while it isn't really specified by API we probably shouldn't be calling createModel after the model exists, and we are in this instance.
Comment 3 Sam Davis CLA 2013-06-13 13:29:09 EDT
I have also been able to reproduce this without restarting, by deletin gthe .reviews file while the review is open and then refreshing the editor.
Comment 4 Miles Parker CLA 2013-06-13 13:45:35 EDT
(In reply to comment #3)
> I have also been able to reproduce this without restarting, by deletin gthe
> .reviews file while the review is open and then refreshing the editor.

Yeah, that makes sense. What's happening there is that the file is still in memory, but then it gets rebuilt, causing create model to be called. After thinking it through, the overall framework is working correctly -- you need to force a creation pass at this point, and the fix that I've made is correct -- you shouldn't assume that at create time you wouldn't already have the model. (This is an issue only with EMF lists; with regular objects you're just recreating the model object so it doesn't matter.)

Anyway, the fix above should take care of it. Can you confirm that, Sam?
Comment 5 Sam Davis CLA 2013-06-13 19:34:07 EDT
This seems to be fixed now.
Comment 6 Miles Parker CLA 2013-06-13 19:45:47 EDT
Great. I think we're starting to win this game of Whack-A-Mole.
Comment 7 Steffen Pingel CLA 2013-06-19 12:09:09 EDT
Miles, please assign tasks to the person who completed the majority of the work when resolving them.
Comment 8 Miles Parker CLA 2013-06-19 20:25:17 EDT
*** Bug 411180 has been marked as a duplicate of this bug. ***