Mercurial Friendly Data Storage

Mads Kiilerich mads at kiilerich.com
Thu Jan 20 04:25:23 CST 2011


On 01/20/2011 08:25 AM, Michael Diamond wrote:
> Hello all,
>
> I'm exploring the feasibility of a project that, at its heart, would be
> a data storage system with changes tracked by Mercurial (and/or other
> VCSs, but I know and like Mercurial best).  The catch is, I would like
> to be able to easily look through the history of a file and determine
> the change history of the data contents.  For instance, if I used XML
> and a file contained a line "<name>Michael Diamond</name>" and it was
> changed from "<name>Mikahl Dimoond</name>" I want my program to be able
> to identify what changed was the <name> tag, just from the change diff.
>
> And so my question is, what are your thoughts on the best way to store
> this data to make Mercurial's job easiest?

Mercurial at its core treat all files as binary. It can usually also 
detect text files and show the diffs that developers knows and loves, 
but for more custom needs it might be better to use a custom diff tool. 
See http://mercurial.selenic.com/wiki/ExtdiffExtension .

That doesn't directly answer your question, but it gives you the freedom 
to do use whatever format you prefer.

/Mads


More information about the Mercurial mailing list