[darcs-devel] Example Conflicts
Jason Dagit
dagit at codersbase.com
Tue Jul 31 17:15:19 PDT 2007
David,
Ian has kindly asked me about this example and I keep forgetting to
talk it over with you.
Suppose you have 3 patches, A, B and C. A and B conflict and C depends on A.
You merge A and B by choosing to cancel A in favor of B. Now you want
to pull C into your repository.
I was explaining it like thus:
First you get X[](A)X[](B)
Now you cancel A, so remerge brings B back to life. So then you have:
X[](A) B (Cancel A)
Now when you pull C, it depends on A, which is canceled. This part
I'm unsure about. I've tried to define the important sets below.
Definition: The set of active changes consists of those changes which
either have not been canceled, or are depended upon by an active
change.
So here we have the set of active changes:
{ B (not canceled) , C (not canceled), A (depended upon by C) }
Definition:
The pristine state of the repository consists of the set of active
changes that do not conflict with any other active changes.
The pristine state of the repo:
{ C }
Or should this be empty because C depends on A which has a conflict?
Definition:
When the pristine state differs from the set of active changes (i.e.
the set of active changes cannot be commuted into a single linear
sequence of changes), the repository is in a conflicted state.
We have a conflicted state.
Clarification would be appreciated.
Thanks,
Jason
More information about the darcs-devel
mailing list