[ 
https://issues.apache.org/jira/browse/JSPWIKI-814?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13897952#comment-13897952
 ] 

Brian Burch commented on JSPWIKI-814:
-------------------------------------

The bug is fixed my my new patch, which should be applied over the original 
patch (i.e. at the latest svn revision.

All of the work is done in VersioningFileProvider. Two methods access and 
update a WikiPage's author property, which is the only property maintained by 
the FileSystemProvider. The two methods are getPageInfo and putPageText. 
Ideally, I would have leveraged the existing logic in FileSystemProvider and 
AbstractFileProvider, but it wouldn't have been a simple change because the 
method signatures are different (String page vs WikiPage page), and would also 
need to be non-private (protected at minimum) and static (can't use 
FileSystemProvider instance methods from a VersioningFileProvider instance), 
etc, etc. Just too messy to contemplate for long!

I've added a new getHeritagePageProperties method, and wired it into the two 
existing methods as elegantly as possible. It is only called when a page is 
being updated for the first time, but the original page was not created under 
the Versioning provider.

I've added several new test cases, and changed all the others that examine the 
migration process. In passing, I had to fix a small bug in TestEngine, because 
it did not set the authenticated user name as the page author. Oh yes, I've 
cloned the most complex test case and wired it to run with caching disabled, 
just to verify that I haven't clobbered the cache logic.



> VersioningFileProvider does migrate original page properties
> ------------------------------------------------------------
>
>                 Key: JSPWIKI-814
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-814
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Core & storage
>    Affects Versions: 2.10
>         Environment: ubuntu linux and openjdk 1.7.0_25. mvn test.
>            Reporter: Brian Burch
>            Priority: Minor
>              Labels: features
>             Fix For: FutureVersion
>
>         Attachments: JSPWIKI-814-patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> The default FileSystemProvider maintains two files for each wiki page. e.g. 
> MyPage.txt has an associated MyPage.properties, which records the timestanp 
> and author of the last change to that page.
> VersioningFileProvider contains logic to "migrate" a wiki page created by 
> FileSystemProvider when it is next updated. This migration works properly for 
> MyPage.txt, but the new change history for the page in the OLD/ subdirectory 
> starts at version 2 and ignores the history available in MyPage.properties.
> Also, the original MyPage.properties remains in "suspended animation", even 
> though the migrated page history has been created.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to