[darcs-users] Colin Walters blogs on Arch changesets vs Darcs

Karl Hasselström kha at treskal.com
Thu Nov 25 09:13:57 UTC 2004

On 2004-11-25 15:31:06 +1000, Anthony Towns wrote:

> Hrm, hope that's enough context. If not: problem is when a single
> patch (in diff -u format, eg) gets imported by two separate people
> into their darcs repositories, and then those people try to
> push/pull from each other. darcs can't tell that the patch is "the
> same", so creates a conflict, and everything goes to hell.
> That ought to be fixable though. How hard would it really be to
> canonicalise a "diff -u" patch to darcs? The issues are:
>   (a) you need a canonical patch name (and description)
>   (b) you need a canonical time
>   (c) you need a canonical email address for the author
>   (d) you need to ensure the patch body is equivalent
> (c) should be obvious, hopefully.
> (d) should be straightforward too, at least if there's no fuzz
> (b) is trickier, but diff -u includes some timestamps:
> +++ foo Thu Nov 25 15:18:42 2004
> so you should be able to just use the most recent timestamp from the
> patch, I think.
> (a) otoh, probably needs a policy solution. So you might require
> that all patches come with a description, and that when folks check
> it into darcs, they use that description. Or maybe you could change
> darcs to treat patches as the same if they've got the same email and
> timestamp, even if their descriptions differ? Or maybe you could
> expect email & timestamp to be the same, and one of
> description/patch-contents to be "the same". :-/

It seems to me that the best solution would be for darcs to be able to
detect that two patches are the same, and take appropriate action
(tell the user, merge the patches, or whatever seems most logical). Is
there some fundamental reason why this would be very difficult or very

Karl Hasselström, kha at treskal.com

More information about the darcs-users mailing list