[darcs-devel] Re: [darcs #251] Rollback over dependencies.

Tuomo Valkonen tuomov at jolt.modeemi.cs.tut.fi
Tue Mar 8 15:57:34 PST 2005


On 2005-03-08,  via RT <bugs at darcs.net> wrote:
>
> Tue Mar 08 18:29:26 2005: New ticket: 251.
> Transaction: Ticket created by guest
>        Queue: Darcs
>      Subject: Rollback over dependencies.
>        Owner: Nobody
>   Requestors: tuomov at iki.fi
>       Status: new
>  Ticket <URL: http://bugs.darcs.net/.//Ticket/Display.html?id=251 >
>
> Rollback should work over dependencies, even if doing so creates 
> conflicts. Currently rolling back over a tag requires making a temporary 
> repository that doesn't have the tag and pull from there.

Regarding rollbacks, I think it should be possible rollback already
rolled back patches too. The currently repository format does not
seem to lend itself to this. 

For other reasons, I've been thinking that it might be better to record
patches in a "minimal context" (smallest set of depended-upon patches; every
tag being minimal) and each patch would store this context, instead of using
separate patch bundles. This would enable support for signed patches and
"freely floating patches". I read in an old thread that computing this
minimal context when moving patches between repositories would be too
inefficient. But would it be too inefficient already at record time?
Intuitively it doesn't seem so (we're just commuting a few hunks instead of
a great part of a repository as far back as possible), but I don't know the
darcs internals too well. For other performance reasons, I'd been thinking
that patches could also include an unsigned version of themselves for
"current/repository context", but this would obviously not work with
multiple rollbacks (and each rolled back patch would have to be stored
separately, thus requiring rollback counters, changing the date of the or
something like that, to keep track of the differing multiple rollbacks),
while just storing the minimal context would.

As for handling conflicts in a scheme where patches are stored only in
their minimal context, I think that files in _darcs/current should 
regardless of this be  stored in an augmented format that includes 
conflict markers, symlink information, exec bit information, and so on. 
Currently in case of conflict _darcs/current does not "match" the result
of the chain of patches in the repository, and I think this is wrong.
_darcs/current should store all the "heads" of the repository.

Well, it's something to think about anyway.

-- 
Tuomo





More information about the darcs-devel mailing list