[darcs-devel] When are conflicts regarded as "resolved"?

Benjamin Franksen ben.franksen at online.de
Fri Aug 11 19:28:36 UTC 2017


On 11.08.2017 20:02, Ganesh Sittampalam wrote:
> On 11/08/2017 19:48, Benjamin Franksen wrote:
>> This is a pretty basic question about darcs, so I feel a bit embarrased
>> to have to ask it. Darcs will show me which files have conflicts and I
>> can even ask it to mark conflicts for me. When I am done resolving the
>> conflicts I record a patch and now the conflicts are "gone". But how
>> does darcs know that?
> 
> I have to admit I'm also confused by this every time I look at it! The
> conflict detection and "resolution" classes/code are rather opaque and
> each time I've thought about refactoring them substantially I've been
> too scared.
> 
>> I just tested that if I resolve only one of two conflicts in the same
>> file and record (only) that change, darcs sees that there are still
>> conflicts remaining. I understand that this is because darcs looks at
>> the sequence of /primitive/ patches. That still leaves the question:
>> when does a (primitive) change count as a conflict resolution? Or
>> perhaps the better question is: how does darcs determine whether a file
>> is conflicted or not? I tried to find this in the code but I failed
>> miserably.
> 
> From memory, I think a primitive patch resolves a conflict if it depends
> on all of the conflicting primitive patches. But I could be misremembering.

That sounds like a reasonable specification. It would be nice if we
could claim with some confidence that darcs actually behaves like that...

Cheers
Ben



More information about the darcs-devel mailing list