-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Just a little note; I've been going through fixing line ending styles on a bunch of files and thought I'd remind you all of the issue. :)
As you probably know, DOS/Windows and Unix/Linux traditionally use different control character sequences for line endings: Windows uses a CR followed by LF (\r\n) while Unix uses LF alone (\n).
This can lead to annoyance when people edit each others' files; the files can end up mixed or incorrect or otherwise very WTF-ish.
In particular the Semantic MediaWiki and Wikidata extension files had a lot of unmarked DOS files and broken mixed-style files, which I've cleaned up, but there were others in core and other extensions.
Subversion can do automatic conversion of line endings on checkin/checkout, like CVS, but unlike CVS this isn't the default on new files you check in unless you've configured it.
To help keep the line endings straight, I strongly recommend setting up your Subversion 'auto-props' settings to set the svn:eol-style property on new text and source files:
http://www.mediawiki.org/wiki/Subversion/auto-props
Please note that this isn't just for Windows users; _all_ committers should ensure that their files are properly marked when they check them in, or some other schmuck may mess them up when editing it later.
- -- brion vibber (brion @ pobox.com / brion @ wikimedia.org)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Brion Vibber wrote:
Just a little note; I've been going through fixing line ending styles on a bunch of files and thought I'd remind you all of the issue. :) [snip]
Why don't you add a pre-commit hook that does the check on the commonly text file extensions and fail it if the user hadn't set svn:eol-style? Certainly would save a lot of trouble. If a user legitimately needed to have a *.txt file that was binary (which is extremely unlikely) you could also check for svn:mime-type.
Developers can be quite forgetful!
wikitech-l@lists.wikimedia.org