Re: Merge-friendly text-based data storage

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: Merge-friendly text-based data storage

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:53:24

Richard Hartmann [off-list ref] writes:
On Tue, Mar 27, 2012 at 11:12, Holger Hellmuth [off-list ref] wrote:
quoted
I may be misunderstanding something, but lets assume you want to merge a
file that has "version: 0" with one that has "version: 1" and their last
common ancestor would have "version: 0" naturally. So the merge would not
fail even though the file layout changes.
Ugh, I did not consider that. I can't come up with a way, other than a
custom merge driver, to prevent this. Am I correct?
You are the only judge to that statement: "I can't come up with...".

I can't either, but I know a custom ll-merge driver would work.  It is
designed for this kind of thing.  It will know both version 0 and version
1 format, read from each and writes out the merged result in whatever
format it wants to use.
quoted
the only way
would be to store each data line in its own file. As you store file paths
that would even fit, but I doubt it is what you had in mind
I considered this as well, but that's extremely expensive and wasteful.
And it does not solve anything.  The "version" file may cleanly merge to a
new version, and there is no way for the merge result of "version" file to
affect the outcome of merges in other files.

Re: Merge-friendly text-based data storage

From: Holger Hellmuth <hidden>
Date: 2016-06-15 22:53:24

On 27.03.2012 17:21, Junio C Hamano wrote:
Richard Hartmann[off-list ref]  writes:
quoted
quoted
the only way
would be to store each data line in its own file. As you store file paths
that would even fit, but I doubt it is what you had in mind
I considered this as well, but that's extremely expensive and wasteful.
And it does not solve anything.  The "version" file may cleanly merge to a
new version, and there is no way for the merge result of "version" file to
affect the outcome of merges in other files.
It solves the data merging.

And since a version change is presumably a very scarce event, this could 
be solved with a merge hook that simply aborts the merge with a message 
how to update the older version, then commit and merge.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help