On Mon, Jan 08, 2007 at 08:31:19AM -0800, [EMAIL PROTECTED] wrote:
> Mon Jan  8 14:09:33 BRST 2007  [EMAIL PROTECTED]
>   * (add a + mv a b = add b) and (mv a b + remove b = remove a)

> New patches:
> 
> [(add a + mv a b = add b) and (mv a b + remove b = remove a)
> [EMAIL PROTECTED] {
> hunk ./PatchCommute.lhs 1021
> +coalesce (Move a b, FP f AddFile) | f == a = Just $ FP b AddFile
> +coalesce (FP f RmFile, Move a b) | b == f = Just $ FP a RmFile
> }

I think this is probably fine, but it's a little bit scary.  The reason is
that I this change does affect the semantics of a patch.  It's probably
fine, since I think coalesce is only used on pending changes, but I'd like
to see a bit of a review of where coalesce is used, before this patch is
accepted.

And for those who haven't caught on, the idea is that if you do

touch foo
darcs add foo
darcs mv foo bar
darcs whatsnew

should give instead of

{
addfile ./foo
move ./foo ./bar
}

{
addfile ./bar
}

It's a good idea, the only question is whether it's dangerous.  Similarly
for if you rename a file and then delete it.
-- 
David Roundy
Department of Physics
Oregon State University
_______________________________________________
darcs-devel mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-devel

Reply via email to