[darcs-devel] [patch1931] remove isInverted from PatchInfo

Ben Franksen bugs at darcs.net
Fri Sep 27 18:38:38 UTC 2019


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

hunk ./src/Darcs/UI/PatchHeader.hs 246
-        let maybe_invert = if isInverted old_pinf then invertName else id
-        new_pinf <- maybe_invert `fmap` patchinfo date new_name
new_author new_log
+        new_pinf <- patchinfo date new_name new_author new_log
I had to think a moment about this one. So before, when we amended a
patch we kept it legacy-inverted. Now we keep only the name and log and
make a new legacy-positive patch. Makes sense.

I would have made the long comment about _piLegacyIsInverted (which I
appreciate, thanks for the write-up!) part of the general PatchInfo
haddocks (perhaps adding a "see above" for the member). I guess this
will become quite unreadable when rendered with haddock (but I may be
wrong).

I don't like removing read/write of legacy-inverted patches from the QC
tests. IMO rawPatchInfo should continue to allow to set
_piLegacyIsInverted (we expressly export it for testing purposes only)
and the changes to Darcs.Test.Patch.Info/Inventory reverted.

Otherwise fine.

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


More information about the darcs-devel mailing list