Tommaso Cucinotta wrote:

> Hi,
> 
> I'd like to know if there is any planned support to CVS/SVN
> diff of .lyx files. Something that shows a double-work area
> window with my local version on the left and the remote
> committed version on the right, highlighting in both work-areas
> the changes between the two (this might be done [ graphically ]
> in a way that is very similar to change tracking, I guess).
> 
> Thanks, bye,

This is do-able. I've think a bit about it actually, and I may work on this
in a near future.

The algorithm(s) behind diff (edit distance algos) are actually reasonably
simple[*], so we could implement them directly in LyX. The output could be
directly a change tracked document. I don't know if this is enough for
cvs/svn support though, because we don't have support in CT for a number of
things, like formatting, doc preamble etc.

[*] There are many of them. Actually it is not really straightforward
because the data structure in LyX is not linear but rather a tree, but I
think this issue can be solved. Another possible problem is that best known
algorithm are worst case O(N^2) where N is the size of the doc. There are
variants that are much faster if the documents are similar (for instance a
O(N*D) algo where D is the "distance" between them), but this may be a
problem if we are trying to integrate it in an automatic context like cvs.

A/


Reply via email to