| 41 | == MIME Types and End-Of-Line Styles == |
| 42 | Internally, Subversion stores all text files using the Unix line endings (i.e., a single line feed). When checking out a text file on a Windows machine, however, we would prefer the file to have Windows-style line endings (i.e., carriage return/line feed pairs). Blinding adding and committing files can lead to inconsistent line endings, causing problems with some tools. Boost adopts an approach using [http://svnbook.red-bean.com/en/1.1/ch07s02.html`svn:eol-style` properties] to provide native line endings for users on all platforms. Each text file in the Boost Subversion repository must have its MIME type set appropriately and have the `svn:eol-style` property set to `native`. These settings will be verified by the Subversion repository itself, to keep the repository consistent. |
| 43 | |
| 44 | To automatically maintain correct MIME types and end-of-line styles, modify your Subversion configuration file by merging the following code. This code enables the automatic setting of properties when you add files to Subversion, including the MIME type and end-of-line style: |
| 45 | |
| 46 | {{{ |
| 47 | enable-auto-props = yes |
| 48 | |
| 49 | [auto-props] |
| 50 | *.bat = svn:eol-style=native |
| 51 | *.c = svn:eol-style=native |
| 52 | *.cmake = svn:eol-style=native |
| 53 | *.cpp = svn:eol-style=native |
| 54 | *.dsp = svn:eol-style=CRLF |
| 55 | *.dsw = svn:eol-style=CRLF |
| 56 | *.dtd = svn:eol-style=native |
| 57 | *.gif = svn:mime-type=image/gif |
| 58 | *.h = svn:eol-style=native |
| 59 | *.hpp = svn:eol-style=native |
| 60 | *.htm = svn:eol-style=native |
| 61 | *.html = svn:eol-style=native |
| 62 | *.ico = svn:mime-type=image/x-icon |
| 63 | *.ipp = svn:eol-style=native |
| 64 | *.jam = svn:eol-style=native |
| 65 | *.jpg = svn:mime-type=image/jpeg |
| 66 | *.pdf = svn:mime-type=application/pdf |
| 67 | *.pl = svn:eol-style=native |
| 68 | *.png = svn:mime-type=image/png |
| 69 | *.py = svn:eol-style=native |
| 70 | *.qbk = svn:eol-style=native |
| 71 | *.rst = svn:eol-style=native |
| 72 | *.sh = svn:eol-style=native;svn:executable |
| 73 | *.tpp = svn:eol-style=native |
| 74 | *.txt = svn:eol-style=native |
| 75 | *.xhtml = svn:eol-style=native |
| 76 | *.xml = svn:eol-style=native |
| 77 | configure = svn:eol-style=native |
| 78 | Jamfile = svn:eol-style=native |
| 79 | Jamfile.v2 = svn:eol-style=native |
| 80 | Jamrules = svn:eol-style=native |
| 81 | Makefile = svn:eol-style=native |
| 82 | README = svn:eol-style=native |
| 83 | }}} |
| 84 | |
| 85 | On Unix machines, the Subversion configuration file lives in ~/.subversion/config. On Windows, configuration data lives in %APPDATA%\Subversion\config. |
| 86 | |