Bug 34914 - [PATCH] RCML files get corrupted
Summary: [PATCH] RCML files get corrupted
Status: NEW
Alias: None
Product: Lenya
Classification: Unclassified
Component: Revision Controller (show other bugs)
Version: 1.2.1
Hardware: Sun Solaris
: P3 major
Target Milestone: 1.2.6
Assignee: Lenya Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-14 01:17 UTC by Mike Moretti
Modified: 2007-04-28 15:57 UTC (History)
0 users



Attachments
Patch for fixing corruption of RCML files (5.94 KB, patch)
2006-01-11 19:10 UTC, Mike Moretti
Details | Diff
Patch against svn tree (34.25 KB, patch)
2006-01-19 19:24 UTC, Mike Moretti
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Moretti 2005-05-14 01:17:50 UTC
I know there was a synchronization bug with the sitetree that was fixed in 1.2.3
but there also appears to be a synch bug with the checkin/checkout code too
because some of my RCML files get corrupted if I mistakenly hit save twice very
quickly.
Comment 1 Mike Moretti 2006-01-11 19:10:40 UTC
Created attachment 17387 [details]
Patch for fixing corruption of RCML files

I think I've fixed the problem with corruption of RCML files (this happened
since 1.2.1 and still happens in 1.2.3).  To fix the problem, I added a bunch
of synchronization to the RevisionController.  I've included the source and not
a real patch.  The source I included was modified from the original 1.2.3
versions.
Comment 2 Thorsten Scherler 2006-01-11 19:17:50 UTC
Hmm, the problem is that current version is 1.2.5-dev. The patch you provided is
hard to implement. Can you please do a pacth against head version of the 1.2.x
svn rep? Then I can take care of it.

TIA
Comment 3 Mike Moretti 2006-01-12 16:53:09 UTC
(In reply to comment #2)

I have no idea where to get that branch from svn.  If you can give me the url,
I'll try to make a patch against it, but unfortunately I'll have no way to test
it.  I can only test it with our 1.2.3 tree.

-mm
Comment 4 Thorsten Scherler 2006-01-12 17:05:06 UTC
http://lenya.apache.org/1_2_x/installation/subversion.html

Thanks for that. No worries if you can do a diff then I will test it.

TIA

BTW a diff you do with:
svn diff > rcml.diff
Comment 5 Mike Moretti 2006-01-19 18:24:41 UTC
(In reply to comment #4)

Sorry it's taking so long to get you an updated patch.  I have to setup a whole
new environment just to compile this branch.  And some other files that use the
revision controller have changed since 1.2.3 and I have to fix those too now.

Comment 6 Mike Moretti 2006-01-19 19:24:53 UTC
Created attachment 17458 [details]
Patch against svn tree

Here's the updated patch against the svn tree.	I've basically put
synchronization into RevisionController, and now that class should be the only
class anyone uses for revision control (and not RCML any more). 
RevisionController is the only class that accesses RCML because adding
synchronization to the RCML class would not have worked (because the
"transactions" were too broken up in there, but not so in RevisionController). 
I had to fix ForceCheckinAction, ReservedCheckoutTestAction, versions-screen
and revisions.xsp not use RCML, and added some functions into
RevisionController to do what they needed.

So if you need to do revision control, don't use RCML, but use
RevisionController and if it doesn't do what you need to do, make another
"transaction" like function in that class instead of doing low level RCML calls
from elsewhere.  Otherwise you risk running into synchronization problems.

I hope this makes sense.
Comment 7 J 2007-01-25 16:36:31 UTC
is this issue still valid? has the patch been reviewed and/or applied?
Comment 8 Antonio Gallardo 2007-03-31 23:29:59 UTC
Comment on attachment 17387 [details]
Patch for fixing corruption of RCML files

Patch for version 1.2.3
Comment 9 J 2007-04-26 07:12:51 UTC
andreas, can you comment on this issue?
Comment 10 J 2007-04-28 15:57:15 UTC
since nobody offers comments regarding the validity of this bug in trunk and i
can't reproduce it, i'm re-targeting it to 1.2.6....