Setting svn:keyword Property Automatically

svn:keywords 프로퍼티 자동으로 설정하기

Subclipse dropped ‘Add Keywords…’ dialog since 1.1.7. I couldn’t understand why they got rid of such a useful feature, but now I figure out that it is because there’s much easier way to do that. Yes, I don’t need to forget to set the property or to make mistakes by applying the properties to wrong targets such as binary files; we got auto-props.

Subclipse 1.1.7부터는 ‘Add Keywords…’ 대화창이 없어졌습니다. 아주 유용한 기능이었는데 왜 없앴는지 이해가 안갔지만, 더 쉬운 방법이 있어서였다는 것을 알게 되었습니다. 프로퍼티 설정하는 것을 잊어버리거나 바이너리 같은 엉뚱한 파일에 프로퍼티를 적용하는 실수를 할 필요가 없었던 것이죠. auto-props가 있으니까요.

auto-props configuration adds specified properties to the files that matches certain patterns automatically when svn add or svn import operation is executed. This feature is disabled by default. To enable it, add the following line to the [miscellany] section of your ~/.subversion/config file.

auto-props 설정을 사용하면 svn addsvn import 명령을 수행할 때 특정 패턴에 맞는 파일들에 프로퍼티를 자동으로 추가할 수 있습니다. 이 기능은 처음에는 꺼져 있습니다. 켜려면 ~/.subversion/config 파일의 [miscellany] 섹션에 다음 라인을 추가합니다.

enable-auto-props = yes

Now, you can add your auto-prop settings to the [auto-props] section. Here’s mine I brought from here.

이제 auto-prop 설정을 [auto-props] 섹션에 추가하면 됩니다. 다음은 제가 여기서 빌려온 것입니다.

*.java = svn:eol-style=native;svn:keywords=Rev Date
*.xml = svn:mime-type=text/xml;svn:eol-style=native;svn:keywords=Rev Date
*.xsl = svn:mime-type=text/xml;svn:eol-style=native;svn:keywords=Rev Date
*.xsd = svn:mime-type=text/xml;svn:eol-style=native;svn:keywords=Rev Date
*.wsdl = svn:mime-type=text/xml;svn:eol-style=native;svn:keywords=Rev Date
*.properties = svn:mime-type=text/plain;svn:eol-style=native;svn:keywords=Rev Date
*.c = svn:eol-style=native;svn:keywords=Rev Date
*.cpp = svn:eol-style=native;svn:keywords=Rev Date
*.h = svn:eol-style=native;svn:keywords=Rev Date
*.dsp = svn:eol-style=CRLF
*.dsw = svn:eol-style=CRLF
*.sh = svn:eol-style=native;svn:executable
*.bat = svn:eol-style=native
*.pl = svn:eol-style=native
*.py = svn:eol-style=native
*.cmd = svn:eol-style=native
*.txt = svn:eol-style=native;svn:mime-type=text/plain
*.htm* = svn:eol-style=native;svn:mime-type=text/html
ChangeLog = svn:eol-style=native;svn:mime-type=text/plain
README* = svn:eol-style=native;svn:mime-type=text/plain
LICENSE* = svn:eol-style=native;svn:mime-type=text/plain
NOTICE* = svn:eol-style=native;svn:mime-type=text/plain
TODO* = svn:eol-style=native;svn:mime-type=text/plain
KEYS* = svn:eol-style=native;svn:mime-type=text/plain
INSTALL* = svn:eol-style=native;svn:mime-type=text/plain
WHATSNEW* = svn:eol-style=native;svn:mime-type=text/plain
*.png = svn:mime-type=image/png
*.jpg = svn:mime-type=image/jpeg
*.gif = svn:mime-type=image/gif
Makefile = svn:eol-style=native
*.css = svn:eol-style=native
*.js = svn:eol-style=native

2 Comments Setting svn:keyword Property Automatically

  1. Mark Phippard

    What you say about auto props is true, but the reason Subclipse dropped the Add Keywords option is simply that it is just manipulating properties and the general SVN Property maintenance UI is enough to manage it. When the Add Keywords option was first added, there was no Property maintenance UI.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.