[darcs-users] cheap in-repo local branches (just needs implementation)

Max Battcher me at worldmaker.net
Wed Jul 22 20:02:55 UTC 2009


Grant Husbands wrote:
> Max Battcher <me at worldmaker.net> wrote:
>> There is no need for a "new kind of context". ``darcs changes --context`` is
>> just fine. You suggest that darcs does magic when the tag at the bottom of a
>> context is missing, but it is fairly simple process:
> 
> It is relatively simple, yes, but insufficient. The original proposal
> has it such that Darcs cannot see both of the branches/repos at the
> same time and is given the context file for one as a substitute for
> having access to it. When it finds that that context is insufficient,
> it doesn't have an easy way of getting more. It has neither the
> filename nor the content for the tag-patch or for the next inventory
> down.

It is sufficient. Darcs happily works with a superposition of patches in 
_darcs/patches. In fact, the global cache is merely a "super-repository" 
that stores all patches (and pristine objects) that have used locally. 
If one branch has a patch (or a tag), they all "have the patch" handy. 
There is no such "insufficiency" that I can find that you seem to see here.

You seem to me to be under some sort of misapprehension about the way 
darcs patches/inventory/contexts work. Allow me to explicitly iterate 
some assumptions about how darcs works that my proposal employs:

The only things "hidden" from darcs here are:

1) Additional pristine objects and pristine root keys (branch pristine)
2) Additional inventory objects and inventory root keys (branch inventory)

Darcs will still have access to:

1) All patches across all branches (that are stored and/or cached locally)
2) The usual _darcs/prefs/sources suspects

Again, darcs doesn't do anything more during push/pull than what the 
proposal suggests to do. Darcs does not have a "smarter wire protocol" 
hidden somewhere other than contexts and patches. (darcs push and darcs 
send really are equal citizens in darcs.)

--
--Max Battcher--
http://worldmaker.net


More information about the darcs-users mailing list