View Ticket
Not logged in
Ticket UUID: a9f7b23c2e376af5b0e5bc180e55ca2b8b012ff7
Title: fossil diff produces a non-working patch
Status: Fixed Type: Code_Defect
Severity: Important Priority:
Subsystem: Resolution: Fixed
Last Modified: 2010-08-21 14:02:16
Version Found In: 15b293259d
Description & Comments:
Using the repo at http://fossil.msofer.com/wip.

Checkout 17ac7d08a76ec30730903eeabb454aa69032979d, then diff from af27f155bafb13628c80786c0964a7f5cc73b1ec.

When you try to apply the patch: there are rejections.


drh added on 2010-08-21 03:41:22:
The problem seems to be that the "fossil diff" command ignores whitespace at the end of lines. IIRC, I added this "feature" when I encountered some check-ins from people using windows editors that inserted \r at the end of every line. If end-of-line whitespace is not ignored in that case, then the diff output is useless.

Maybe the right solution is to make "diff" output ignore end-of-line whitespace but create a new command for generating patches that takes end-of-line whitespace into account?


anonymous added on 2010-08-21 13:58:02:
This does not work even after asking fossil to use an external diff:

fossil set diff-command /usr/bin/diff

still produces unusable patches.

Actually, it still produces a unified diff - so apparently it is not calling the external diff at all. Same result if setting diff-command to FOO.


anonymous added on 2010-08-21 14:02:16:
What's more: this seems not to be just a whitespace-at-the-end issue: patch -l still finds (fewer) conflicts.