[darcs-users] rebase feedback and amend-record flexibility
Ganesh Sittampalam
ganesh at earth.li
Tue Apr 10 21:39:04 UTC 2012
On 10/04/2012 21:41, Michael Hendricks wrote:
> Hi Florent,
>
> On Tue, Apr 10, 2012 at 1:14 PM, Florent Becker
> <florent.becker at ens-lyon.org <mailto:florent.becker at ens-lyon.org>> wrote:
>
> For both points, there is at least one common reason: darcs' algorithms
> rely on the fact that if two repositories R1 and R2 share a patch p,
> then they also share any patch p depends on. If you don't ensure that
> invariant, then pull for instance will start doing weird stuff. For
> instance, if r1 and r2 have patches abc with c implicitely depending on
> a and b, if in r1 we coalesce a and b into [ab], what happens when we
> pull from r1 into r2? Should we offer [ab]? How would we merge it? What
> about the case where r1 and r2 coalesced a with b1 and b2 which
> conflict?
>
>
> Thank you for the example. It highlights an assumption I hadn't stated
> clearly in the thread. "darcs amend-record --help" says "Do not copy
> draft patches between repositories" I've been assuming that the user
> follows that counsel. Otherwise, all amend-record operations cause
> problems, regardless of patch dependencies.
>
> Given that assumption, abc can't exist in R2 so coalescing abc into
> [ab]c in R1 should be safe.
At the moment the only consequences of violating that advice are that
you end up with conflicting patches that are quite similar and in
practice you need to figure out which one to keep and which one to
eradicate.
If we allowed editing of A without changing the identity of B which
implicitly depends on A, then you would get the much more nasty effects
described in this thread.
Cheers,
Ganesh
More information about the darcs-users
mailing list