[darcs-users] Re: post-1.0: "isolated directories"?

David Roundy droundy at abridgegame.org
Fri Oct 15 11:10:54 UTC 2004


On Wed, Oct 13, 2004 at 09:14:58PM -0700, Adam Megacz wrote:
> 
> > addsubrepo ./foorepo
> > rmrepo ./foorepo
> > subrepoversion ./foorepo [CONTEXT]
> 
> This is supercool.  But is 'darcs addsubrepo' any different from
> 'darcs add --isolate'?

The difference (as I see it) would be in implementation.  I am imagining
that when you addsubrepo, the parent repo won't know anything about the
actual *contents* of the subrepo, only about the patch names within the
subrepo.  So each subrepo would have its own _darcs directory, and could be
dealt with as a completely independent entity.  When you described isolate
(I may have misunderstood), I was picturing that there would still only be
the parent repo's _darcs, which would just have separate patches for files
within that directory.

But user-interface-wise, I suspect a flag to add would be the way to go.  I
am thinking that maybe something more like 'darcs add --subrepo' would be
better, but it's a bit hard to say.

> > Then we'd need a new darcs command to add a subrepo, and a new "metatag"
> > perhaps, which would include subrepo versions.  :( This is sounding awfully
> > complicated.  But I think I'll leave it here for now.  Hopefully there is a
> > better, simpler way of doing things.
> 
> This is absolutely crucial though -- you need a way to let the
> "parent" repo depend on patches in the "child" repo.

Yeah.  On further consideration, I like the idea of the parent fully
versioning the child repos, viewing each child repo as a "set of patches",
so we'd just need primitive patches to (or remove!) patches to (from) the
subrepos.  This even gives us a bit more flexibility than a normal darcs
repo has, since the motion of patches into and out of the subrepos will be
versioned, something that darcs lacks currently--you can tell when a patch
was created, but when it was pulled into a particular repository cannot be
telled.  With metarepos, you'd be able to tell when it was pulled into the
metarepo, although you couldn't tell when the patch was pulled into a
particular instantiation of that metarepo.

I'm liking this idea more and more.

Argh, but unfortunately there will be issues to be ironed out with regard
to reversibility of changes.  If the metarepo only holds the patch *names*
of the subrepos, then there might be difficulties in (for example) the
rollback of a patch that was removed from a subrepo.  Basically, the
metarepo is only (in my head) versioning the metadata (i.e. patch names)
stored in a subrepo, not the actual data itself (contents of the patches),
some operations won't be truly reversible, which could wreak havoc on the
patch theory.  On the other hand, the *inventories* of the subrepos would
be fully reversibly managed, which may be enough to be useful.
-- 
David Roundy
http://www.abridgegame.org




More information about the darcs-users mailing list