[darcs-devel] darcs patch: add an unused RepoFormat module.

David Roundy droundy at abridgegame.org
Sat Apr 30 05:58:24 PDT 2005


This is just really a sketch of an idea.  A long while back Juliusz and I
had a discussion about how to version the on-disk format, and I had some
ideas, and he had some ideas, and we didn't end up agreeing on anything.
And I wasn't interested in doing the work at the time, so since I didn't
accept his patches, nothing got done.

But now our lack of format versioning is coming back to haunt us.  Here's a
little sketch of how one could implement a flexible format.  It doesn't
actually do anything, but you can imagine what it would do.  The idea is to
have a file _darcs/format or something, which would basically be a list of
keywords.

keyword1
keyword1
alternative1|alternative2

Darcs would only be able to write to a repository if it knows all the
keywords and alternatives, but it could read a repository if it understands
one keyword or alternative from each line.

So if we implement hashed (signable) inventories, we would have three
relevant possibilities:

old-style

would mean that only the non-hashed format is either read or written--which
is completely backwards-compatible.

old-style|hashed

means that both the old inventory and the hashed ones are written, which
means old darcs can read the repository, but can't write (since it won't
know how to update the hashed inventory).  And finally

hashed

would indicate that only the hashed inventory is in use (i.e. the
transition to the new format is complete, and we don't care about any
interoperability with older darcs).

Similarly, when we introduce new patch types, they will be a keyword with
no alternative.  Either the repository allows the new patch type, in which
case it can't be read or written by older darcsen that don't know about
that patch type, or it disallows the patch type, in which case newer
darcsen know not to generate that patch type, and everyone is happy.

This is related in many ways to the darcs-git that Juliusz is working on,
so I'm hoping he in particular will comment here.  If this strikes
someone's interest, speak up, since I'm trying minimize my time spent on
non-conflict stuff.

Also related is an idea Ian and Juliusz have been talking about regarding a
new (more efficient) on-disk format for hunk patches, which would obviously
require something like this.

This patch is intentionally against stable, since I'd like repository
versioning stuff to get into stable as soon as we can agree on it (which
means hopefully for darcs 1.0.4).

Sat Apr 30 08:39:37 EDT 2005  David Roundy <droundy at abridgegame.org>
  * add an unused RepoFormat module.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-darcs-patch
Size: 2124 bytes
Desc: A darcs patch for your repository!
Url : http://lists.osuosl.org/pipermail/darcs-devel/attachments/20050430/de5dddf6/attachment.bin


More information about the darcs-devel mailing list