Version 7 (modified by dolmen, 4 years ago) (diff)

Fix svn:mime-type for images

## Description

Correctly setting svn:mime types will allow files to be displayed in colour in wiki browser, and stored correctly in SVN. (The following was derived from the links below and extensive testing on a development network) I strongly encourage you to read the links provide, so that you become conversant with the concepts contained within, thus making the following sections obvious.

## Synopsis

For Perl files *.pl

```    svn:eol-style=native        ; sets line ending for SVN storage
svn:mime-type=text/x-perl   ; tells pygments how to display
svn:executable              ; enables client to make executable
```

For Perl files *.pm

```    svn:eol-style=native        ; sets line ending for SVN storage
svn:mime-type=text/x-perl   ; tells pygments how to display
```

### svn:eol-style=native from SVN Chapter 3. Advanced Topics

native

This causes the file to contain the EOL markers that are native to the operating system on which Subversion was run. In other words, if a user on a Windows machine checks out a working copy that contains a file with an svn:eol-style property set to native, that file will contain CRLF EOL markers. A Unix user checking out a working copy that contains the same file will see LF EOL markers in his copy of the file.

Note that Subversion will actually store the file in the repository using normalized LF EOL markers regardless of the operating system. This is basically transparent to the user, though.

## Enabling Subversion Auto-Props --this needs to be checked

Open your Subversion config file in a text editor. The file locations are as follows:

• Windows: C:\Documents and Settings\<user>\Application Data\Subversion\config
• OS X: ?
• Linix: ~/.subversion/config
• eclipse generate a text file and import.

Add the following text at the very end of the file:

```[miscellany]
enable-auto-props = yes

[auto-props]
*.pl = svn:eol-style=native; svn:mime-type=text/x-perl; svn:executable
*.PL = svn:eol-style=native; svn:mime-type=text/x-perl
*.pm = svn:eol-style=native; svn:mime-type=text/x-perl
*.perl = svn:eol-style=native; svn:mime-type=text/x-perl
*.t = svn:eol-style=native; svn:mime-type=text/x-perl
*.png = svn:mime-type=image/png
*.gif = svn:mime-type=image/gif
*.jpg = svn:mime-type=image/jpeg
*.yml = svn:eol-style=native; svn:mime-type=application/x-yaml
*.yaml = svn:eol-style=native; svn:mime-type=application/x-yaml
*.js = svn:eol-style=native; svn:mime-type=application/javascript
*.sh = svn:eol-style=native; svn:mime-type=application/x-sh
*.xsl = svn:eol-style=native; svn:mime-type=application/xsl+xml
*.xslt = svn:eol-style=native; svn:mime-type=application/xslt+xml
*.svg = svn:eol-style=native; svn:mime-type=image/svg+xml
*.ico = svn:mime-type=image/vnd.microsoft.icon
*.css = svn:eol-style=native; svn:mime-type=text/css
*.htm = svn:eol-style=native; svn:mime-type=text/html
*.html = svn:eol-style=native; svn:mime-type=text/html
*.tt = svn:eol-style=native; svn:mime-type=text/html
*.tt2 = svn:eol-style=native; svn:mime-type=text/html
*.awk = svn:eol-style=native; svn:mime-type=text/x-awk
*.diff = svn:eol-style=native; svn:mime-type=text/x-diff
*.patch = svn:eol-style=native; svn:mime-type=text/x-diff
*.sql = svn:eol-style=native; svn:mime-type=text/x-sql
*.glade = svn:eol-style=native; svn:mime-type=text/xml
*.xml = svn:eol-style=native; svn:mime-type=text/xml
```

## ToDo

• Please check and provided feedback, thanks.