win32text on non-windows platforms
skippy.hammond at gmail.com
Fri Aug 21 21:03:49 CDT 2009
I'm working with Dirkjan on some win32text enhancements suitable for
Python to use when it migrates to hg, and as part of taking some first
baby steps I've struck an issue I need some advice on.
My understanding is that the win32text extension is, in theory, suitable
for use on non-Windows platforms. However, the existing test-win32text
assumes that even on non-windows platforms, files marked to be processed
by win32text have Windows line endings.
For example, consider this portion of test-win32text.out:
| 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
| rem empty<CR><LF>
In the first line of data, the file is a treated as 'binary' so is
correct everywhere. However, the last 2 files are testing the EOL
semantics for text files, and as a result, the output shown above is
correct for Windows, but is *not* correct for Linux - Linux should see
native line endings for files processed as text, especially if storing
these rules in a versioned file becomes reality.
Ideally, we should be able to test the 'native' semantics, as well as
the 'other' semantics regardless of what OS we are on - but at the
moment we seem to be explicitly testing the wrong thing everywhere *but*
Windows. Attempting to run these tests on Windows fails in lots of
other dramatic ways such that the fact it *should* pass on Windows is
small consolation for reality :) It isn't quite clear where I should
All advice welcome!
More information about the Mercurial-devel