[prev in list] [next in list] [prev in thread] [next in thread] 

List:       darcs-devel
Subject:    Re: [darcs-devel] Darcs record --dont-allow-conflicts ?
From:       David Roundy <droundy () darcs ! net>
Date:       2008-03-28 14:52:56
Message-ID: 20080328145255.GI22752 () darcs ! net
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Fri, Mar 28, 2008 at 03:40:09PM +0100, Nicolas Pouillard wrote:
> Ok so naively something like this could works:
> 
>   mypatch <- ...the patch we are about to record...
>   oldr <- read_repo repository
>   let oldres = patchset_conflict_resolutions oldr
>   let newr = mypatch :<: oldr
>   let newres = patchset_conflict_resolutions newr
>   let diffres = oldres \\ newres
>   print "Recording conflicts resolution forbidden (--dont-allow-resolutions)"
>   print diffres
>   fail
>
> Perhaps  that one can even fail earlier by just checking oldres being empty or
> not, this would give an approximation.

It's ought to be simpler than this, but I can't think of a simpler approach
that doesn't involve tricky and annoying coding.

The only change I'd make is that your oldres \\ newres isn't right.
Instead it's probably simplest (and best) just to compare their lengths.

But you're right:  you definitely want to bypass this if oldres is empty.
Computing oldres and newres are both potentially very expensive, and if
possible we'd like to speed things up by a factor of two.
-- 
David Roundy
Department of Physics
Oregon State University

["signature.asc" (application/pgp-signature)]

_______________________________________________
darcs-devel mailing list
darcs-devel@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic