Fix: Largefile with CRLF in .hglf file#351
Conversation
Files in .hglf could contain CRLF instead of just LF line endings. The largefile export was confused by this while reading the hash. Fixed by stripping all whitespaces from the hash.
|
This isn't the first time HG is sloppy about verifying internal data, sigh! What about an addition to the test-suite? |
In order to reproduce it you probably have to create a hg repository on Windows with a specific setting of the line ending handling changed at the same time as the largefile was added (but this is only a guess since I only saw the failing export). I do not know how to create such a test. Especially, since I do not have a Windows version available myself. On the repository which was supposed to be converted, the fix did its job. For ordinary repositories, created and exported on Unix, there is already a test, (see main.t "hg large file") |
I understand you pain. I'm not interested in adding Wintendo to the test suite.
That's good enough for me.
Yes, I remember you previous contribution which included tests, that's why I asked. I'll merge this as is, thank you for being a returning contributor. |
Files in .hglf could contain CRLF instead of just LF line endings. The largefile export was confused by this while reading the hash.
Fixed by stripping all whitespaces from the hash.