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

List:       darcs-devel
Subject:    [darcs-devel] [patch1711] resolve various issues with pending
From:       Ben Franksen <bugs () darcs ! net>
Date:       2018-11-20 18:32:52
Message-ID: d363627b-c01b-9801-06f5-61ffd55a3ebd () helmholtz-berlin ! de
[Download RAW message or body]


Ben Franksen <ben.franksen@online.de> added the comment:

> This means we can remove the few cases where coalescing looses 
> information without breaking compatibility in any essential way.

I experimented with this and found that this change (removing the two
offending cases for coalesce) breaks tests/revert.sh. Investigating
further, I found that this is actually a bugfix!

I can cut the failure down to this simple example:

echo hello world > foo
darcs add foo
darcs replace hello goodbye foo
darcs whatsnew

I would expect to see, and with the patched darcs (where I removed the
two problematic cases for coalesce) this is what I get:

addfile ./foo
hunk ./foo 1
+hello world
replace ./foo [A-Za-z_0-9] hello goodbye

but what we currently get is

addfile ./foo
hunk ./foo 1
+goodbye world

which is also what tests/revert.sh is expecting.

Perhaps I am confused but I think that loosing the replace change here
is a bug. I am not sure how exactly the two coalesce cases end up
coalescing the hunk with the replace. Here they are, again, for reference:

coalesceFilePrim f (AddFile) (TokReplace{}) = Just $ FP f AddFile
coalesceFilePrim f (TokReplace{}) (RmFile) = Just $ FP f RmFile

__________________________________
Darcs bug tracker <bugs@darcs.net>
<http://bugs.darcs.net/patch1711>
__________________________________
_______________________________________________
darcs-devel mailing list
darcs-devel@osuosl.org
https://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