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

David Roundy droundy at abridgegame.org
Sun May 1 04:58:13 PDT 2005


On Sat, Apr 30, 2005 at 10:33:32PM +0200, Juliusz Chroboczek wrote:
> > Perhaps we should do is just define a format "darcs-1.0" which is
> > equivalent to the current format, and is the default if
> > _darcs/format isn't present.
> 
> Why not something like ``baseline'' ?

I was afraid that at some stage we may want to remove support for some
feature in "baseline", and calling it baseline then would become an
anachronism.  (How's that for a $0.5 word?)  For example, it might be nice
eventually to remove support for merger 0.9 patches.

But now that I think about it, this isn't a problem at all.  If we
introduce a new non-backwards-compatible "baseline" for darcs 2.0 called
darcs-2.0, the format just needs to include a single line

darcs-2.0

and then all "baseline" references can be interpereted relative to that,
and we'll still have full compatibility, since older darcsen (that aren't
familiar with darcs-2.0 will know that they can't read or write to this
repository, and a newer darcs will know that the darcs-2.0 modifies the
meaning of "baseline".  Hopefully we won't ever do this (introduce a
completely non-backwards-compatible format), but it's nice to know that if
we *do* decide to do it, we shouldn't be hampered by our choice of format
framework.

> > Switching subjects a tad... will your identifyRepository code be an
> > appropriate place to put this RepoFormat stuff?
> 
> Yes, it's the natural place to put it.

Good, then that's where we'll put it.

> > And is that code sufficiently separable that it could go into
> > darcs-stable? Any chance it could be made non-invasive enough to
> > sneak into 1.0.3?
> 
> No.  The reason why the repository abstraction makes integrating the
> RepoFormat a triviality is that I've changed all the commands to only
> manipulate repositories through the abstraction.  So in darcs-git, you
> only need to modify identifyRepository to get all the commands to
> check the repo format; in plain Darcs, you'll need to modify all the
> commands.
> 
> The other side of the coin is that you cannot get the benefits of the
> restructuring without pulling the changes to all the commands.
> 
> I'm not sure what should be done...  If you do a manual integration of
> RepoFormat into every Darcs command, you'll be duplicating my work,
> and I'll get massive merge conflicts when I merge with you.

My leaning would then be to put this off for darcs 1.0.4, and use your
identifyRepository framework (which as you say, is the natural way to do
this).  But although identifyRepository is invasive enough that we should
keep it out of 1.0.3, could it apply cleanly to darcs-stable? That is, does
it have dependencies on anything else in darcs-git or darcs-unstable that
we may not want in darcs 1.0.4?  If it can go into darcs-stable without
pulling anything "dangerous" in, that would be perfect.  If it depends on
some of the optimizations in darcs-unstable, that would be less perfect,
but fine, since those'll probably make it into 1.0.4 anyways.  If it
depends on the gittish part of darcs-git (which I seem to recall that it
doesn't, since you did this first), that would be much more iffy.

Perhaps now would be a good time for Ian to pull your
identifyRepository-related patches into unstable?
-- 
David Roundy
http://www.darcs.net




More information about the darcs-devel mailing list