On Mon, Jun 10, 2013 at 12:38 AM, NorfCran <norfc...@gmail.com> wrote:

> Jaap,
> I am trying to figure out, what is the best storage solution for small
> changes, so far there are two suggestions:
>
>    1. single file with separated patches and integrated timestamps (in
>    progress)
>    2. zip archive, which contains patches / files (name of the file
>    represents timestamps)
>
> solution nr. 1:
>
>    - index is not possible in this solution, only a chain of patches
>    - special characters and following timestamps are used to separate the
>    patches
>    - it is easier to append new patches to end of the file
>    - the file could be tracked by the main VCS (since it is text)
>
> solution nr. 2:
>
>    - possibility to keep index file, which increases lookup of patches
>    - timestamps are stored in single files in the zip file
>    - there is involved compression of the timeline
>    - it is easier to handle list all patches even in file browser
>
> Probably the best approach is the first version.
>

Probably the most intensive calculation is to track the history of each
piece of the current version. If needed we can cache that info in a
seperate file.

Let's go with solution 1. for now and make sure the code is flexible enough
to change the storage format later if need be.


> Additionally I do have a question, whether it is fine to use other code,
> which is not licenced under GPL. Particularly it concerns suitable python
> module licensed under Apache License, Version 2.0:
> http://code.google.com/p/google-diff-match-patch/
>
>
No hard objection to use code with this license, although we should take
care to keep licenses per module clear and not mix source files with
different licenses.

However might be easier to stick to the standard library diff module and
not add additional dependencies if it can be avoided. Unless of course this
module has some complex logic that is beyond the standard library?


> The attachments contain:
>
>    1. diff_match_patch.py (python code, which generates patches and
>    reconstructs text)
>    2. page.timeline (proposed storage of changes with timestamps)
>    3. testing of concept.py (code, which utilizes diff_match_patch.py and
>    serves as a prove of concept)
>
> JK
>
>
Regards,

Jaap
_______________________________________________
Mailing list: https://launchpad.net/~zim-wiki
Post to     : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp

Reply via email to