[darcs-users] darcs convert on non-independent repos
Ganesh Sittampalam
ganesh at earth.li
Sun Apr 11 15:03:50 UTC 2010
Hi,
'darcs convert' claims the following restriction:
> Furthermore, darcs 2 repositories created by different invocations of
> this command SHOULD NOT exchange patches, unless those repositories had
> no patches in common when they were converted. (That is, within a set
> of repos that exchange patches, no patch should be converted more than
> once.)
I think this condition is actually a little too restrictive, which makes
sense in terms of providing simple and comprehensible documentation.
In particular, I believe the following scenario is also OK:
repo X = A;B
repo Y = A;C
where A, B and C are all sequences of patches, A is in the same order in
both X and Y, and B and C have no patches at all in common.
In other words you can convert both X and Y, and then exchange patches
between the converted repos without any problems.
The reason I think this is ok is that darcs convert acts on the current
representation of any given patch, which makes its behaviour dependent on
the current order of patches in a repo, but other than that its behaviour
on a particular patch is independent of the other patches in the repo -
it's just a map operation over the current patch sequence.
So in the above scenario, we should get identical results for A, and
independent results for B and C.
Can anyone pick any holes in this reasoning?
(I'm hoping that it'll offer a nice way out of Axel Simon's current
problem with gtk2hs)
Cheers,
Ganesh
More information about the darcs-users
mailing list