On Mon, Sep 5, 2011 at 6:31 PM, Vincent Massol <[email protected]> wrote:
> Hi devs,
>
> I'd like to brainstorm about the idea of having global versioning in XE.
>
> First here is a use case:
> * I have a given state in my wiki with pages in different versions
> * I add some pages or make modifications to existing pages
> * I want to go back to the previous state
>
> A good use case could be for example to return to a state before one or 
> several applications have been installed.
>
> Proposed solution
> ==============
>
> * Store a global version number in the DB. Let's call it VERSION
> * Whenever a doc is modified, use VERSION + 1 as the new doc version
> * When we rollback (to say version OLDVERSION) do a query on all docs in the 
> wiki having a version > OLDVERSION and for each of them rollback to their 
> last version <= OLDVERSION
> * Write a migrator that runs the whole wiki history by looking at all 
> versions of all docs (map in memory) and recompute the new version starting a 
> VERSION = 1 and incrementing.
> * We would also need to modify the XAR importer so that importing a XAR with 
> an older versioning scheme will work. BTW knowing that it's an old scheme is 
> relatively easy since all old versions have a dot in their name.
>
> More notes:
> * This would also allow us to rollback before a given date
> * If we wanted we could easily add the notion of Tags later on, i.e. to 
> associate a name with a VERSION
> * I've been thinking about this in the context of the new model but it's 
> probably easier to implement it first with the old model
> * JRCS uses the format X.Y for versions but we could decide to only use the 
> major, i.e always have versions of the form X.0
> * In order to continue to support minor edits we would need a way to save 
> that information. One solution is to use the minor to signify a minor edit, 
> for ex: X.1 would mean that X is a minor. Another, probably better solution 
> would be to store that information in the DB in the xwikircs table
>
> WDYT? Do you see any drawback of using a global versioning scheme? Do you 
> think this is doable or too much work?
>

See lots of benefits and a bit of complexity for the implementation
but should not be overwhelming.

> Is there anything Git can tell us re managing versions that would be useful 
> to this discussion?

I think we looks more like svn than git.

>
> Thanks
> -Vincent
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs
>



-- 
Thomas Mortagne
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to