[darcs-devel] [patch1711] resolve various issues with pending

Ben Franksen bugs at darcs.net
Sat Aug 25 12:02:40 UTC 2018


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

>> hunk ./src/Darcs/Repository/Diff.hs 134
>> -        do rmFileP <- diff p (Changed a' (File emptyBlob))
>> +        do emptyFileP <- diff p (Changed a' (File emptyBlob))
>> +           rmFileP <- diff p (Removed a')
>> hunk ./src/Darcs/Repository/Diff.hs 137
>> -           return $ joinGap (+>+) rmFileP addDirP
>> +           return $ joinGap (+>+) (joinGap (+>+) emptyFileP rmFileP)
addDirP
> 
> OK - should the analogous case just below for going the other way
> also be changed (to get an addfile patch)?

Hm. This case is not handled fully symmetrically. The file->dir case
previously emptied the file without removing it and my patch adds the
missing remove.

OTOH the dir->file case does not make the directory empty but /does/
remove it. I just added the reverse case to the test for issue2548 (add
directory f, remove it, then touch file f) and found that now darcs
record says there are no changes, even though the pending patch still
contains the "adddir ./f". I need to investigate this further to find
out why it behaves differently here.

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1711>
__________________________________


More information about the darcs-devel mailing list