On Wed, Nov 05, 2008 at 03:38:14PM +0100, Florent Becker wrote:
> > On Mon, Nov 03, 2008 at 01:58:49 +0100, Tommy Pettersson wrote:
> >> Sun Oct  5 01:57:19 CEST 2008  Tommy Pettersson <[EMAIL PROTECTED]>
> >>   * resolve issue864: check non-force replace against pending
[...]
> I'm worried about (existing) line 153-155:
>           else if ForceReplace `elem` opts ||
>                   isJust (apply_to_slurpy (tokreplace f_fp toks old new)
> work) ||
>                   isJust (apply_to_slurpy (tokreplace f_fp toks old new)
> cur)
>                then return (get_force_replace f toks work)
> 
> I don't understand why we are happy if we can apply to *either* working or
> pending. Tommy, can you comment?

:-) I had the exact same worry, and even sent a "fix" for this,
but thanks to David's explanation in some other email on this
list, which I can't find now, but it ought to have "issue864" in
the subject, I now understand the intention.

1) if we can apply cleanly to pending we don't need to insert
any artificial changes.

2) if we can apply cleanly to unrecorded the user has already
made all required changes (if any) for us (intentionally or
unintentionally), so we don't need to insert any artificial
changes.

Only if none of 1 and 2 is true do we have to insert artificial
changes before we can apply the replace, and that's when we
require the --force option.

Any month now I'll send in a patch that documents this intention
in the code.



-- 
Tommy Pettersson <[EMAIL PROTECTED]>
_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to