[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Version Control of XML data

From: Ryan Schmidt <subversion-2005_at_ryandesign.com>
Date: 2005-09-07 12:46:41 CEST

On Sep 7, 2005, at 03:19, Thamm, Russell wrote:

> I'm investigating ways of providing version control for XML
> documents residing on an eXist database.

[snip]

> The standard diff tools (although usable) suffer a number of
> drawbacks when handling XML data.
>
> For example, many XML tools like to sort attributes. Two documents
> with identical content will be determined to have many differences
> by traditional tools because the atttributes have been reordered.

You could build functionality into your wrapper script to normalize
your XML files into a predictable format. If the tools you use like
to write entries in an unpredictable order, for example, then your
wrapper could sort the entries before doing anything. That would make
the diff make sense again, and show only real differences.

> I understand that subversion stores the complete HEAD revision and
> differences for previous revisions and that old revisions are
> generated by applying the differences in reverse.

That is only the case for BerkeleyDB repositories. It is not the case
for FSFS repositories, which do the opposite (store the initial
version, and then the differences from that to get to HEAD). Unless
you have a specific reason not to, you should be using FSFS, because
there are circumstances under which BDB repositories can get wedged
or worse, and this has not so far been seen with FSFS.

> I understand that subversion allows you to override the default
> diff/merge tools.
>
> If I configure subversion to use external differencing tools, will
> it use these exclusively for all operations involving differences?
> In particular, does subversion use store differences supplied by
> the external tools and does it use these tools for reconstructing
> old revisions?

No, Subversion always uses its internal differencing engine to store
diffs. Specifying alternate diff tools is solely for your benefit
when you're examining files.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Sep 7 12:48:37 2005

This is an archived mail posted to the Subversion Users mailing list.