Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324635 - "Attempt to modify historical revision"-Exception after branch merge
Summary: "Attempt to modify historical revision"-Exception after branch merge
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 4.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Eike Stepper CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard: offline-01
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-07 06:17 EDT by Pascal Lehmann CLA
Modified: 2011-06-23 03:42 EDT (History)
1 user (show)

See Also:


Attachments
TestCase (4.24 KB, patch)
2010-09-07 06:19 EDT, Pascal Lehmann CLA
stepper: iplog+
Details | Diff
Proposed patch (1.02 KB, patch)
2010-09-07 06:23 EDT, Pascal Lehmann CLA
stepper: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Lehmann CLA 2010-09-07 06:17:20 EDT
Build Identifier: 4.0

When doing a change to an object (which was already known to the view), which has been updated by a branch-merge change (change on a different branch and merged back to main), you will get an 'attempt to modify historical version' exception on commit.

This is caused by the targetGoalDelta (introduced for bug #319522) in the RevisionDelta received for the merge change, having the same version as the source when receiving it from a branch-merge change.

Reproducible: Always

Steps to Reproduce:
1. Setup 2 transactions, create an element in transaction1 and commit, touch the element in transaction2 (to load it into the view).
2. Setup another branch and do a change to the element on the branch, then merge and commit to normal branch (using transaction1).
3. do another change to the element in transaction2 and commit.
Comment 1 Pascal Lehmann CLA 2010-09-07 06:19:46 EDT
Created attachment 178306 [details]
TestCase
Comment 2 Pascal Lehmann CLA 2010-09-07 06:23:56 EDT
Created attachment 178307 [details]
Proposed patch

Here is a patch proposal, but I'm unsure if this is the correct place to patch. I first tried to patch it on the server, but then went back to patch the version in the InvalidationTransition where the version is usually increased.
I increase the version by one when the source version equals the target version, which shouldn't be valid case.
Comment 3 Pascal Lehmann CLA 2010-09-07 06:24:53 EDT
1) The number of lines that you changed is smaller than 250.
confirmed.
2) You are the only author of these changed lines.
confirmed.
3) You apply the EPL to these changed lines.
confirmed.
Comment 4 Eike Stepper CLA 2010-09-13 04:02:00 EDT
Good catch, Pascal!
Comment 5 Eike Stepper CLA 2010-09-13 04:04:00 EDT
Committed to HEAD
Comment 6 Eike Stepper CLA 2011-06-23 03:42:21 EDT
Available in R20110608-1407